Page MenuHomePhabricator

Fatal: Class 'MessageIndexException' not found
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error message
Fatal error: Class 'MessageIndexException' not found
Stack Trace
#0 /srv/mediawiki/php-1.35.0-wmf.34/extensions/Translate/utils/MessageIndexRebuildJob.php(47): MessageIndex->rebuild(double)
#1 /srv/mediawiki/php-1.35.0-wmf.34/extensions/Translate/utils/MessageHandle.php(182): MessageIndexRebuildJob->run()
#2 /srv/mediawiki/php-1.35.0-wmf.34/extensions/Translate/ttmserver/ElasticSearchTTMServer.php(248): MessageHandle->isValid()
#3 /srv/mediawiki/php-1.35.0-wmf.34/extensions/Translate/ttmserver/TTMServerMessageUpdateJob.php(308): ElasticSearchTTMServer->update(MessageHandle, NULL)
#4 /srv/mediawiki/php-1.35.0-wmf.34/extensions/Translate/ttmserver/TTMServerMessageUpdateJob.php(257): TTMServerMessageUpdateJob->updateItem(ElasticSearchTTMServer, MessageHandle, NULL, boolean)
#5 /srv/mediawiki/php-1.35.0-wmf.34/extensions/Translate/ttmserver/TTMServerMessageUpdateJob.php(157): TTMServerMessageUpdateJob->runCommand(ElasticSearchTTMServer)
#6 /srv/mediawiki/php-1.35.0-wmf.34/extensions/Translate/ttmserver/TTMServerMessageUpdateJob.php(115): TTMServerMessageUpdateJob->runCommandWithRetry(string)
#7 /srv/mediawiki/php-1.35.0-wmf.34/extensions/EventBus/includes/JobExecutor.php(80): TTMServerMessageUpdateJob->run()
#8 /srv/mediawiki/rpc/RunSingleJob.php(76): MediaWiki\Extension\EventBus\JobExecutor->execute(array)
#9 {main}
Impact

An uncommon code path fails with a fatal error due to missing autoloader entry. With the autoloader entry it will throw an exception that may or not be caught by the job queue. Some secondary data (translation memory, etc.) may get out of date (but that would be the case regardless).

Notes

This was caused by recent work in T221119: "This namespace is reserved for content page translations" when trying to translate a recently created translation unit and there is a follow-up patch to address the root causes.

Event Timeline

Krinkle created this task.May 27 2020, 12:43 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 27 2020, 12:43 PM

I believe that there is no significant impact. Previously it would fail a bit later due to uncaught exception. The stack trace looks curious though, I will investigate.

Change 599013 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/Translate@master] Add forgotten autoload entry for MessageIndexException

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

Looks like these are coming from MediaWiki.org.

		// Do another check that the group actually exists
		$group = $this->getGroup();
		if ( !$group ) {
			$warning = "MessageIndex is out of date – refers to unknown group {$groups[0]}. ";
			$warning .= 'Doing a rebuild.';
			wfWarn( $warning );
			MessageIndexRebuildJob::newJob()->run();

			return false;
		}

I don't see that message in Logstash. @Krinkle any idea if wfWarn output is logged anywhere? Hard to debug without.

I think they are logged on debug level, so probably not in logstash. The logs on mwlog seem only go about 6 hours back currently so not possible to find there either.

I guess I will make it a proper log item that goes to Logstash.

DannyS712 triaged this task as Unbreak Now! priority.May 27 2020, 1:30 PM
DannyS712 added a subscriber: DannyS712.

As a train blocker

Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptMay 27 2020, 1:30 PM

Change 599027 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/Translate@wmf/1.35.0-wmf.34] Add forgotten autoload entry for MessageIndexException

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

Change 599013 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Add forgotten autoload entry for MessageIndexException

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

Nikerabbit updated the task description. (Show Details)May 27 2020, 3:23 PM

@Nikerabbit: Sure I can deploy it

Change 599027 merged by jenkins-bot:
[mediawiki/extensions/Translate@wmf/1.35.0-wmf.34] Add forgotten autoload entry for MessageIndexException

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

Mentioned in SAL (#wikimedia-operations) [2020-05-27T17:32:25Z] <twentyafterfour@deploy1001> Synchronized php-1.35.0-wmf.34/extensions/Translate/: Deploy https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Translate/+/599027/ to wmf.34 refs T253748 and T253022 (duration: 01m 07s)

thcipriani closed this task as Resolved.May 27 2020, 6:07 PM
thcipriani assigned this task to Nikerabbit.
thcipriani added a subscriber: thcipriani.

Mentioned in SAL (#wikimedia-operations) [2020-05-27T17:32:25Z] <twentyafterfour@deploy1001> Synchronized php-1.35.0-wmf.34/extensions/Translate/: Deploy https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Translate/+/599027/ to wmf.34 refs T253748 and T253022 (duration: 01m 07s)

Deployed, not currently seen in logstash, may reopen if it recurs