Page MenuHomePhabricator

Argument 2 passed to Wikibase\Repo\Store\TypeDispatchingEntityTitleStoreLookup::__construct() must be an instance of Wikibase\Repo\Store\EntityTitleStoreLookup, instance of Wikibase\Repo\Content\EntityContentFactory given
Closed, DuplicatePublicPRODUCTION ERROR

Description

Error

MediaWiki version: 1.36.0-wmf.11

message
Argument 2 passed to Wikibase\Repo\Store\TypeDispatchingEntityTitleStoreLookup::__construct() must be an instance of Wikibase\Repo\Store\EntityTitleStoreLookup, instance of Wikibase\Repo\Content\EntityContentFactory given, called in /srv/mediawiki/php-1.36.0-wmf.11/extensions/Wikibase/repo/includes/WikibaseRepo.php on line 799

Impact

Large number of production errors on group1 for 1.36.0-wmf.11

Notes

Details

Request ID
118471cf-659b-4f52-af73-e9bc7be3cc87
Request URL
https://www.wikidata.org/w/api.php?action=wbgetentities&format=json&formatversion=2&languages=en&props=aliases|info|claims|descriptions|labels|sitelinks&redirects=yes&sites=enwiki&titles=Bloomberg_L.P.
Stack Trace
exception.trace
#0 /srv/mediawiki/php-1.36.0-wmf.11/extensions/Wikibase/repo/includes/WikibaseRepo.php(799): Wikibase\Repo\Store\TypeDispatchingEntityTitleStoreLookup->__construct(array, Wikibase\Repo\Content\EntityContentFactory)
#1 /srv/mediawiki/php-1.36.0-wmf.11/extensions/Wikibase/repo/includes/WikibaseRepo.php(2053): Wikibase\Repo\WikibaseRepo->getEntityTitleLookup()
#2 /srv/mediawiki/php-1.36.0-wmf.11/extensions/Wikibase/repo/includes/Api/GetEntities.php(130): Wikibase\Repo\WikibaseRepo->getApiHelperFactory(DerivativeContext)
#3 /srv/mediawiki/php-1.36.0-wmf.11/vendor/wikimedia/object-factory/src/ObjectFactory.php(172): Wikibase\Repo\Api\GetEntities::factory(ApiMain, string, BufferingStatsdDataFactory)
#4 /srv/mediawiki/php-1.36.0-wmf.11/vendor/wikimedia/object-factory/src/ObjectFactory.php(102): Wikimedia\ObjectFactory::getObjectFromSpec(array, array)
#5 /srv/mediawiki/php-1.36.0-wmf.11/includes/api/ApiModuleManager.php(183): Wikimedia\ObjectFactory->createObject(array, array)
#6 /srv/mediawiki/php-1.36.0-wmf.11/includes/api/ApiModuleManager.php(155): ApiModuleManager->instantiateModule(string, array)
#7 /srv/mediawiki/php-1.36.0-wmf.11/includes/api/ApiMain.php(1147): ApiModuleManager->getModule(string, string)
#8 /srv/mediawiki/php-1.36.0-wmf.11/includes/api/ApiMain.php(1544): ApiMain->setupModule()
#9 /srv/mediawiki/php-1.36.0-wmf.11/includes/api/ApiMain.php(545): ApiMain->executeAction()
#10 /srv/mediawiki/php-1.36.0-wmf.11/includes/api/ApiMain.php(516): ApiMain->executeActionWithErrorHandling()
#11 /srv/mediawiki/php-1.36.0-wmf.11/api.php(90): ApiMain->execute()
#12 /srv/mediawiki/php-1.36.0-wmf.11/api.php(45): wfApiMain()
#13 /srv/mediawiki/w/api.php(3): require(string)
#14 {main}

Event Timeline

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

Strange error… as far as I can tell, EntityContentFactory does implement EntityTitleStoreLookup, and the affected files haven’t been touched in a while. (The namespaces all look correct, too.)

My best guess is that this was the same opcache corruption that caused T264241: Class 'LathMathML' not found (now marked as duplicate of T245183: PHP7 corruption reports in 2020-2022 (Call on wrong object, etc.))?

I don’t mean to rule out other explanations if anyone has ideas, but I can’t think of any.

Ping @CDanis who might be able to help judge this.

We can also try to roll train forward, and reset php-fpm if the exception occurs again at a subset of appservers?

As Lucas wrote, EntityContentFactory implements EntityTitleStoreLookup for quite a while. Not sure the cause is in the code base.

How often, for how long, and on how many different servers did we see this error?

It was showing up a bunch but I think it was probably opcache corruption. I filed this before I realized we had an opcache issue.

Exactly on one server, mw2356, and it stopped when we restarted php-fpm.