Page MenuHomePhabricator

[hhvm] MemcachedPeclBagOStuff.php: Error at offset 0 of 6 bytes
Closed, DuplicatePublic

Description

There is an inconsistency in how hhvm handles / [de]serializes items (specifically statements) vs. php5.

We have test.wikidata on hhvm only

We have test2.wikipedia which has hhvm as a beta feature, so you can have hhvm or not.

If I use the property parser function on a connected page, then the entity is loaded via CachingEntityRevisionLookup (memcached).

If I am using hhvm, then it works. If I use php5 then I get a stacktrace.

If I remove the statements from the associated item, then then no stacktrace on the test2 page.

Unexpected non-MediaWiki exception encountered, of type "UnexpectedValueException"
[b084b1ad] /wiki/Kitten Exception from line 124 of /srv/mediawiki/php-1.25wmf1/includes/objectcache/MemcachedPeclBagOStuff.php: Error at offset 0 of 6 bytes
Backtrace:
#0 [internal function]: SplObjectStorage->unserialize(string)
#1 /srv/mediawiki/php-1.25wmf1/includes/objectcache/MemcachedPeclBagOStuff.php(124): Memcached->get(string, NULL, NULL)
#2 /srv/mediawiki/php-1.25wmf1/extensions/Wikidata/extensions/Wikibase/lib/includes/store/CachingEntityRevisionLookup.php(107): MemcachedPeclBagOStuff->get(string)
#3 /srv/mediawiki/php-1.25wmf1/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.25wmf1/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.25wmf1/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.25wmf1/extensions/Wikidata/extensions/Wikibase/lib/includes/store/EntityRedirectResolvingDecorator.php(79): call_user_func_array(array, array)
#8 /srv/mediawiki/php-1.25wmf1/extensions/Wikidata/extensions/Wikibase/lib/includes/store/RedirectResolvingEntityLookup.php(50): Wikibase\Lib\Store\EntityRedirectResolvingDecorator->__call(string, array)
#9 /srv/mediawiki/php-1.25wmf1/extensions/Wikidata/extensions/Wikibase/lib/includes/store/RedirectResolvingEntityLookup.php(50): Wikibase\Lib\Store\EntityRedirectResolvingDecorator->getEntity(Wikibase\DataModel\Entity\ItemId)
#10 /srv/mediawiki/php-1.25wmf1/extensions/Wikidata/extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/SnaksFinder.php(55): Wikibase\Lib\Store\RedirectResolvingEntityLookup->getEntity(Wikibase\DataModel\Entity\ItemId)
#11 /srv/mediawiki/php-1.25wmf1/extensions/Wikidata/extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php(107): Wikibase\DataAccess\PropertyParserFunction\SnaksFinder->findSnaks(Wikibase\DataModel\Entity\ItemId, string, string)
#12 /srv/mediawiki/php-1.25wmf1/extensions/Wikidata/extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php(49): Wikibase\DataAccess\PropertyParserFunction\LanguageAwareRenderer->getStatus(Wikibase\DataModel\Entity\ItemId, string)
#13 /srv/mediawiki/php-1.25wmf1/extensions/Wikidata/extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/Runner.php(73): Wikibase\DataAccess\PropertyParserFunction\LanguageAwareRenderer->render(Wikibase\DataModel\Entity\ItemId, string)
#14 /srv/mediawiki/php-1.25wmf1/extensions/Wikidata/extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/Runner.php(120): Wikibase\DataAccess\PropertyParserFunction\Runner->runPropertyParserFunction(Parser, string)
#15 /srv/mediawiki/php-1.25wmf1/extensions/Wikidata/extensions/Wikibase/client/includes/hooks/ParserFunctionRegistrant.php(46): Wikibase\DataAccess\PropertyParserFunction\Runner::render(Parser, string)
#16 [internal function]: Wikibase\Client\Hooks\{closure}(Parser, string)
#17 /srv/mediawiki/php-1.25wmf1/includes/parser/Parser.php(3768): call_user_func_array(Closure, array)
#18 /srv/mediawiki/php-1.25wmf1/includes/parser/Parser.php(3486): Parser->callParserFunction(PPFrame_DOM, string, array)
#19 /srv/mediawiki/php-1.25wmf1/includes/parser/Preprocessor_DOM.php(1179): Parser->braceSubstitution(array, PPFrame_DOM)
#20 /srv/mediawiki/php-1.25wmf1/includes/parser/Parser.php(3296): PPFrame_DOM->expand(PPNode_DOM, integer)
#21 /srv/mediawiki/php-1.25wmf1/includes/parser/Parser.php(1254): Parser->replaceVariables(string)
#22 /srv/mediawiki/php-1.25wmf1/includes/parser/Parser.php(420): Parser->internalParse(string)
#23 /srv/mediawiki/php-1.25wmf1/includes/content/WikitextContent.php(338): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#24 /srv/mediawiki/php-1.25wmf1/includes/content/AbstractContent.php(490): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
#25 /srv/mediawiki/php-1.25wmf1/includes/poolcounter/PoolWorkArticleView.php(139): AbstractContent->getParserOutput(Title, integer, ParserOptions)
#26 /srv/mediawiki/php-1.25wmf1/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork()
#27 /srv/mediawiki/php-1.25wmf1/includes/page/Article.php(688): PoolCounterWork->execute()
#28 /srv/mediawiki/php-1.25wmf1/includes/actions/ViewAction.php(44): Article->view()
#29 /srv/mediawiki/php-1.25wmf1/includes/MediaWiki.php(414): ViewAction->show()
#30 /srv/mediawiki/php-1.25wmf1/includes/MediaWiki.php(282): MediaWiki->performAction(Article, Title)
#31 /srv/mediawiki/php-1.25wmf1/includes/MediaWiki.php(584): MediaWiki->performRequest()
#32 /srv/mediawiki/php-1.25wmf1/includes/MediaWiki.php(435): MediaWiki->main()
#33 /srv/mediawiki/php-1.25wmf1/index.php(46): MediaWiki->run()
#34 /srv/mediawiki/w/index.php(3): require(string)


Version: unspecified
Severity: normal

Details

Reference
bz71461

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:50 AM
bzimport set Reference to bz71461.
bzimport added a subscriber: Unknown Object (MLST).
aude created this task.Sep 30 2014, 10:08 AM
aude added a comment.Sep 30 2014, 10:09 AM

also, this was not a problem before we switched to DataModel 1.0

We actually put full EntityRevision objects into memcached, including the contained Entity objects. I can very well imagine that hhvm's implementation of "native" object serialization differs from vanilla php's.

For further analysis, it would be useful to get our hands on the actual blob.

However, I fear native serialization will remain a problem if fundamentally different versions of php keep sharing a memcached instance. This may mean we have to serialize/unserialize explicitly.

Change 163842 had a related patch set uploaded by Hoo man:
Split Wikibase's entity cache for HHVM/Zend

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

Change 163842 merged by jenkins-bot:
Split Wikibase's entity cache for HHVM/Zend

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

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

Dupe of 70747, which contains an actual blob, too.

  • This bug has been marked as a duplicate of bug 70747 ***
Restricted Application added a project: Wikidata. · View Herald TranscriptJul 3 2018, 1:59 AM