Page MenuHomePhabricator

Warning: Invalid argument supplied for foreach() in /srv/mediawiki/php-1.31.0-wmf.2/extensions/Collection/includes/DataProvider.php on line 152
Closed, ResolvedPublic3 Story Points

Description

Seen recently spiking in fatalmonitor logstash

[Exception ErrorException] (/srv/mediawiki/php-1.31.0-wmf.2/extensions/Collection/includes/DataProvider.php:152) PHP Warning: Invalid argument supplied for foreach()    
  #0 /srv/mediawiki/php-1.31.0-wmf.2/extensions/Collection/includes/DataProvider.php(152): MWExceptionHandler::handleError(integer, string, string, integer, array, array)
  #1 /srv/mediawiki/php-1.31.0-wmf.2/extensions/Collection/includes/BookRenderingMediator.php(70): MediaWiki\Extensions\Collection\DataProvider->fetchMetadata(array)    
  #2 /srv/mediawiki/php-1.31.0-wmf.2/extensions/Collection/includes/BookRenderingMediator.php(102): MediaWiki\Extensions\Collection\BookRenderingMediator->getBook(array)
  #3 /srv/mediawiki/php-1.31.0-wmf.2/extensions/Collection/SpecialRenderBook.php(53): MediaWiki\Extensions\Collection\BookRenderingMediator->getBookFromCache(array)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 11 2017, 7:27 PM
thcipriani updated the task description. (Show Details)Oct 11 2017, 7:29 PM

Adding @Jdlrobson since we touched this extension during SWAT recently

Jdlrobson updated the task description. (Show Details)Oct 11 2017, 8:21 PM

Change 383941 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/Collection@master] Handle and debug case where API returns no pages

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

Looks like the issue here is the pages array is not defined. Seemed easy to I wrote a patch.

Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptOct 12 2017, 10:04 PM
phuedx added a subscriber: phuedx.

I've left a couple of minor questions on rECOL943316349253: Handle and debug case where API returns no pages. Moving to Needs More Work so that folk know that it's been reviewed.

phuedx claimed this task.Oct 17 2017, 11:58 AM
phuedx reassigned this task from phuedx to Jdlrobson.Oct 17 2017, 4:31 PM

Whoops!

ovasileva triaged this task as Normal priority.Oct 17 2017, 4:35 PM
ovasileva set the point value for this task to 3.Oct 17 2017, 4:38 PM
phuedx raised the priority of this task from Normal to Unbreak Now!.Oct 17 2017, 4:45 PM

We tend to treat unhandled exceptions as UBN! This is semi-documented in our SWAT policy.

Restricted Application added subscribers: Liuxinyu970226, Jay8g. · View Herald TranscriptOct 17 2017, 4:45 PM

Change 383941 merged by jenkins-bot:
[mediawiki/extensions/Collection@master] Handle and debug case where API returns no pages

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

Jdlrobson lowered the priority of this task from Unbreak Now! to High.Oct 17 2017, 5:57 PM
Jdlrobson removed a project: Patch-For-Review.

I don't believe this is unbreak now status.
Provided T178289 is swatted, this error will not be possible in production. Thus I suggest we focus on addressing that problem to avoid a SWAT here.
Please feel free to disagree.

phuedx removed Jdlrobson as the assignee of this task.Oct 17 2017, 6:06 PM

It's not possible for this to happen in production now.

T178289 has been swatted making this code unreachable.

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