Error
MediaWiki version: 1.35.0-wmf.1
Call to a member function getExtensionData() on boolean
Impact
When editing pages, previews of graphs might be broken on some wikis.
Notes
Happens regularly, and for several weeks already:
Krinkle | |
Oct 13 2019, 12:04 AM |
F30645350: Screenshot 2019-10-13 at 01.04.42.png | |
Oct 13 2019, 12:05 AM |
MediaWiki version: 1.35.0-wmf.1
Call to a member function getExtensionData() on boolean
When editing pages, previews of graphs might be broken on some wikis.
Happens regularly, and for several weeks already:
#0 /includes/libs/objectcache/wancache/WANObjectCache.php(1424): Graph\ApiGraph->Graph\{closure}(boolean, integer, array, NULL) #1 /includes/libs/objectcache/wancache/WANObjectCache.php(1278): WANObjectCache->fetchOrRegenerate(string, integer, Closure, array) #2 /extensions/Graph/includes/ApiGraph.php(138): WANObjectCache->getWithSetCallback(string, integer, Closure) #3 /extensions/Graph/includes/ApiGraph.php(36): Graph\ApiGraph->getGraphSpec(string, integer, string) #4 /includes/api/ApiMain.php(1588): Graph\ApiGraph->execute() #5 /includes/api/ApiMain.php(537): ApiMain->executeAction() #6 /includes/api/ApiMain.php(508): ApiMain->executeActionWithErrorHandling() #7 /api.php(83): ApiMain->execute() #8 /srv/mediawiki/w/api.php(3): require(string) #9 {main}
Project | Branch | Lines +/- | Subject | |
---|---|---|---|---|
mediawiki/extensions/Graph | master | +6 -5 | Handle null from WikiPage::getParserOutput |
Large spike just happened minutes ago, enough to notify high exception rate on -operations: https://logstash.wikimedia.org/goto/a82a49a001c2f38904cbfbc9fb390292
@ppelberg Is Editing-team the correct tag to use to ask for an initial investigation on issues in areas stewarded by Editing team?
I don't actually know anything about the Graph extension, but a quick glance at the code suggests that it's trying to load a graph-spec from a page that doesn't exist, and doesn't have a sensible check for that failure case.
The boolean in question is: $parserOutput = $page->getParserOutput( $parserOptions, $revId );
The docs indicate that $parserOutput there will be ParserOutput or false if the revision was not found.
A plausible fix for this error looks like it might be to just add this on line 129:
if ( !$parserOutput ) { return false; }
That said, I don't know anything about Graph, so it's equally possible that the true issue is that an incorrect page title is being passed in from somewhere higher up in the chain. Anyone actually know about it and want to chime in?
Change 555553 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/extensions/Graph@master] Handle null from WikiPage::getParserOutput
Change 555553 merged by jenkins-bot:
[mediawiki/extensions/Graph@master] Handle null from WikiPage::getParserOutput
Current error rate is way down (probably a function of editing patterns): https://logstash.wikimedia.org/app/kibana#/dashboard/Fatal-Monitor?_g=(refreshInterval%3A(display%3AOff%2Cpause%3A!f%2Cvalue%3A0)%2Ctime%3A(from%3Anow-60d%2Cmode%3Aquick%2Cto%3Anow))
Consequently, I don't think this is worth back-porting, and we'll let it roll out in wmf.10.
Thank you!