Page MenuHomePhabricator

PHP Warning: Attempted to serialize unserializable builtin class Closure$ChangesListSpecialPage::__construct#28;1852
Closed, ResolvedPublic

Description

2017-09-22 07:57:21 [WcTCYApAMEkAAG85x0MAAABL] mw1238 frwiki 1.30.0-wmf.19 error WARNING: [WcTCYApAMEkAAG85x0MAAABL] /wiki/Utilisateur:Langladure   ErrorException from line 187 of /srv/mediawiki/php-1.30.0-wmf.19/includes/libs/objectcache/MultiWriteBagOStuff.php: PHP Warning: Attempted to serialize unserializable builtin class Closure$ChangesListSpecialPage::__construct#28;1852 {"exception_id":"WcTCYApAMEkAAG85x0MAAABL","exception_url":"/wiki/Utilisateur:Langladure","caught_by":"mwe_handler"} 
[Exception ErrorException] (/srv/mediawiki/php-1.30.0-wmf.19/includes/libs/objectcache/MultiWriteBagOStuff.php:187) PHP Warning: Attempted to serialize unserializable builtin class Closure$ChangesListSpecialPage::__construct#28;1852
  #0 /srv/mediawiki/php-1.30.0-wmf.19/includes/libs/objectcache/MultiWriteBagOStuff.php(187): MWExceptionHandler::handleError(integer, string, string, integer, array, array)
  #1 /srv/mediawiki/php-1.30.0-wmf.19/includes/libs/objectcache/MultiWriteBagOStuff.php(134): MultiWriteBagOStuff->doWrite(double, boolean, string, string, ParserOutput, integer)
  #2 /srv/mediawiki/php-1.30.0-wmf.19/includes/parser/ParserCache.php(335): MultiWriteBagOStuff->set(string, ParserOutput, integer)
  #3 /srv/mediawiki/php-1.30.0-wmf.19/includes/poolcounter/PoolWorkArticleView.php(162): ParserCache->save(ParserOutput, WikiPage, ParserOptions, string, integer)
  #4 /srv/mediawiki/php-1.30.0-wmf.19/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork()
  #5 /srv/mediawiki/php-1.30.0-wmf.19/includes/page/Article.php(585): PoolCounterWork->execute()
  #6 /srv/mediawiki/php-1.30.0-wmf.19/includes/actions/ViewAction.php(68): Article->view()
  #7 /srv/mediawiki/php-1.30.0-wmf.19/includes/MediaWiki.php(499): ViewAction->show()
  #8 /srv/mediawiki/php-1.30.0-wmf.19/includes/MediaWiki.php(293): MediaWiki->performAction(Article, Title)
  #9 /srv/mediawiki/php-1.30.0-wmf.19/includes/MediaWiki.php(851): MediaWiki->performRequest()
  #10 /srv/mediawiki/php-1.30.0-wmf.19/includes/MediaWiki.php(523): MediaWiki->main()
  #11 /srv/mediawiki/php-1.30.0-wmf.19/index.php(43): MediaWiki->run()
  #12 /srv/mediawiki/w/index.php(3): include(string)
  #13 {main}

This is reproducible using the API on pages that transclude Special:RecentChanges: https://fr.wikipedia.org/w/api.php?action=parse&format=json&page=Utilisateur%3ACarsracBot&prop=text%7Clanglinks%7Ccategories%7Clinks%7Ctemplates%7Cimages%7Cexternallinks%7Csections%7Crevid%7Cdisplaytitle%7Ciwlinks%7Cproperties%7Cparsewarnings%7Cjsconfigvars%7Cmodules

Event Timeline

Restricted Application added a project: Scoring-platform-team. · View Herald TranscriptSep 19 2017, 5:16 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Legoktm added a subscriber: Legoktm.

This has to do with the structured filters system, not anything wrong with ORES specifically AIUI. I was trying to trace it last night but didn't finish.

Legoktm triaged this task as Unbreak Now! priority.Sep 22 2017, 7:58 PM
Legoktm updated the task description. (Show Details)
Restricted Application added subscribers: Liuxinyu970226, Jay8g, TerraCodes. · View Herald TranscriptSep 22 2017, 7:58 PM
Legoktm renamed this task from Attempted to serialize unserializable builtin class Closure$ORES\Hooks::makeApplicableCallback;343 in /srv/mediawiki/php-1.30.0-wmf.18/includes/libs/objectcac he/MultiWriteBagOStuff.php on line 187 to PHP Warning: Attempted to serialize unserializable builtin class Closure$ChangesListSpecialPage::__construct#28;1852.Sep 22 2017, 7:58 PM
greg added a subscriber: greg.Oct 2 2017, 9:13 PM

Status? This UBN! task has been UBN! for over a week with effectively zero updates.

Catrope added a subscriber: Catrope.Oct 3 2017, 5:11 PM

It's a complete mystery. Nobody seems to have any idea why this happens. According to logstash these messages aren't rare though, there are about 300 of them in the past 4 hours.

I don't think it's that mysterious, it's trivial to reproduce:

compare with

which works fine.

So somehow/somewhere those closures are trying to be output as a JS config var. We can probably work backwards from there.

I suspect that it's one of the calls from ChangesListSpecialPage::includeRcFiltersApp(). I would probably just start live hacking on mwdebug1002 and comment out each $out->addJsConfigVars call to see when it stops fataling and then continue from there.

Change 382169 had a related patch set uploaded (by Sbisson; owner: Sbisson):
[mediawiki/core@master] RCFilters: unset raw filter and group objects before adding them to js var structure

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

Change 382169 merged by jenkins-bot:
[mediawiki/core@master] RCFilters: Avoid adding raw filter and group objects to js vars

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

Change 382295 had a related patch set uploaded (by Catrope; owner: Sbisson):
[mediawiki/core@wmf/1.31.0-wmf.2] RCFilters: Avoid adding raw filter and group objects to js vars

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

Change 382295 merged by jenkins-bot:
[mediawiki/core@wmf/1.31.0-wmf.2] RCFilters: Avoid adding raw filter and group objects to js vars

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

Mentioned in SAL (#wikimedia-operations) [2017-10-04T23:32:54Z] <catrope@tin> Synchronized php-1.31.0-wmf.2/includes/changes/ChangesListFilterGroup.php: Fix PHP fatal when transcluding Special:Recentchanges (T176236) (duration: 00m 50s)

Catrope closed this task as Resolved.Oct 5 2017, 1:50 AM
Catrope assigned this task to SBisson.

Fix backported to wmf.2. Didn't bother to backport to wmf.1 because the train finishes tomorrow anyway.

Change 382344 had a related patch set uploaded (by Legoktm; owner: Sbisson):
[mediawiki/core@REL1_30] RCFilters: Avoid adding raw filter and group objects to js vars

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

Change 382344 merged by jenkins-bot:
[mediawiki/core@REL1_30] RCFilters: Avoid adding raw filter and group objects to js vars

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

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