Page MenuHomePhabricator

Circular dependency when creating service!
Closed, DuplicatePublic

Description

Setup

  • MediaWiki 1.34.0-rc.0 (366bf66) 22:03, 15 October 2019
  • PHP 7.2.19-0ubuntu0.18.04.2 (apache2handler)
  • MariaDB 10.1.41-MariaDB-0ubuntu0.18.04.1
  • Gadgets 1cefbf1 16 September 2019

Issue
After updating the wiki from MW 1.33.1 to MW 1.34.0-rc.0 I am getting this error.

[1cf72c35fd8dbdb7077532d5] /wiki/Main_Page RuntimeException from line 448 of /../w/includes/libs/services/ServiceContainer.php: Circular dependency when creating service! ContentLanguage -> ResourceLoader -> RevisionLookup -> RevisionStore -> RevisionStoreFactory -> BlobStoreFactory -> ContentLanguage

Backtrace

#0 /../w/includes/libs/services/ServiceContainer.php(427): Wikimedia\Services\ServiceContainer->createService(string)
#1 /../w/includes/MediaWikiServices.php(540): Wikimedia\Services\ServiceContainer->getService(string)
#2 /../w/includes/ServiceWiring.php(113): MediaWiki\MediaWikiServices->getContentLanguage()
#3 /../w/includes/libs/services/ServiceContainer.php(458): Wikimedia\Services\ServiceContainer->{closure}(MediaWiki\MediaWikiServices)
#4 /../w/includes/libs/services/ServiceContainer.php(427): Wikimedia\Services\ServiceContainer->createService(string)
#5 /../w/includes/MediaWikiServices.php(459): Wikimedia\Services\ServiceContainer->getService(string)
#6 /../w/includes/ServiceWiring.php(714): MediaWiki\MediaWikiServices->getBlobStoreFactory()
#7 /../w/includes/libs/services/ServiceContainer.php(458): Wikimedia\Services\ServiceContainer->{closure}(MediaWiki\MediaWikiServices)
#8 /../w/includes/libs/services/ServiceContainer.php(427): Wikimedia\Services\ServiceContainer->createService(string)
#9 /../w/includes/MediaWikiServices.php(941): Wikimedia\Services\ServiceContainer->getService(string)
#10 /../w/includes/ServiceWiring.php(707): MediaWiki\MediaWikiServices->getRevisionStoreFactory()
#11 /../w/includes/libs/services/ServiceContainer.php(458): Wikimedia\Services\ServiceContainer->{closure}(MediaWiki\MediaWikiServices)
#12 /../w/includes/libs/services/ServiceContainer.php(427): Wikimedia\Services\ServiceContainer->createService(string)
#13 /../w/includes/MediaWikiServices.php(933): Wikimedia\Services\ServiceContainer->getService(string)
#14 /../w/includes/ServiceWiring.php(693): MediaWiki\MediaWikiServices->getRevisionStore()
#15 /../w/includes/libs/services/ServiceContainer.php(458): Wikimedia\Services\ServiceContainer->{closure}(MediaWiki\MediaWikiServices)
#16 /../w/includes/libs/services/ServiceContainer.php(427): Wikimedia\Services\ServiceContainer->createService(string)
#17 /../w/includes/MediaWikiServices.php(917): Wikimedia\Services\ServiceContainer->getService(string)
#18 /../w/includes/Revision.php(76): MediaWiki\MediaWikiServices->getRevisionLookup()
#19 /../w/includes/Revision.php(139): Revision::getRevisionLookup()
#20 /../w/extensions/Gadgets/includes/MediaWikiGadgetsDefinitionRepo.php(139): Revision::newFromTitle(Title)
#21 /../w/extensions/Gadgets/includes/MediaWikiGadgetsDefinitionRepo.php(108): MediaWikiGadgetsDefinitionRepo->fetchStructuredList()
#22 /../w/includes/libs/objectcache/wancache/WANObjectCache.php(1424): MediaWikiGadgetsDefinitionRepo->{closure}(boolean, integer, array, NULL)
#23 /../w/includes/libs/objectcache/wancache/WANObjectCache.php(1278): WANObjectCache->fetchOrRegenerate(string, integer, Closure, array)
#24 /../w/extensions/Gadgets/includes/MediaWikiGadgetsDefinitionRepo.php(115): WANObjectCache->getWithSetCallback(string, integer, Closure, array)
#25 /../w/extensions/Gadgets/includes/MediaWikiGadgetsDefinitionRepo.php(31): MediaWikiGadgetsDefinitionRepo->loadGadgets()
#26 /../w/extensions/Gadgets/includes/GadgetHooks.php(134): MediaWikiGadgetsDefinitionRepo->getGadgetIds()
#27 /../w/includes/Hooks.php(174): GadgetHooks::registerModules(ResourceLoader)
#28 /../w/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#29 /../w/includes/ServiceWiring.php(679): Hooks::run(string, array)
#30 /../w/includes/libs/services/ServiceContainer.php(458): Wikimedia\Services\ServiceContainer->{closure}(MediaWiki\MediaWikiServices)
#31 /../w/includes/libs/services/ServiceContainer.php(427): Wikimedia\Services\ServiceContainer->createService(string)
#32 /../w/includes/MediaWikiServices.php(901): Wikimedia\Services\ServiceContainer->getService(string)
#33 /../w/includes/ServiceWiring.php(323): MediaWiki\MediaWikiServices->getResourceLoader()
#34 /../w/includes/cache/localisation/LocalisationCache.php(1049): Wikimedia\Services\ServiceContainer->{closure}()
#35 /../w/includes/cache/localisation/LocalisationCache.php(489): LocalisationCache->recache(string)
#36 /../w/includes/cache/localisation/LocalisationCache.php(363): LocalisationCache->initLanguage(string)
#37 /../w/includes/cache/localisation/LocalisationCache.php(304): LocalisationCache->loadItem(string, string)
#38 /../w/languages/Language.php(4413): LocalisationCache->getItem(string, string)
#39 /../w/languages/Language.php(265): Language::getFallbacksFor(string)
#40 /../w/languages/Language.php(225): Language::newFromCode(string)
#41 /../w/includes/ServiceWiring.php(164): Language::factory(string)
#42 /../w/includes/libs/services/ServiceContainer.php(458): Wikimedia\Services\ServiceContainer->{closure}(MediaWiki\MediaWikiServices)
#43 /../w/includes/libs/services/ServiceContainer.php(427): Wikimedia\Services\ServiceContainer->createService(string)
#44 /../w/includes/MediaWikiServices.php(540): Wikimedia\Services\ServiceContainer->getService(string)
#45 /../w/includes/Setup.php(791): MediaWiki\MediaWikiServices->getContentLanguage()
#46 /../w/includes/WebStart.php(81): require_once(string)
#47 /../w/index.php(41): require(string)
#48 {main}

Note
After moving on to master, i.e. ed181c2 the error goes away. Thus a fix must have been authored but not back-ported to REL1_34.

Event Timeline

After moving on to master, i.e. ed181c2 the error goes away. Thus a fix must have been authored but not back-ported to REL1_34.

Actually it does not. This error randomly appears when loading the wiki. This extension is broken for REL1_34 and all further changes do not help the cause.