Page MenuHomePhabricator

PostconditionException: "Postcondition failed: Revision had no page" (in DiscussionTools)
Open, Needs TriagePublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   Wikimedia\Assert\PostconditionException: Postcondition failed: Revision had no page
exception.trace
from /srv/mediawiki/php-1.40.0-wmf.8/vendor/wikimedia/assert/src/Assert.php(203)
#0 /srv/mediawiki/php-1.40.0-wmf.8/extensions/DiscussionTools/includes/Hooks/HookUtils.php(135): Wikimedia\Assert\Assert::postcondition(boolean, string)
#1 /srv/mediawiki/php-1.40.0-wmf.8/extensions/DiscussionTools/includes/Hooks/DataUpdatesHooks.php(50): MediaWiki\Extension\DiscussionTools\Hooks\HookUtils::parseRevisionParsoidHtml(MediaWiki\Revision\RevisionStoreRecord)
#2 /srv/mediawiki/php-1.40.0-wmf.8/includes/deferred/MWCallableUpdate.php(38): MediaWiki\Extension\DiscussionTools\Hooks\DataUpdatesHooks->MediaWiki\Extension\DiscussionTools\Hooks\{closure}()
#3 /srv/mediawiki/php-1.40.0-wmf.8/includes/deferred/DeferredUpdates.php(474): MWCallableUpdate->doUpdate()
#4 /srv/mediawiki/php-1.40.0-wmf.8/includes/deferred/RefreshSecondaryDataUpdate.php(103): DeferredUpdates::attemptUpdate(MWCallableUpdate, Wikimedia\Rdbms\LBFactoryMulti)
#5 /srv/mediawiki/php-1.40.0-wmf.8/includes/deferred/DeferredUpdates.php(474): RefreshSecondaryDataUpdate->doUpdate()
#6 /srv/mediawiki/php-1.40.0-wmf.8/includes/Storage/DerivedPageDataUpdater.php(1801): DeferredUpdates::attemptUpdate(RefreshSecondaryDataUpdate, Wikimedia\Rdbms\LBFactoryMulti)
#7 /srv/mediawiki/php-1.40.0-wmf.8/includes/page/WikiPage.php(2136): MediaWiki\Storage\DerivedPageDataUpdater->doSecondaryDataUpdates(array)
#8 /srv/mediawiki/php-1.40.0-wmf.8/includes/jobqueue/jobs/RefreshLinksJob.php(243): WikiPage->doSecondaryDataUpdates(array)
#9 /srv/mediawiki/php-1.40.0-wmf.8/includes/jobqueue/jobs/RefreshLinksJob.php(152): RefreshLinksJob->runForTitle(Title)
#10 /srv/mediawiki/php-1.40.0-wmf.8/extensions/EventBus/includes/JobExecutor.php(79): RefreshLinksJob->run()
#11 /srv/mediawiki/rpc/RunSingleJob.php(77): MediaWiki\Extension\EventBus\JobExecutor->execute(array)
#12 {main}
Impact
Notes

Noticed one of these in recent logs.

Details

Request URL
https://jobrunner.discovery.wmnet/rpc/RunSingleJob.php

Event Timeline

Krinkle renamed this task from Wikimedia\Assert\PostconditionException: Postcondition failed: Revision had no page to PostconditionException: "Postcondition failed: Revision had no page" (in DiscussionTools).Nov 17 2022, 4:55 PM
Krinkle moved this task from Untriaged to Nov 2022 on the Wikimedia-production-error board.
Krinkle added a project: Editing-team.

Looks very rare, 5 occurrences in last 30 days: https://logstash.wikimedia.org/goto/e31cf3adaed983402761ca72828239e3

We've had this problem previously, where it was caused by some core code reading from replica instead of master: T289717. The rate of errors was much higher when that happened, though.

Or maybe someone has actually deleted the page while our code was trying to process it, the rate is low enough that it could be just that.