Page MenuHomePhabricator

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

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.

Details

Related Gerrit Patches:
mediawiki/extensions/Flow : wmf/1.34.0-wmf.14Fix fatal in ChangesListFormatter::getLogTextLinks()
mediawiki/extensions/Flow : masterFix fatal in ChangesListFormatter::getLogTextLinks()

Event Timeline

Krinkle created this task.Jul 17 2019, 3:28 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 17 2019, 3:28 PM

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.

Restricted Application added a project: Discovery-Search. · View Herald TranscriptJul 17 2019, 3:33 PM
Jdforrester-WMF triaged this task as Unbreak Now! priority.Jul 17 2019, 3:33 PM
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptJul 17 2019, 3:33 PM

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:

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.

Jdforrester-WMF closed this task as Invalid.Jul 17 2019, 9:47 PM

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

Restricted Application removed a subscriber: Liuxinyu970226. · View Herald TranscriptJul 17 2019, 9:47 PM

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

Catrope reopened this task as Open.Jul 17 2019, 10:04 PM

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)

Jdforrester-WMF closed this task as Resolved.Jul 18 2019, 9:03 PM
Jdforrester-WMF assigned this task to Catrope.
Jdforrester-WMF removed a project: Patch-For-Review.

Deployed.

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