Page MenuHomePhabricator

Call to a member function getFullURL() on null
Open, Needs TriagePublic

Description

Error

MediaWiki version: 1.36.0-wmf.1

message
Call to a member function getFullURL() on null

Impact

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

Notes

Details

Request ID
92bda7c9-003b-48ad-85d5-5fa6f7509d97
Request URL
https://test-commons.wikimedia.org/wiki/Special:EntityData/M215215
Stack Trace
exception.trace
#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}

Event Timeline

jeena created this task.Wed, Jul 22, 6:07 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptWed, Jul 22, 6:07 PM

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

jeena added a comment.Wed, Jul 22, 8:39 PM

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 https://test-commons.wikimedia.org/wiki/Special:EntityData/M215215.json doesn't trigger an error while https://test-commons.wikimedia.org/wiki/Special:EntityData/M215215 does.

What I don't understand is that why non-existing item doesn't trigger an error in test wikidata: https://test.wikidata.org/wiki/Special:EntityData/Q666666666666

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 removed Jakob_WMDE as the assignee of this task.Thu, Jul 30, 1:29 PM
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: https://logstash.wikimedia.org/goto/2171b192e1965f8eaa4f7cacb576e46d