Page MenuHomePhabricator

MWException: `[title]` is not a valid file title.
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   MWException: `[redacted, see logstash]` is not a valid file title.
exception.trace
from /srv/mediawiki/php-1.39.0-wmf.4/includes/filerepo/file/File.php(230)
#0 /srv/mediawiki/php-1.39.0-wmf.4/includes/filerepo/LocalRepo.php(240): File::normalizeTitle(Title, string)
#1 /srv/mediawiki/php-1.39.0-wmf.4/includes/Linker.php(883): LocalRepo->checkRedirect(Title)
#2 /srv/mediawiki/php-1.39.0-wmf.4/includes/gallery/TraditionalImageGallery.php(131): Linker::makeBrokenImageLinkObj(Title, string, string, string, string, boolean, array)
#3 /srv/mediawiki/php-1.39.0-wmf.4/includes/parser/Parser.php(5224): TraditionalImageGallery->toHTML()
#4 /srv/mediawiki/php-1.39.0-wmf.4/includes/parser/CoreTagHooks.php(177): Parser->renderImageGallery(string, array)
#5 /srv/mediawiki/php-1.39.0-wmf.4/includes/parser/Parser.php(3994): CoreTagHooks::gallery(string, array, Parser, PPFrame_Hash)
#6 /srv/mediawiki/php-1.39.0-wmf.4/includes/parser/PPFrame_Hash.php(353): Parser->extensionSubstitution(array, PPFrame_Hash)
#7 /srv/mediawiki/php-1.39.0-wmf.4/includes/parser/Parser.php(2945): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#8 /srv/mediawiki/php-1.39.0-wmf.4/includes/parser/Parser.php(1582): Parser->replaceVariables(string)
#9 /srv/mediawiki/php-1.39.0-wmf.4/includes/parser/Parser.php(700): Parser->internalParse(string)
#10 /srv/mediawiki/php-1.39.0-wmf.4/includes/content/WikitextContentHandler.php(295): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#11 /srv/mediawiki/php-1.39.0-wmf.4/includes/content/ContentHandler.php(1708): WikitextContentHandler->fillParserOutput(WikitextContent, MediaWiki\Content\Renderer\ContentParseParams, ParserOutput)
#12 /srv/mediawiki/php-1.39.0-wmf.4/includes/content/Renderer/ContentRenderer.php(47): ContentHandler->getParserOutput(WikitextContent, MediaWiki\Content\Renderer\ContentParseParams)
#13 /srv/mediawiki/php-1.39.0-wmf.4/includes/Revision/RenderedRevision.php(271): MediaWiki\Content\Renderer\ContentRenderer->getParserOutput(WikitextContent, Title, integer, ParserOptions, boolean)
#14 /srv/mediawiki/php-1.39.0-wmf.4/includes/Revision/RenderedRevision.php(238): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(WikitextContent, boolean)
#15 /srv/mediawiki/php-1.39.0-wmf.4/includes/Revision/RevisionRenderer.php(221): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string, array)
#16 /srv/mediawiki/php-1.39.0-wmf.4/includes/Revision/RevisionRenderer.php(158): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)
#17 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)
#18 /srv/mediawiki/php-1.39.0-wmf.4/includes/Revision/RenderedRevision.php(200): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)
#19 /srv/mediawiki/php-1.39.0-wmf.4/includes/jobqueue/jobs/RefreshLinksJob.php(311): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput(array)
#20 /srv/mediawiki/php-1.39.0-wmf.4/includes/jobqueue/jobs/RefreshLinksJob.php(227): RefreshLinksJob->getParserOutput(MediaWiki\Revision\RevisionRenderer, ParserCache, WikiPage, BufferingStatsdDataFactory)
#21 /srv/mediawiki/php-1.39.0-wmf.4/includes/jobqueue/jobs/RefreshLinksJob.php(153): RefreshLinksJob->runForTitle(Title)
#22 /srv/mediawiki/php-1.39.0-wmf.4/extensions/EventBus/includes/JobExecutor.php(79): RefreshLinksJob->run()
#23 /srv/mediawiki/rpc/RunSingleJob.php(76): MediaWiki\Extension\EventBus\JobExecutor->execute(array)
#24 {main}
Impact
Notes

~30 of these since deploy of 1.39.0-wmf.4 (T300203) to all wikis. All on jobrunners.

I suspect this qualifies as a blocker.

Event Timeline

@Umherirrender, @Zabe - I notice rMW0f13be599b8f: file: Use File::getName instead of class property merged somewhat recently, though it's not new on today's wmf.4 - thoughts here?

I'll take a look but feel free to revert them if this is the only thing holding up the train

I haven't rolled back, so it's not technically blocking. Currently happening a few times an hour. I'll go ahead and prepare reverts just in case.

I can reproduce this locally with the following snippet,

<gallery>
Image:Gransee_Willimsky-Bartsch_WT2005.jpg|[[:de:Gransee|Gransee]]: Gedenktafel für Albert Willimsky und Paul Bartsch in der Grünstraße. 
*Inschrift: 
:'''''Albert Willimsky''' ''Geboren am 28.2.1890'' 
</gallery>
Krinkle moved this task from Untriaged to Mar 2022 on the Wikimedia-production-error board.

I agreed these are likely suspects, and both can be safely reverted I think.

They introduce new (or less conditional) calls to makeBrokenImageLinkObj from TraditionalImageGallery, which is where these fatals are coming from.

As being a new fatal, I do think it should be blocking, however.

Change 773358 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/core@master] [WIP] Broken media in galleries might not have the file namespace

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

Change 773360 had a related patch set uploaded (by Brennen Bearnes; author: Brennen Bearnes):

[mediawiki/core@master] Revert 2 media gallery changes

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

Change 773317 had a related patch set uploaded (by Brennen Bearnes; author: Brennen Bearnes):

[mediawiki/core@wmf/1.39.0-wmf.4] Revert 2 media gallery changes

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

Mentioned in SAL (#wikimedia-operations) [2022-03-23T23:34:02Z] <brennen> trainsperiment (T300203): reverting to 1.39.0-wmf.3 on all wikis for T304564; will move forward again after a fix.

Thanks for the speedy assistance. We'll go forward to all wikis with wmf.4 once the fix here has review. Keep in mind this is not an especially dire situation; the diff between wmf.3 and wmf.4 is only ~1 day of changes, and it's had quite a bit of exposure to production traffic already.

Change 773358 merged by jenkins-bot:

[mediawiki/core@master] Broken media in galleries might not have the file namespace

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

Change 773360 abandoned by Hashar:

[mediawiki/core@master] parser: Revert 2 media gallery changes

Reason:

Hotfixed by https://gerrit.wikimedia.org/r/c/mediawiki/core/+/773358

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

Change 773317 abandoned by Hashar:

[mediawiki/core@wmf/1.39.0-wmf.4] parser: Revert 2 media gallery changes

Reason:

Hotfixed by https://gerrit.wikimedia.org/r/c/mediawiki/core/+/773358

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

Change 773321 had a related patch set uploaded (by Hashar; author: Arlolra):

[mediawiki/core@wmf/1.39.0-wmf.4] Broken media in galleries might not have the file namespace

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

Change 773321 merged by jenkins-bot:

[mediawiki/core@wmf/1.39.0-wmf.4] Broken media in galleries might not have the file namespace

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

@jnuche has backported and deployed the change however 1.39.0-wmf.4 is still blocked on another task (T304559)