Page MenuHomePhabricator

[REPO][SW] Wikibase\DataModel\Services\Lookup\EntityLookupException: Failed to unserialize the content object.
Open, Needs TriagePublicPRODUCTION ERROR

Description

I just randomly noticed this while trying to look at @Nikki’s contributions on Test Wikidata o_O

I managed to narrow it down to a request URL with limit=1; further investigation TBD.

Error
normalized_message
[{reqId}] {exception_url}   Wikibase\DataModel\Services\Lookup\EntityLookupException: Failed to unserialize the content object.
exception.trace
from /srv/mediawiki/php-1.42.0-wmf.2/extensions/Wikibase/lib/includes/Store/RevisionBasedEntityLookup.php(51)
#0 /srv/mediawiki/php-1.42.0-wmf.2/extensions/Wikibase/lib/packages/wikibase/data-model-services/src/Lookup/RedirectResolvingEntityLookup.php(51): Wikibase\Lib\Store\RevisionBasedEntityLookup->getEntity(Wikibase\Lexeme\Domain\Model\LexemeId)
#1 /srv/mediawiki/php-1.42.0-wmf.2/extensions/WikibaseLexeme/src/DataAccess/Store/EntityLookupLemmaLookup.php(26): Wikibase\DataModel\Services\Lookup\RedirectResolvingEntityLookup->getEntity(Wikibase\Lexeme\Domain\Model\LexemeId)
#2 /srv/mediawiki/php-1.42.0-wmf.2/extensions/WikibaseLexeme/src/MediaWiki/EntityLinkFormatters/LexemeLinkFormatter.php(59): Wikibase\Lexeme\DataAccess\Store\EntityLookupLemmaLookup->getLemmas(Wikibase\Lexeme\Domain\Model\LexemeId)
#3 /srv/mediawiki/php-1.42.0-wmf.2/extensions/Wikibase/repo/includes/Hooks/HtmlPageLinkRendererEndHookHandler.php(319): Wikibase\Lexeme\MediaWiki\EntityLinkFormatters\LexemeLinkFormatter->getHtml(Wikibase\Lexeme\Domain\Model\LexemeId, NULL)
#4 /srv/mediawiki/php-1.42.0-wmf.2/extensions/Wikibase/repo/includes/Hooks/HtmlPageLinkRendererEndHookHandler.php(201): Wikibase\Repo\Hooks\HtmlPageLinkRendererEndHookHandler->internalDoHtmlPageLinkRendererEnd(MediaWiki\Linker\LinkRenderer, MediaWiki\Title\Title, string, array, RequestContext, NULL)
#5 /srv/mediawiki/php-1.42.0-wmf.2/extensions/Wikibase/repo/includes/Hooks/HtmlPageLinkRendererEndHookHandler.php(126): Wikibase\Repo\Hooks\HtmlPageLinkRendererEndHookHandler->doHtmlPageLinkRendererEnd(MediaWiki\Linker\LinkRenderer, MediaWiki\Title\Title, string, array, RequestContext, NULL)
#6 /srv/mediawiki/php-1.42.0-wmf.2/includes/HookContainer/HookContainer.php(161): Wikibase\Repo\Hooks\HtmlPageLinkRendererEndHookHandler->onHtmlPageLinkRendererEnd(MediaWiki\Linker\LinkRenderer, MediaWiki\Title\Title, boolean, string, array, NULL)
#7 /srv/mediawiki/php-1.42.0-wmf.2/includes/HookContainer/HookRunner.php(2054): MediaWiki\HookContainer\HookContainer->run(string, array)
#8 /srv/mediawiki/php-1.42.0-wmf.2/includes/linker/LinkRenderer.php(416): MediaWiki\HookContainer\HookRunner->onHtmlPageLinkRendererEnd(MediaWiki\Linker\LinkRenderer, MediaWiki\Title\Title, boolean, string, array, NULL)
#9 /srv/mediawiki/php-1.42.0-wmf.2/includes/linker/LinkRenderer.php(242): MediaWiki\Linker\LinkRenderer->buildAElement(MediaWiki\Title\Title, string, array, boolean)
#10 /srv/mediawiki/php-1.42.0-wmf.2/includes/linker/LinkRenderer.php(285): MediaWiki\Linker\LinkRenderer->makePreloadedLink(MediaWiki\Title\Title, string, string, array, array)
#11 /srv/mediawiki/php-1.42.0-wmf.2/includes/linker/LinkRenderer.php(181): MediaWiki\Linker\LinkRenderer->makeKnownLink(MediaWiki\Title\Title, string, array, array)
#12 /srv/mediawiki/php-1.42.0-wmf.2/includes/specials/pagers/ContribsPager.php(686): MediaWiki\Linker\LinkRenderer->makeLink(MediaWiki\Title\Title, string, array, array)
#13 /srv/mediawiki/php-1.42.0-wmf.2/includes/pager/ReverseChronologicalPager.php(134): MediaWiki\Pager\ContribsPager->formatRow(stdClass)
#14 /srv/mediawiki/php-1.42.0-wmf.2/includes/pager/IndexPager.php(594): MediaWiki\Pager\ReverseChronologicalPager->getRow(stdClass)
#15 /srv/mediawiki/php-1.42.0-wmf.2/includes/specials/SpecialContributions.php(332): MediaWiki\Pager\IndexPager->getBody()
#16 /srv/mediawiki/php-1.42.0-wmf.2/includes/poolcounter/PoolCounterWorkViaCallback.php(69): MediaWiki\Specials\SpecialContributions->MediaWiki\Specials\{closure}()
#17 /srv/mediawiki/php-1.42.0-wmf.2/includes/poolcounter/PoolCounterWork.php(167): PoolCounterWorkViaCallback->doWork()
#18 /srv/mediawiki/php-1.42.0-wmf.2/includes/specials/SpecialContributions.php(352): PoolCounterWork->execute()
#19 /srv/mediawiki/php-1.42.0-wmf.2/includes/specialpage/SpecialPage.php(727): MediaWiki\Specials\SpecialContributions->execute(string)
#20 /srv/mediawiki/php-1.42.0-wmf.2/includes/specialpage/SpecialPageFactory.php(1622): MediaWiki\SpecialPage\SpecialPage->run(string)
#21 /srv/mediawiki/php-1.42.0-wmf.2/includes/MediaWiki.php(357): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#22 /srv/mediawiki/php-1.42.0-wmf.2/includes/MediaWiki.php(960): MediaWiki->performRequest()
#23 /srv/mediawiki/php-1.42.0-wmf.2/includes/MediaWiki.php(613): MediaWiki->main()
#24 /srv/mediawiki/php-1.42.0-wmf.2/index.php(50): MediaWiki->run()
#25 /srv/mediawiki/php-1.42.0-wmf.2/index.php(46): wfIndexMain()
#26 /srv/mediawiki/w/index.php(3): require(string)
#27 {main}
exception.previous.trace
from /srv/mediawiki/php-1.42.0-wmf.2/extensions/Wikibase/lib/includes/Store/Sql/WikiPageEntityRevisionLookup.php(113)
#0 /srv/mediawiki/php-1.42.0-wmf.2/extensions/Wikibase/lib/includes/Store/TypeDispatchingEntityRevisionLookup.php(52): Wikibase\Lib\Store\Sql\WikiPageEntityRevisionLookup->getEntityRevision(Wikibase\Lexeme\Domain\Model\LexemeId, integer, string)
#1 /srv/mediawiki/php-1.42.0-wmf.2/extensions/Wikibase/data-access/src/ByTypeDispatchingEntityRevisionLookup.php(55): Wikibase\Lib\Store\TypeDispatchingEntityRevisionLookup->getEntityRevision(Wikibase\Lexeme\Domain\Model\LexemeId, integer, string)
#2 /srv/mediawiki/php-1.42.0-wmf.2/extensions/Wikibase/lib/includes/Store/TypeDispatchingEntityRevisionLookup.php(52): Wikibase\DataAccess\ByTypeDispatchingEntityRevisionLookup->getEntityRevision(Wikibase\Lexeme\Domain\Model\LexemeId, integer, string)
#3 /srv/mediawiki/php-1.42.0-wmf.2/extensions/Wikibase/lib/includes/Store/CachingEntityRevisionLookup.php(104): Wikibase\Lib\Store\TypeDispatchingEntityRevisionLookup->getEntityRevision(Wikibase\Lexeme\Domain\Model\LexemeId, integer, string)
#4 /srv/mediawiki/php-1.42.0-wmf.2/extensions/Wikibase/lib/includes/Store/CachingEntityRevisionLookup.php(87): Wikibase\Lib\Store\CachingEntityRevisionLookup->fetchEntityRevision(Wikibase\Lexeme\Domain\Model\LexemeId, integer, string)
#5 /srv/mediawiki/php-1.42.0-wmf.2/extensions/Wikibase/lib/includes/Store/CachingEntityRevisionLookup.php(104): Wikibase\Lib\Store\CachingEntityRevisionLookup->getEntityRevision(Wikibase\Lexeme\Domain\Model\LexemeId, integer, string)
#6 /srv/mediawiki/php-1.42.0-wmf.2/extensions/Wikibase/lib/includes/Store/CachingEntityRevisionLookup.php(87): Wikibase\Lib\Store\CachingEntityRevisionLookup->fetchEntityRevision(Wikibase\Lexeme\Domain\Model\LexemeId, integer, string)
#7 /srv/mediawiki/php-1.42.0-wmf.2/extensions/Wikibase/lib/includes/Store/RevisionBasedEntityLookup.php(46): Wikibase\Lib\Store\CachingEntityRevisionLookup->getEntityRevision(Wikibase\Lexeme\Domain\Model\LexemeId, integer, string)
#8 /srv/mediawiki/php-1.42.0-wmf.2/extensions/Wikibase/lib/packages/wikibase/data-model-services/src/Lookup/RedirectResolvingEntityLookup.php(51): Wikibase\Lib\Store\RevisionBasedEntityLookup->getEntity(Wikibase\Lexeme\Domain\Model\LexemeId)
#9 /srv/mediawiki/php-1.42.0-wmf.2/extensions/WikibaseLexeme/src/DataAccess/Store/EntityLookupLemmaLookup.php(26): Wikibase\DataModel\Services\Lookup\RedirectResolvingEntityLookup->getEntity(Wikibase\Lexeme\Domain\Model\LexemeId)
#10 /srv/mediawiki/php-1.42.0-wmf.2/extensions/WikibaseLexeme/src/MediaWiki/EntityLinkFormatters/LexemeLinkFormatter.php(59): Wikibase\Lexeme\DataAccess\Store\EntityLookupLemmaLookup->getLemmas(Wikibase\Lexeme\Domain\Model\LexemeId)
#11 /srv/mediawiki/php-1.42.0-wmf.2/extensions/Wikibase/repo/includes/Hooks/HtmlPageLinkRendererEndHookHandler.php(319): Wikibase\Lexeme\MediaWiki\EntityLinkFormatters\LexemeLinkFormatter->getHtml(Wikibase\Lexeme\Domain\Model\LexemeId, NULL)
#12 /srv/mediawiki/php-1.42.0-wmf.2/extensions/Wikibase/repo/includes/Hooks/HtmlPageLinkRendererEndHookHandler.php(201): Wikibase\Repo\Hooks\HtmlPageLinkRendererEndHookHandler->internalDoHtmlPageLinkRendererEnd(MediaWiki\Linker\LinkRenderer, MediaWiki\Title\Title, string, array, RequestContext, NULL)
#13 /srv/mediawiki/php-1.42.0-wmf.2/extensions/Wikibase/repo/includes/Hooks/HtmlPageLinkRendererEndHookHandler.php(126): Wikibase\Repo\Hooks\HtmlPageLinkRendererEndHookHandler->doHtmlPageLinkRendererEnd(MediaWiki\Linker\LinkRenderer, MediaWiki\Title\Title, string, array, RequestContext, NULL)
#14 /srv/mediawiki/php-1.42.0-wmf.2/includes/HookContainer/HookContainer.php(161): Wikibase\Repo\Hooks\HtmlPageLinkRendererEndHookHandler->onHtmlPageLinkRendererEnd(MediaWiki\Linker\LinkRenderer, MediaWiki\Title\Title, boolean, string, array, NULL)
#15 /srv/mediawiki/php-1.42.0-wmf.2/includes/HookContainer/HookRunner.php(2054): MediaWiki\HookContainer\HookContainer->run(string, array)
#16 /srv/mediawiki/php-1.42.0-wmf.2/includes/linker/LinkRenderer.php(416): MediaWiki\HookContainer\HookRunner->onHtmlPageLinkRendererEnd(MediaWiki\Linker\LinkRenderer, MediaWiki\Title\Title, boolean, string, array, NULL)
#17 /srv/mediawiki/php-1.42.0-wmf.2/includes/linker/LinkRenderer.php(242): MediaWiki\Linker\LinkRenderer->buildAElement(MediaWiki\Title\Title, string, array, boolean)
#18 /srv/mediawiki/php-1.42.0-wmf.2/includes/linker/LinkRenderer.php(285): MediaWiki\Linker\LinkRenderer->makePreloadedLink(MediaWiki\Title\Title, string, string, array, array)
#19 /srv/mediawiki/php-1.42.0-wmf.2/includes/linker/LinkRenderer.php(181): MediaWiki\Linker\LinkRenderer->makeKnownLink(MediaWiki\Title\Title, string, array, array)
#20 /srv/mediawiki/php-1.42.0-wmf.2/includes/specials/pagers/ContribsPager.php(686): MediaWiki\Linker\LinkRenderer->makeLink(MediaWiki\Title\Title, string, array, array)
#21 /srv/mediawiki/php-1.42.0-wmf.2/includes/pager/ReverseChronologicalPager.php(134): MediaWiki\Pager\ContribsPager->formatRow(stdClass)
#22 /srv/mediawiki/php-1.42.0-wmf.2/includes/pager/IndexPager.php(594): MediaWiki\Pager\ReverseChronologicalPager->getRow(stdClass)
#23 /srv/mediawiki/php-1.42.0-wmf.2/includes/specials/SpecialContributions.php(332): MediaWiki\Pager\IndexPager->getBody()
#24 /srv/mediawiki/php-1.42.0-wmf.2/includes/poolcounter/PoolCounterWorkViaCallback.php(69): MediaWiki\Specials\SpecialContributions->MediaWiki\Specials\{closure}()
#25 /srv/mediawiki/php-1.42.0-wmf.2/includes/poolcounter/PoolCounterWork.php(167): PoolCounterWorkViaCallback->doWork()
#26 /srv/mediawiki/php-1.42.0-wmf.2/includes/specials/SpecialContributions.php(352): PoolCounterWork->execute()
#27 /srv/mediawiki/php-1.42.0-wmf.2/includes/specialpage/SpecialPage.php(727): MediaWiki\Specials\SpecialContributions->execute(string)
#28 /srv/mediawiki/php-1.42.0-wmf.2/includes/specialpage/SpecialPageFactory.php(1622): MediaWiki\SpecialPage\SpecialPage->run(string)
#29 /srv/mediawiki/php-1.42.0-wmf.2/includes/MediaWiki.php(357): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#30 /srv/mediawiki/php-1.42.0-wmf.2/includes/MediaWiki.php(960): MediaWiki->performRequest()
#31 /srv/mediawiki/php-1.42.0-wmf.2/includes/MediaWiki.php(613): MediaWiki->main()
#32 /srv/mediawiki/php-1.42.0-wmf.2/index.php(50): MediaWiki->run()
#33 /srv/mediawiki/php-1.42.0-wmf.2/index.php(46): wfIndexMain()
#34 /srv/mediawiki/w/index.php(3): require(string)
#35 {main}
Impact
  • Unable to browse someone’s contributions (but possibly only on a test wiki)
  • Some logspam
Notes

Details

Request URL
https://test.wikidata.org/w/index.php?limit=1&offset=20230607101418&target=Nikki&title=Special:Contributions/Nikki

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

The bad revision is revid 646258, you can also reproduce the error with index.php?oldid=; it belongs to page ID 323610, which is Lexeme:L2274.

Also, there’s a more helpful error message in Logstash that I didn’t see before:

'wd:Q100' is not a valid entity ID
The serialization "wd:Q100" is not recognized by the configured id builders

So this is probably related to the T291823: Remove "old federation" methods from EntityId cluster of tasks. I’m not sure what the best solution for it is, though. In T291823#8994616 and the following few comments, it sounds like the solution for such an error message on a client wiki was to edit the current revision on Wikidata so that it no longer contained the wd: prefix? But that doesn’t really work well when the error happens as soon as a revision is loaded for the page history.

If this is limited to Test Wikidata (and from Logstash, it appears to be), I suppose we could just delete that lexeme? (The error would still show up if a sysop tried to look at the deleted revisions, but hopefully nobody would have a reason to do that; we similarly avoided T349230 by deleting a specific revision.)

we similarly avoided T349230 by deleting a specific revision

(Which apparently didn’t work out as well as we hoped, so arguably we should think twice before using this approach again. Not sure I have a great alternative idea though.)

Lucas_Werkmeister_WMDE renamed this task from Wikibase\DataModel\Services\Lookup\EntityLookupException: Failed to unserialize the content object. to [REPO][SW] Wikibase\DataModel\Services\Lookup\EntityLookupException: Failed to unserialize the content object..Apr 12 2024, 12:46 PM

Prio Notes:

Impact AreaAffected
production / end usersmaybe (probably only on testwiki)
monitoringno
development effortsno
onboarding effortsno
additional stakeholdersyes (some logspam)