Page MenuHomePhabricator

Wikidata exception on test2.wikipedia (test.wikipedia works)
Closed, ResolvedPublic

Description

http://test2.wikipedia.org/wiki/Main_Page

Unexpected non-MediaWiki exception encountered, of type "UnexpectedValueException"
[082fb58d] /wiki/Main_Page Exception from line 124 of /srv/mediawiki/php-1.24wmf21/includes/objectcache/MemcachedPeclBagOStuff.php: Error at offset 0 of 6 bytes
Backtrace:
#0 [internal function]: SplObjectStorage->unserialize(string)
#1 /srv/mediawiki/php-1.24wmf21/includes/objectcache/MemcachedPeclBagOStuff.php(124): Memcached->get(string, NULL, NULL)
#2 /srv/mediawiki/php-1.24wmf21/extensions/Wikidata/extensions/Wikibase/lib/includes/store/CachingEntityRevisionLookup.php(107): MemcachedPeclBagOStuff->get(string)
#3 /srv/mediawiki/php-1.24wmf21/extensions/Wikidata/extensions/Wikibase/lib/includes/store/CachingEntityRevisionLookup.php(146): Wikibase\Lib\Store\CachingEntityRevisionLookup->getEntityRevision(Wikibase\DataModel\Entity\ItemId, integer)
#4 /srv/mediawiki/php-1.24wmf21/extensions/Wikidata/extensions/Wikibase/lib/includes/store/CachingEntityRevisionLookup.php(126): Wikibase\Lib\Store\CachingEntityRevisionLookup->fetchEntityRevision(Wikibase\DataModel\Entity\ItemId, integer)
#5 /srv/mediawiki/php-1.24wmf21/extensions/Wikidata/extensions/Wikibase/lib/includes/store/RevisionBasedEntityLookup.php(41): Wikibase\Lib\Store\CachingEntityRevisionLookup->getEntityRevision(Wikibase\DataModel\Entity\ItemId)
#6 [internal function]: Wikibase\Lib\Store\RevisionBasedEntityLookup->getEntity(Wikibase\DataModel\Entity\ItemId)
#7 /srv/mediawiki/php-1.24wmf21/extensions/Wikidata/extensions/Wikibase/lib/includes/store/EntityRedirectResolvingDecorator.php(79): call_user_func_array(array, array)
#8 /srv/mediawiki/php-1.24wmf21/extensions/Wikidata/extensions/Wikibase/lib/includes/store/RedirectResolvingEntityLookup.php(50): Wikibase\Lib\Store\EntityRedirectResolvingDecorator->__call(string, array)
#9 /srv/mediawiki/php-1.24wmf21/extensions/Wikidata/extensions/Wikibase/lib/includes/store/RedirectResolvingEntityLookup.php(50): Wikibase\Lib\Store\EntityRedirectResolvingDecorator->getEntity(Wikibase\DataModel\Entity\ItemId)
#10 /srv/mediawiki/php-1.24wmf21/extensions/Wikidata/extensions/Wikibase/client/includes/ClientSiteLinkLookup.php(110): Wikibase\Lib\Store\RedirectResolvingEntityLookup->getEntity(Wikibase\DataModel\Entity\ItemId)
#11 /srv/mediawiki/php-1.24wmf21/extensions/Wikidata/extensions/Wikibase/client/includes/ClientSiteLinkLookup.php(82): Wikibase\Client\ClientSiteLinkLookup->getItem(Title)
#12 /srv/mediawiki/php-1.24wmf21/extensions/Wikidata/extensions/Wikibase/client/includes/hooks/LanguageLinkBadgeDisplay.php(84): Wikibase\Client\ClientSiteLinkLookup->getSiteLink(Title, string)
#13 /srv/mediawiki/php-1.24wmf21/extensions/Wikidata/extensions/Wikibase/client/includes/hooks/SidebarHookHandlers.php(262): Wikibase\Client\Hooks\LanguageLinkBadgeDisplay->assignBadges(Title, Title, array)
#14 /srv/mediawiki/php-1.24wmf21/extensions/Wikidata/extensions/Wikibase/client/includes/hooks/SidebarHookHandlers.php(141): Wikibase\Client\Hooks\SidebarHookHandlers->doSkinTemplateGetLanguageLink(array, Title, Title)
#15 [internal function]: Wikibase\Client\Hooks\SidebarHookHandlers::onSkinTemplateGetLanguageLink(array, Title, Title, OutputPage)
#16 /srv/mediawiki/php-1.24wmf21/includes/Hooks.php(206): call_user_func_array(string, array)
#17 /srv/mediawiki/php-1.24wmf21/includes/GlobalFunctions.php(3984): Hooks::run(string, array, NULL)
#18 /srv/mediawiki/php-1.24wmf21/includes/skins/SkinTemplate.php(204): wfRunHooks(string, array)
#19 /srv/mediawiki/php-1.24wmf21/includes/skins/SkinTemplate.php(512): SkinTemplate->getLanguages()
#20 /srv/mediawiki/php-1.24wmf21/includes/skins/SkinTemplate.php(274): SkinTemplate->prepareQuickTemplate(OutputPage)
#21 /srv/mediawiki/php-1.24wmf21/includes/OutputPage.php(2171): SkinTemplate->outputPage()
#22 /srv/mediawiki/php-1.24wmf21/includes/MediaWiki.php(594): OutputPage->output()
#23 /srv/mediawiki/php-1.24wmf21/includes/MediaWiki.php(435): MediaWiki->main()
#24 /srv/mediawiki/php-1.24wmf21/index.php(46): MediaWiki->run()
#25 /srv/mediawiki/w/index.php(3): require(string)
#26 {main}


Version: unspecified
Severity: major

Details

Reference
bz70747

Event Timeline

bzimport raised the priority of this task from to High.
bzimport set Reference to bz70747.
bzimport added a subscriber: Unknown Object (MLST).
greg created this task.Sep 11 2014, 11:55 PM

WFM, do you have any other context?

greg added a comment.Sep 12 2014, 12:03 AM

19:59 < ori> i think this is the key:
testwikidatawiki/WBL-1.24wmf21:WikiPageEntityRevisionLookup:Q33
19:59 < ori> i'm going to delete it

test2 then came up, but test.wikipedia has this stack trace now:

Unexpected non-MediaWiki exception encountered, of type "UnexpectedValueException"
[758e9f98] /wiki/Main_Page Exception from line of : Error while unserializing
Backtrace:
#0 [internal function]: SplObjectStorage->unserialize(string)
#1 [internal function]: Memcached->getByKey(string, string, NULL, NULL)
#2 /srv/mediawiki/php-1.24wmf21/includes/objectcache/MemcachedPeclBagOStuff.php(124): Memcached->get(string, NULL, NULL)
#3 /srv/mediawiki/php-1.24wmf21/extensions/Wikidata/extensions/Wikibase/lib/includes/store/CachingEntityRevisionLookup.php(107): MemcachedPeclBagOStuff->get(string)
#4 /srv/mediawiki/php-1.24wmf21/extensions/Wikidata/extensions/Wikibase/lib/includes/store/CachingEntityRevisionLookup.php(146): Wikibase\Lib\Store\CachingEntityRevisionLookup->getEntityRevision(Wikibase\DataModel\Entity\ItemId, integer)
#5 /srv/mediawiki/php-1.24wmf21/extensions/Wikidata/extensions/Wikibase/lib/includes/store/CachingEntityRevisionLookup.php(126): Wikibase\Lib\Store\CachingEntityRevisionLookup->fetchEntityRevision(Wikibase\DataModel\Entity\ItemId, integer)
#6 /srv/mediawiki/php-1.24wmf21/extensions/Wikidata/extensions/Wikibase/lib/includes/store/RevisionBasedEntityLookup.php(41): Wikibase\Lib\Store\CachingEntityRevisionLookup->getEntityRevision(Wikibase\DataModel\Entity\ItemId)
#7 [internal function]: Wikibase\Lib\Store\RevisionBasedEntityLookup->getEntity(Wikibase\DataModel\Entity\ItemId)
#8 /srv/mediawiki/php-1.24wmf21/extensions/Wikidata/extensions/Wikibase/lib/includes/store/EntityRedirectResolvingDecorator.php(79): call_user_func_array(array, array)
#9 /srv/mediawiki/php-1.24wmf21/extensions/Wikidata/extensions/Wikibase/lib/includes/store/RedirectResolvingEntityLookup.php(50): Wikibase\Lib\Store\EntityRedirectResolvingDecorator->__call(string, array)
#10 /srv/mediawiki/php-1.24wmf21/extensions/Wikidata/extensions/Wikibase/client/includes/ClientSiteLinkLookup.php(110): Wikibase\Lib\Store\RedirectResolvingEntityLookup->getEntity(Wikibase\DataModel\Entity\ItemId)
#11 /srv/mediawiki/php-1.24wmf21/extensions/Wikidata/extensions/Wikibase/client/includes/ClientSiteLinkLookup.php(82): Wikibase\Client\ClientSiteLinkLookup->getItem(Title)
#12 /srv/mediawiki/php-1.24wmf21/extensions/Wikidata/extensions/Wikibase/client/includes/hooks/LanguageLinkBadgeDisplay.php(84): Wikibase\Client\ClientSiteLinkLookup->getSiteLink(Title, string)
#13 /srv/mediawiki/php-1.24wmf21/extensions/Wikidata/extensions/Wikibase/client/includes/hooks/SidebarHookHandlers.php(262): Wikibase\Client\Hooks\LanguageLinkBadgeDisplay->assignBadges(Title, Title, array)
#14 /srv/mediawiki/php-1.24wmf21/extensions/Wikidata/extensions/Wikibase/client/includes/hooks/SidebarHookHandlers.php(141): Wikibase\Client\Hooks\SidebarHookHandlers->doSkinTemplateGetLanguageLink(array, Title, Title)
#15 /srv/mediawiki/php-1.24wmf21/includes/Hooks.php(206): Wikibase\Client\Hooks\SidebarHookHandlers::onSkinTemplateGetLanguageLink(array, Title, Title)
#16 /srv/mediawiki/php-1.24wmf21/includes/GlobalFunctions.php(3984): Hooks::run(string, array, NULL)
#17 /srv/mediawiki/php-1.24wmf21/includes/skins/SkinTemplate.php(204): wfRunHooks(string, array)
#18 /srv/mediawiki/php-1.24wmf21/includes/skins/SkinTemplate.php(512): SkinTemplate->getLanguages()
#19 /srv/mediawiki/php-1.24wmf21/includes/skins/SkinTemplate.php(274): SkinTemplate->prepareQuickTemplate()
#20 /srv/mediawiki/php-1.24wmf21/includes/OutputPage.php(2171): SkinTemplate->outputPage()
#21 /srv/mediawiki/php-1.24wmf21/includes/MediaWiki.php(594): OutputPage->output()
#22 /srv/mediawiki/php-1.24wmf21/includes/MediaWiki.php(435): MediaWiki->main()
#23 /srv/mediawiki/php-1.24wmf21/index.php(46): MediaWiki->run()
#24 /srv/mediawiki/w/index.php(3): include(string)
#25 {main}

ori added a comment.Sep 12 2014, 12:23 AM

The unserialize method for one of the objects included in the memcached array with key "testwikidatawiki/WBL-1.24wmf21:WikiPageEntityRevisionLookup:Q33" is broken, but I'm not sure which.

ori added a comment.Sep 12 2014, 12:28 AM

Created attachment 16448
Value of "testwikidatawiki/WBL-1.24wmf21:WikiPageEntityRevisionLookup:Q33" as raw binary data

Generated using memccat:

memccat --servers=localhost:11211 "testwikidatawiki/WBL-1.24wmf21:WikiPageEntityRevisionLookup:Q33" --file=serialized_value.raw

Attached:

Change 159934 had a related patch set uploaded by Ori.livneh:
Update Wikidata to tip of master for I23b7eb54b8e

https://gerrit.wikimedia.org/r/159934

Change 159934 merged by Ori.livneh:
Update Wikidata to tip of master for I23b7eb54b8e

https://gerrit.wikimedia.org/r/159934

greg added a comment.Sep 12 2014, 12:41 AM

Reducing importance/etc as this is no longer breaking production (test wikis). But we're in a reverted state, so keeping it higher than normal so we can get wikidata back on the 1.24wmf21 train (hopefully).

greg added a comment.Sep 12 2014, 9:02 PM

Plan is to revert to a known good state on Monday morning.
https://wikitech.wikimedia.org/wiki/Deployments#Week_of_September_15th

greg added a comment.Sep 15 2014, 3:39 PM

14:13 logmsgbot: aude Started scap: Put test.wikidata back on mw1.24-wmf19 extension branch
14:50 logmsgbot: aude Finished scap: Put test.wikidata back on mw1.24-wmf19 extension branch (duration: 37m 27s)
14:54 logmsgbot: aude Synchronized wmf-config/Wikibase.php: Bump wikibase memcached key for test.wikidata, test, test2 (duration: 00m 16s)

I think we're good. Closing. If not, please re-open :)

aude added a comment.Sep 15 2014, 5:26 PM

I can easily reproduce the issues that we had on beta, and bumping the cache key we use for entities seems the solution. I think the solution is to have the cache key changed (generated in our build) for beta and then deploy to beta again.

I did reproduce this error "Error at offset 0 of 6 bytes" from test2 on vagrant/hhvm on friday but can't reproduce it now.

My guess is maybe a race condition, someone hitting the main page of test2 causing incorrect data in memcached, or possibly an issue with hhvm. I can try to reproduce some more. If I can't reproduce and beta is ok, then we try test.wikidata again (maybe next week?). If the issue happens again, I would try bumping the shared cache key again:

$wgWBRepoSettings['sharedCacheKeyPrefix'] = 'wikidatawiki/mw1.24-wmf20';

and

$wgWBClientSettings['sharedCacheKeyPrefix'] = 'wikidatawiki/mw1.24-wmf20';

anyway, we are good for now and no new code for wikidata this week. (except maybe a bug fix)

ori added a comment.Sep 30 2014, 5:11 PM
  • Bug 71461 has been marked as a duplicate of this bug. ***
hoo added a comment.Sep 30 2014, 5:36 PM

Any reason to reopen this? Should be fixed

ori added a comment.Sep 30 2014, 5:38 PM

(In reply to Marius Hoch from comment #12)

Any reason to reopen this? Should be fixed

See https://bugzilla.wikimedia.org/show_bug.cgi?id=71461

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).Dec 1 2014, 2:31 PM

What's the status on this?
Anything we still need to do or is this solved?

greg closed this task as Resolved.Jan 5 2015, 4:22 PM
greg claimed this task.

Looks resolved to me.