Page MenuHomePhabricator

Undefined index "5::duration" in ApiQueryLogEvents for block entries
Closed, ResolvedPublicPRODUCTION ERROR

Description

Spotted in production:

270 Notice: Undefined index: 5::duration in /srv/mediawiki/php-1.25wmf19/includes/api/ApiQueryLogEvents.php on line 327
270 Notice: Undefined index: 5::duration in /srv/mediawiki/php-1.25wmf19/includes/api/ApiQueryLogEvents.php on line 325
270 Notice: Undefined index: 5::duration in /srv/mediawiki/php-1.25wmf19/includes/api/ApiQueryLogEvents.php on line 321

Introduced by https://gerrit.wikimedia.org/r/#/c/192266/
rMWce4af8b87374: Fix parameter order for block logs

Event Timeline

demon raised the priority of this task from to Needs Triage.
demon updated the task description. (Show Details)
demon subscribed.
greg triaged this task as High priority.Mar 3 2015, 11:49 PM
greg set Security to None.
greg added subscribers: Anomie, greg.

@Anomie: Do you have the time to take a look at this one?

https://gerrit.wikimedia.org/r/#/c/183315/ should take care of it by
killing that whole stupid function.

Change 183315 had a related patch set uploaded (by Greg Grossmeier):
API: Move parameter formatting into LogFormatter

https://gerrit.wikimedia.org/r/183315

Is there a dbname or a request where this is shown? All non-legacy log entry should have these array keys.

demon raised the priority of this task from High to Unbreak Now!.Mar 12 2015, 5:48 PM

No we don't. Feel free to add some additional logging here and we can pull it into production.

Raising priority as this is currently drowning out all other production logs.

Krenair subscribed.

I think this happens when you try to get a block log entry created by the CheckUser extension (which uses legacy logging still) via the recent changes API. ApiQueryRecentChanges does not pass $logEntry->isLegacy(), so it defaults to false, tries to get param 5::duration instead of 0, causing an error.

Visiting http://en.wikipedia.org/w/api.php?action=query&list=recentchanges&rcprop=loginfo&rctype=log&rcstart=20150312084618 for example, causes the number on fatalmonitor's entry for this bug to go up.

Change 196299 had a related patch set uploaded (by Chad):
Pass if log entry is legacy to ApiQueryLogEvents::addLogParams()

https://gerrit.wikimedia.org/r/196299

Change 196299 merged by jenkins-bot:
Pass if log entry is legacy to ApiQueryLogEvents::addLogParams()

https://gerrit.wikimedia.org/r/196299

Umherirrender claimed this task.
Umherirrender reassigned this task from Umherirrender to demon.

Change 196313 had a related patch set uploaded (by Alex Monk):
Pass if log entry is legacy to ApiQueryLogEvents::addLogParams()

https://gerrit.wikimedia.org/r/196313

Change 196317 had a related patch set uploaded (by Alex Monk):
Pass if log entry is legacy to ApiQueryLogEvents::addLogParams()

https://gerrit.wikimedia.org/r/196317

Change 196317 merged by jenkins-bot:
Pass if log entry is legacy to ApiQueryLogEvents::addLogParams()

https://gerrit.wikimedia.org/r/196317

Change 196313 merged by jenkins-bot:
Pass if log entry is legacy to ApiQueryLogEvents::addLogParams()

https://gerrit.wikimedia.org/r/196313

Change 183315 merged by jenkins-bot:
API: Move parameter formatting into LogFormatter

https://gerrit.wikimedia.org/r/183315

Change 207494 had a related patch set uploaded (by Anomie):
API: Move parameter formatting into LogFormatter

https://gerrit.wikimedia.org/r/207494

Change 207494 merged by jenkins-bot:
API: Move parameter formatting into LogFormatter

https://gerrit.wikimedia.org/r/207494

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:11 PM