Page MenuHomePhabricator

HTTP 500 on action=query&format=xml&list=logevents&letype=move&ledir=newer&lelimit=max on Meta
Closed, ResolvedPublic

Description

I get
Request from *removed* via cp3043 cp3043, Varnish XID 361333984
Error: 500, Internal Server Error at Thu, 28 Sep 2017 08:51:04 GMT
Request from *removed* via cp3043 cp3043, Varnish XID 361890333
Error: 500, Internal Server Error at Thu, 28 Sep 2017 08:51:53 GMT
Request from *removed* via cp3043 cp3043, Varnish XID 354397631
Error: 500, Internal Server Error at Thu, 28 Sep 2017 08:52:02 GMT
Request from *removed* via cp3042 frontend, Varnish XID 813839052
Upstream caches: cp3042 int
Error: 500, Internal Server Error at Thu, 28 Sep 2017 08:52:15 GMT
Request from *removed* via cp3043 cp3043, Varnish XID 359407914
Error: 500, Internal Server Error at Thu, 28 Sep 2017 08:52:34 GMT
or blank pages on
https://meta.wikimedia.org/w/api.php?action=query&format=xml&list=logevents&letype=move&ledir=newer&lelimit=max

All the records are from consecutive reloads, but I first observed it over 1.5 h ago so it must be there for a while. The query works OK on Commons.

Event Timeline

Kizule subscribed.

All is ok now

I can't say for certain that it's related, but I see suggestive messages in the logs at around the same time:

2017-09-28 08:50:45 [Wcy35ApAMCEAAFQPddQAAAAI] mw1201 metawiki 1.31.0-wmf.1 fatal ERROR: [810aa583] PHP Fatal Error: Invalid operand type was used: cannot perform this operation with arrays {"fatal_exception":{"class":"ErrorException","message":"PHP Fatal Error: Invalid operand type was used: cannot perform this operation with arrays","code":16777217,"file":"/srv/mediawiki/php-1.31.0-wmf.1/includes/logging/LogFormatter.php","line":808,"trace":[{"file":"/srv/mediawiki/php-1.31.0-wmf.1/includes/logging/LogFormatter.php","line":808},{"file":"/srv/mediawiki/php-1.31.0-wmf.1/includes/api/ApiQueryLogEvents.php","line":307,"function":"formatParametersForApi","class":"LogFormatter","type":"->","args":[]},{"file":"/srv/mediawiki/php-1.31.0-wmf.1/includes/api/ApiQueryLogEvents.php","line":241,"function":"extractRowInfo","class":"ApiQueryLogEvents","type":"->","args":["stdClass"]},{"file":"/srv/mediawiki/php-1.31.0-wmf.1/includes/api/ApiQuery.php","line":253,"function":"execute","class":"ApiQueryLogEvents","type":"->","args":[]},{"file":"/srv/mediawiki/php-1.31.0-wmf.1/includes/api/ApiMain.php","line":1583,"function":"execute","class":"ApiQuery","type":"->","args":[]},{"file":"/srv/mediawiki/php-1.31.0-wmf.1/includes/api/ApiMain.php","line":546,"function":"executeAction","class":"ApiMain","type":"->","args":[]},{"file":"/srv/mediawiki/php-1.31.0-wmf.1/includes/api/ApiMain.php","line":517,"function":"executeActionWithErrorHandling","class":"ApiMain","type":"->","args":[]},{"file":"/srv/mediawiki/php-1.31.0-wmf.1/api.php","line":94,"function":"execute","class":"ApiMain","type":"->","args":[]},{"file":"/srv/mediawiki/w/api.php","line":3,"function":"include","args":["string"]}]},"exception_id":"810aa583","caught_by":"mwe_handler"}

I've submitted https://gerrit.wikimedia.org/r/#/c/381219/ to try to take care of those at least.

Kizule added a project: Patch-For-Review.

I can't say for certain that it's related, but I see suggestive messages in the logs at around the same time:

2017-09-28 08:50:45 [Wcy35ApAMCEAAFQPddQAAAAI] mw1201 metawiki 1.31.0-wmf.1 fatal ERROR: [810aa583] PHP Fatal Error: Invalid operand type was used: cannot perform this operation with arrays {"fatal_exception":{"class":"ErrorException","message":"PHP Fatal Error: Invalid operand type was used: cannot perform this operation with arrays","code":16777217,"file":"/srv/mediawiki/php-1.31.0-wmf.1/includes/logging/LogFormatter.php","line":808,"trace":[{"file":"/srv/mediawiki/php-1.31.0-wmf.1/includes/logging/LogFormatter.php","line":808},{"file":"/srv/mediawiki/php-1.31.0-wmf.1/includes/api/ApiQueryLogEvents.php","line":307,"function":"formatParametersForApi","class":"LogFormatter","type":"->","args":[]},{"file":"/srv/mediawiki/php-1.31.0-wmf.1/includes/api/ApiQueryLogEvents.php","line":241,"function":"extractRowInfo","class":"ApiQueryLogEvents","type":"->","args":["stdClass"]},{"file":"/srv/mediawiki/php-1.31.0-wmf.1/includes/api/ApiQuery.php","line":253,"function":"execute","class":"ApiQueryLogEvents","type":"->","args":[]},{"file":"/srv/mediawiki/php-1.31.0-wmf.1/includes/api/ApiMain.php","line":1583,"function":"execute","class":"ApiQuery","type":"->","args":[]},{"file":"/srv/mediawiki/php-1.31.0-wmf.1/includes/api/ApiMain.php","line":546,"function":"executeAction","class":"ApiMain","type":"->","args":[]},{"file":"/srv/mediawiki/php-1.31.0-wmf.1/includes/api/ApiMain.php","line":517,"function":"executeActionWithErrorHandling","class":"ApiMain","type":"->","args":[]},{"file":"/srv/mediawiki/php-1.31.0-wmf.1/api.php","line":94,"function":"execute","class":"ApiMain","type":"->","args":[]},{"file":"/srv/mediawiki/w/api.php","line":3,"function":"include","args":["string"]}]},"exception_id":"810aa583","caught_by":"mwe_handler"}

I've submitted https://gerrit.wikimedia.org/r/#/c/381219/ to try to take care of those at least.

OK. Thank you very much!

I just opened it to check and got

Request from *removed* via cp3031 cp3031, Varnish XID 602413477
Error: 500, Internal Server Error at Thu, 28 Sep 2017 19:12:58 GMT

Base reopened this task as Open.EditedSep 28 2017, 7:16 PM

Oh. Works anonymously. I forgot to mention, my bad, that I am a sysop on Meta, lelimit=max for me means 5000.

Opening while it is still broken, hopefully that patch will help.

Anomie claimed this task.

I forgot to mention, my bad, that I am a sysop on Meta, lelimit=max for me means 5000.

Yeah, that's pretty important. It turns out it can be reproduced without being a sysop by continuing a few times, until https://meta.wikimedia.org/w/api.php?action=query&format=xml&list=logevents&letype=move&ledir=newer&lelimit=max&continue=-||&lecontinue=20060423124615|26632.

Now that I can reproduce, I can confirm that the patch does fix it. The usual convention is to mark a bug fixed when it's fixed in code without waiting for a deployment, so I'm going to do that here. With the current schedule the fix should be deployed on Wednesday; you could also submit it for a SWAT deploy if you want to get it out there sooner (the last window this week is at 23:00 UTC today, or there are windows on Monday and Tuesday).