Page MenuHomePhabricator

Fatal on Watchlist: Call to a member function getAlphadecimal() on null
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

Request URL: Special:Watchlist
Request ID: XS89RApAAEIAACWg3LYAAACU

message
[{exception_id}] {exception_url}   PHP Fatal Error from line 194 of /srv/mediawiki/php-1.34.0-wmf.14/extensions/Flow/includes/Formatter/ChangesListFormatter.php: Nesting level too deep - recursive dependency?
trace
#0 [internal function]: MWExceptionHandler::handleFatalError()
#1 {main}

Impact

Unknown.

Notes

From Logstash:

  • New in 1.34-wmf.14.
  • So far only on mediawiki.org/HHVM.

Event Timeline

This is from my personal account's Watchlist. Last night the error was

2019-07-17 03:24:24 [XS6U6ApAMFgAAFx6VfsAAABL] mw1253 mediawikiwiki 1.34.0-wmf.14 exception ERROR: [XS6U6ApAMFgAAFx6VfsAAABL] /wiki/Special:Watchlist   Error from line 197 of /srv/mediawiki/php-1.34.0-wmf.14/extensions/Flow/includes/Formatter/ChangesListFormatter.php: Call to a member function getAlphadecimal() on null {"exception_id":"XS6U6ApAMFgAAFx6VfsAAABL","exception_url":"/wiki/Special:Watchlist","caught_by":"mwe_handler"}

As of this morning it's turned into a 500 page instead. I don't think the underlying code in Flow has changed, but there's related (?) code in CirrusSearch that got reverted in production a couple of hours ago in T228276: PHP Warning: Attempted to serialize unserializable builtin class Closure$CirrusSearch\Profile\CompletionSearchProfileRepository::__construct;2912.

Pinging people from Growth and Discovery: @Catrope @dcausse

I'm still investigating, but it looks like this happens when enhanced RC/WL tries to render a group of log events that begins with a Flow log event but also contains non-Flow log events. In this particular case, I can reproduce the bug by adding Project:Current issues to my watchlist on mediawiki.org, un-hiding Wikidata changes, and enabling enhanced mode. The consolidation of these three (or four, depending on your timezone preference) log entries fails:

Screenshot from 2019-07-17 14-06-38.png (157×1 px, 49 KB)

Mentioned in SAL (#wikimedia-operations) [2019-07-17T21:15:47Z] <catrope@deploy1001> Synchronized php-1.34.0-wmf.14/extensions/Flow: Clean up accidentally-deployed debugging code for T228290 (duration: 01m 02s)

This has now mysteriously fixed itself…

Sort of. The exception is still being thrown, it's just that it's now (correctly) being swallowed by Flow's RecoverableErrorHandler so it doesn't break the page.

Catrope renamed this task from Fatal on Watchlist: Nesting level too deep to Fatal on Watchlist: Call to a member function getAlphadecimal() on null.Jul 17 2019, 9:29 PM

For posterity: the "nesting level too deep" error was a crash in my debugging code, where it attempted to serialize a recursive data structure. The original error message before I started messing with things (and that is now happening again) is that $oldId->getAlphadecimal() is called where $oldId is null, in extensions/Flow/includes/Formatter/ChangesListFormatter.php on line 197.

Let's provisionally call this Invalid. If anyone gets it again, we'll re-open.

Change 524046 had a related patch set uploaded (by Catrope; owner: Catrope):
[mediawiki/extensions/Flow@master] Fix fatal in ChangesListFormatter::getLogTextLinks()

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

I was able to confirm that this spams the logs without my fix, and doesn't spam it with my fix, so that's probably worth addressing. Unlinking this as a train blocker though, since it's not fataling entire pages anymore.

Change 524046 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Fix fatal in ChangesListFormatter::getLogTextLinks()

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

Change 524315 had a related patch set uploaded (by Jforrester; owner: Catrope):
[mediawiki/extensions/Flow@wmf/1.34.0-wmf.14] Fix fatal in ChangesListFormatter::getLogTextLinks()

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

Change 524315 merged by jenkins-bot:
[mediawiki/extensions/Flow@wmf/1.34.0-wmf.14] Fix fatal in ChangesListFormatter::getLogTextLinks()

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

Mentioned in SAL (#wikimedia-operations) [2019-07-18T21:03:04Z] <jforrester@deploy1001> Synchronized php-1.34.0-wmf.14/extensions/Flow: T228290 Fix fatal in ChangesListFormatter::getLogTextLinks() (duration: 01m 02s)

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