Page MenuHomePhabricator

LogicException: Process cache for 'en-screenshot' should be set by now (from MessageCache)
Closed, DuplicatePublicPRODUCTION ERROR

Description

Error

MediaWiki version: 1.36.0-wmf.33

message
LogicException: Process cache for 'en-screenshot' should be set by now.
exception.trace
from /srv/mediawiki/php-1.36.0-wmf.33/includes/cache/MessageCache.php(409)
#0 /srv/mediawiki/php-1.36.0-wmf.33/includes/cache/MessageCache.php(1096): MessageCache->load(string)
#1 /srv/mediawiki/php-1.36.0-wmf.33/includes/cache/MessageCache.php(1023): MessageCache->getMsgFromNamespace(string, string)
#2 /srv/mediawiki/php-1.36.0-wmf.33/includes/cache/MessageCache.php(993): MessageCache->getMessageForLang(Language, string, boolean, array)
#3 /srv/mediawiki/php-1.36.0-wmf.33/includes/cache/MessageCache.php(935): MessageCache->getMessageFromFallbackChain(Language, string, boolean)
#4 /srv/mediawiki/php-1.36.0-wmf.33/includes/language/Message.php(1294): MessageCache->get(string, boolean, Language)
#5 /srv/mediawiki/php-1.36.0-wmf.33/includes/language/Message.php(991): Message->fetchMessage()
#6 /srv/mediawiki/php-1.36.0-wmf.33/includes/resourceloader/MessageBlobStore.php(208): Message->exists()
#7 /srv/mediawiki/php-1.36.0-wmf.33/includes/resourceloader/MessageBlobStore.php(230): MessageBlobStore->fetchMessage(string, string)
#8 /srv/mediawiki/php-1.36.0-wmf.33/includes/resourceloader/MessageBlobStore.php(151): MessageBlobStore->generateMessageBlob(ResourceLoaderSkinModule, string)
#9 /srv/mediawiki/php-1.36.0-wmf.33/includes/resourceloader/MessageBlobStore.php(120): MessageBlobStore->recacheMessageBlob(string, ResourceLoaderSkinModule, string)
#10 /srv/mediawiki/php-1.36.0-wmf.33/includes/resourceloader/ResourceLoader.php(159): MessageBlobStore->getBlobs(array, string)
#11 /srv/mediawiki/php-1.36.0-wmf.33/includes/resourceloader/ResourceLoaderStartUpModule.php(172): ResourceLoader->preloadModuleInfo(array, ResourceLoaderContext)
#12 /srv/mediawiki/php-1.36.0-wmf.33/includes/resourceloader/ResourceLoaderStartUpModule.php(405): ResourceLoaderStartUpModule->getModuleRegistrations(ResourceLoaderContext)
#13 /srv/mediawiki/php-1.36.0-wmf.33/includes/resourceloader/ResourceLoaderModule.php(739): ResourceLoaderStartUpModule->getScript(ResourceLoaderContext)
#14 /srv/mediawiki/php-1.36.0-wmf.33/includes/resourceloader/ResourceLoaderModule.php(707): ResourceLoaderModule->buildContent(ResourceLoaderContext)
#15 /srv/mediawiki/php-1.36.0-wmf.33/includes/resourceloader/ResourceLoaderModule.php(842): ResourceLoaderModule->getModuleContent(ResourceLoaderContext)
#16 /srv/mediawiki/php-1.36.0-wmf.33/includes/resourceloader/ResourceLoader.php(776): ResourceLoaderModule->getVersionHash(ResourceLoaderContext)
#17 [internal function]: ResourceLoader->{closure}(string)
#18 /srv/mediawiki/php-1.36.0-wmf.33/includes/resourceloader/ResourceLoader.php(788): array_map(Closure, array)
#19 /srv/mediawiki/php-1.36.0-wmf.33/includes/resourceloader/ResourceLoader.php(875): ResourceLoader->getCombinedVersion(ResourceLoaderContext, array)
#20 /srv/mediawiki/php-1.36.0-wmf.33/load.php(51): ResourceLoader->respond(ResourceLoaderContext)
#21 /srv/mediawiki/php-1.36.0-wmf.33/load.php(38): wfLoadMain()
#22 /srv/mediawiki/w/load.php(3): require(string)
#23 {main}

Impact

Only a few occurences for now. Not making it a train blocker unless it starts happening more. However, it looks like a logic error, thus a bug.

Notes

Details

Request ID
YEDtKGCHx4EZVGsVMBBi9gAAAFQ
Request URL
https://en.wikipedia.org/w/load.php?lang=en-screenshot&modules=startup&only=scripts&raw=1&skin=vector

Event Timeline

https://gerrit.wikimedia.org/g/mediawiki/core/+/78c1095d35bb3faf33786eadfe1717ccd141bf0e/includes/cache/MessageCache.php#408

		if ( !$this->isLanguageLoaded( $code ) ) { // sanity
			throw new LogicException( "Process cache for '$code' should be set by now." );
		}

Added with https://gerrit.wikimedia.org/r/c/mediawiki/core/+/441842 to limit the language cache to 5 and modified a bit by https://gerrit.wikimedia.org/r/c/mediawiki/core/+/539215

lang=en-screenshot is not a valid language and loaded by uselang= on the index.php request.
Maybe the cache set does not work due to error in cache? But than the cache should throw and not ignore or process after the set (MapCacheLRU::set never throws, but there is no reason to do, because it only an array as class property)

Krinkle renamed this task from Process cache for 'en-screenshot' should be set by now. to LogicException: Process cache for 'en-screenshot' should be set by now (from MessageCache).Mar 10 2021, 2:11 AM
Krinkle updated the task description. (Show Details)
Krinkle edited Stack Trace. (Show Details)