Page MenuHomePhabricator

Fatal error: Call to getFullURL() on null (in Wikibase repo EntityDataRequestHandler.php)
Closed, ResolvedPublicPRODUCTION ERROR



MediaWiki version: 1.36.0-wmf.1

Call to a member function getFullURL() on null
#0 /srv/mediawiki/php-1.36.0-wmf.1/extensions/Wikibase/repo/includes/LinkedData/EntityDataRequestHandler.php(365): Wikibase\Repo\LinkedData\EntityDataUriManager->getDocUrl(Wikibase\MediaInfo\DataModel\MediaInfoId, string, integer)
#1 /srv/mediawiki/php-1.36.0-wmf.1/extensions/Wikibase/repo/includes/LinkedData/EntityDataRequestHandler.php(244): Wikibase\Repo\LinkedData\EntityDataRequestHandler->httpContentNegotiation(WebRequest, OutputPage, Wikibase\MediaInfo\DataModel\MediaInfoId, integer)
#2 /srv/mediawiki/php-1.36.0-wmf.1/extensions/Wikibase/repo/includes/Specials/SpecialEntityData.php(156): Wikibase\Repo\LinkedData\EntityDataRequestHandler->handleRequest(string, WebRequest, OutputPage)
#3 /srv/mediawiki/php-1.36.0-wmf.1/includes/specialpage/SpecialPage.php(600): Wikibase\Repo\Specials\SpecialEntityData->execute(string)
#4 /srv/mediawiki/php-1.36.0-wmf.1/includes/specialpage/SpecialPageFactory.php(635): SpecialPage->run(string)
#5 /srv/mediawiki/php-1.36.0-wmf.1/includes/MediaWiki.php(307): MediaWiki\SpecialPage\SpecialPageFactory->executePath(Title, RequestContext)
#6 /srv/mediawiki/php-1.36.0-wmf.1/includes/MediaWiki.php(940): MediaWiki->performRequest()
#7 /srv/mediawiki/php-1.36.0-wmf.1/includes/MediaWiki.php(543): MediaWiki->main()
#8 /srv/mediawiki/php-1.36.0-wmf.1/index.php(53): MediaWiki->run()
#9 /srv/mediawiki/php-1.36.0-wmf.1/index.php(46): wfIndexMain()
#10 /srv/mediawiki/w/index.php(3): require(string)
#11 {main}


Occurred 3 times in the last several hours on the test commons wiki.



Request ID
Request URL

Event Timeline

Looking at the code, it seems impossible. Can you restart php-fpm in mediawiki nodes in beta cluster?

I restarted php-fpm on deployment-mediawiki-07 and deployment-mediawiki-09 in deployment-prep. Let me know if that wasn't what you needed.

Mentioned in SAL (#wikimedia-releng) [2020-07-22T20:48:17Z] <brennen> restarted php7.2-fpm on deployment-mediawiki-{07,09} for T258628

It still happens. By examining a bit I realized I'm extremely stupid. This isn't beta cluster (it's test in production) and also this is not impossible (so opcache corruption, it actually happens consistently). It happens when you request an non-existing entity in Special:EntityData in HTML mode (not json/rdf) which EntityTitleLookup::getTitleForId() returns null when the entity doesn't exist (in EntityDataUriManager::getDocTitle()) and that explains why doesn't trigger an error while does.

What I don't understand is that why non-existing item doesn't trigger an error in test wikidata:

Adding @Addshore who touched the config of this wiki recently (for entity sources) and @Tonina_Zhelyazkova_WMDE as this week's incident manager.

Jakob_WMDE added a subscriber: Jakob_WMDE.

Ok, so it seems like this bug has been there forever. Here is one occurrence of the same error in May:

Krinkle renamed this task from Call to a member function getFullURL() on null to Fatal error: Call to getFullURL() on null (in Wikibase repo EntityDataRequestHandler.php).Sep 3 2020, 7:40 PM
Krinkle updated the task description. (Show Details)
Krinkle edited Stack Trace. (Show Details)
Krinkle moved this task from Jul 2020 to Older on the Wikimedia-production-error board.

There is T273506 which has a deeper stack trace as this, but that possible only because the code has gets some type hints now failing instead of the null. I would assume it is a duplicate