Page MenuHomePhabricator

Wikimedia\Assert\InvariantException: Invariant failed: Expected an about id
Open, MediumPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   Wikimedia\Assert\InvariantException: Invariant failed: Expected an about id
exception.trace
from /srv/mediawiki/php-1.37.0-wmf.17/vendor/wikimedia/assert/src/Assert.php(224)
#0 /srv/mediawiki/php-1.37.0-wmf.17/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/WrapSections.php(309): Wikimedia\Assert\Assert::invariant(boolean, string)
#1 /srv/mediawiki/php-1.37.0-wmf.17/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/WrapSections.php(328): Wikimedia\Parsoid\Wt2Html\PP\Processors\WrapSections->getDSR(array, Wikimedia\Parsoid\DOM\Compat\Element, boolean)
#2 /srv/mediawiki/php-1.37.0-wmf.17/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/WrapSections.php(328): Wikimedia\Parsoid\Wt2Html\PP\Processors\WrapSections->getDSR(array, Wikimedia\Parsoid\DOM\Compat\Element, boolean)
#3 /srv/mediawiki/php-1.37.0-wmf.17/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/WrapSections.php(328): Wikimedia\Parsoid\Wt2Html\PP\Processors\WrapSections->getDSR(array, Wikimedia\Parsoid\DOM\Compat\Element, boolean)
#4 /srv/mediawiki/php-1.37.0-wmf.17/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/WrapSections.php(538): Wikimedia\Parsoid\Wt2Html\PP\Processors\WrapSections->getDSR(array, Wikimedia\Parsoid\DOM\Compat\Element, boolean)
#5 /srv/mediawiki/php-1.37.0-wmf.17/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/WrapSections.php(587): Wikimedia\Parsoid\Wt2Html\PP\Processors\WrapSections->resolveTplExtSectionConflicts(array)
#6 /srv/mediawiki/php-1.37.0-wmf.17/vendor/wikimedia/parsoid/src/Wt2Html/DOMPostProcessor.php(158): Wikimedia\Parsoid\Wt2Html\PP\Processors\WrapSections->run(Wikimedia\Parsoid\Config\Env, Wikimedia\Parsoid\DOM\Compat\Element, array, boolean)
#7 /srv/mediawiki/php-1.37.0-wmf.17/vendor/wikimedia/parsoid/src/Wt2Html/DOMPostProcessor.php(898): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->Wikimedia\Parsoid\Wt2Html\{closure}(Wikimedia\Parsoid\DOM\Compat\Element, array, boolean)
#8 /srv/mediawiki/php-1.37.0-wmf.17/vendor/wikimedia/parsoid/src/Wt2Html/DOMPostProcessor.php(948): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->doPostProcess(Wikimedia\Parsoid\DOM\Compat\Element)
#9 /srv/mediawiki/php-1.37.0-wmf.17/vendor/wikimedia/parsoid/src/Wt2Html/DOMPostProcessor.php(965): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->process(Wikimedia\Parsoid\DOM\Compat\Element)
#10 /srv/mediawiki/php-1.37.0-wmf.17/vendor/wikimedia/parsoid/src/Wt2Html/ParserPipeline.php(178): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->processChunkily(string, array)
#11 /srv/mediawiki/php-1.37.0-wmf.17/vendor/wikimedia/parsoid/src/Wt2Html/ParserPipelineFactory.php(307): Wikimedia\Parsoid\Wt2Html\ParserPipeline->parseChunkily(string, array)
#12 /srv/mediawiki/php-1.37.0-wmf.17/vendor/wikimedia/parsoid/src/Core/WikitextContentModelHandler.php(106): Wikimedia\Parsoid\Wt2Html\ParserPipelineFactory->parse(string)
#13 /srv/mediawiki/php-1.37.0-wmf.17/vendor/wikimedia/parsoid/src/Parsoid.php(166): Wikimedia\Parsoid\Core\WikitextContentModelHandler->toDOM(Wikimedia\Parsoid\Config\Env)
#14 /srv/mediawiki/php-1.37.0-wmf.17/vendor/wikimedia/parsoid/src/Parsoid.php(198): Wikimedia\Parsoid\Parsoid->parseWikitext(MWParsoid\Config\PageConfig, array)
#15 /srv/mediawiki/php-1.37.0-wmf.17/vendor/wikimedia/parsoid/extension/src/Rest/Handler/ParsoidHandler.php(588): Wikimedia\Parsoid\Parsoid->wikitext2html(MWParsoid\Config\PageConfig, array, NULL)
#16 /srv/mediawiki/php-1.37.0-wmf.17/vendor/wikimedia/parsoid/extension/src/Rest/Handler/PageHandler.php(88): MWParsoid\Rest\Handler\ParsoidHandler->wt2html(MWParsoid\Config\PageConfig, array)
#17 /srv/mediawiki/php-1.37.0-wmf.17/includes/Rest/Router.php(403): MWParsoid\Rest\Handler\PageHandler->execute()
#18 /srv/mediawiki/php-1.37.0-wmf.17/includes/Rest/Router.php(330): MediaWiki\Rest\Router->executeHandler(MWParsoid\Rest\Handler\PageHandler)
#19 /srv/mediawiki/php-1.37.0-wmf.17/includes/Rest/EntryPoint.php(165): MediaWiki\Rest\Router->execute(MediaWiki\Rest\RequestFromGlobals)
#20 /srv/mediawiki/php-1.37.0-wmf.17/includes/Rest/EntryPoint.php(130): MediaWiki\Rest\EntryPoint->execute()
#21 /srv/mediawiki/php-1.37.0-wmf.17/rest.php(31): MediaWiki\Rest\EntryPoint::main()
#22 /srv/mediawiki/w/rest.php(3): require(string)
#23 {main}
Impact
  • Happened on both French and Central Kurdish Wikipedias, seems like the request is being tried a few times. Impact unclear
Notes

frwiki url: /w/rest.php/fr.wikipedia.org/v3/page/pagebundle/Mod%C3%A8le%3A2autres%2FDocumentation/158636737
ckbwiki url: /w/rest.php/ckb.wikipedia.org/v3/page/pagebundle/%D8%AF%D8%A7%DA%95%DB%8E%DA%98%DB%95%3AInfobox_UNESCO_World_Heritage_Site%2Fdoc/674095

Details

Request URL
https://ckb.wikipedia.org/w/rest.php/ckb.wikipedia.org/v3/page/pagebundle/*infobox*/674095

Event Timeline

I expect this is an edge case unless you see a large volume of these that persist beyond the localized spurt on some pages.

I expect this is an edge case unless you see a large volume of these that persist beyond the localized spurt on some pages.

Not a large number of these currently

Arlolra triaged this task as Medium priority.Aug 13 2021, 6:35 PM
Arlolra moved this task from Needs Triage to Bugs & Crashers on the Parsoid board.

This is low frequency but persistent.

Aha .. templatedata generates <section> tags itself ( https://gerrit.wikimedia.org/r/c/mediawiki/extensions/TemplateData/+/704080 ) which probably interferes with section wrapping code. Might have to harden assumptions in the code.

Change 733044 had a related patch set uploaded (by Subramanya Sastry; author: Subramanya Sastry):

[mediawiki/services/parsoid@master] WrapSections: Don't get tripped by <section> tags found in content

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

Change 733044 merged by jenkins-bot:

[mediawiki/services/parsoid@master] WrapSections: Don't get tripped by <section> tags found in content

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

Change 734972 had a related patch set uploaded (by Subramanya Sastry; author: Subramanya Sastry):

[mediawiki/vendor@master] Bump remex-html to 3.0.0 and parsoid to 0.15.0-a6

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

Change 734972 merged by jenkins-bot:

[mediawiki/vendor@master] Bump remex-html to 3.0.0 and parsoid to 0.15.0-a6

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