Page MenuHomePhabricator

Burst of "InvalidArgumentException: The given page ([page]) does not belong to page ID [id] but actually belongs to [id]" after 1.42.0-wmf.18 to group1
Open, LowPublicPRODUCTION ERROR

Description

Error
labels.normalized_message
[{reqId}] {exception_url}   InvalidArgumentException: The given page ([page]) does not belong to page ID [id] but actually belongs to [id]
error.stack_trace
from /srv/mediawiki/php-1.42.0-wmf.18/includes/Revision/RevisionStoreRecord.php(95)
#0 /srv/mediawiki/php-1.42.0-wmf.18/includes/Revision/RevisionStore.php(1808): MediaWiki\Revision\RevisionStoreRecord->__construct(MediaWiki\Page\PageStoreRecord, MediaWiki\User\UserIdentityValue, MediaWiki\CommentStore\CommentStoreComment, stdClass, MediaWiki\Revision\RevisionSlots, boolean)
#1 /srv/mediawiki/php-1.42.0-wmf.18/includes/Revision/RevisionStore.php(1610): MediaWiki\Revision\RevisionStore->newRevisionFromRowAndSlots(stdClass, MediaWiki\Revision\RevisionSlots, integer, MediaWiki\Page\PageStoreRecord, boolean)
#2 /srv/mediawiki/php-1.42.0-wmf.18/includes/Revision/RevisionStore.php(2350): MediaWiki\Revision\RevisionStore->newRevisionFromRow(stdClass, integer, WikiFilePage)
#3 /srv/mediawiki/php-1.42.0-wmf.18/includes/Revision/RevisionStore.php(1291): MediaWiki\Revision\RevisionStore->loadRevisionFromConds(Wikimedia\Rdbms\DBConnRef, array, integer, WikiFilePage)
#4 /srv/mediawiki/php-1.42.0-wmf.18/includes/actions/InfoAction.php(144): MediaWiki\Revision\RevisionStore->getRevisionByTitle(WikiFilePage, integer, integer)
#5 /srv/mediawiki/php-1.42.0-wmf.18/includes/jobqueue/jobs/RefreshLinksJob.php(281): InfoAction::invalidateCache(WikiFilePage)
#6 /srv/mediawiki/php-1.42.0-wmf.18/includes/jobqueue/jobs/RefreshLinksJob.php(189): RefreshLinksJob->runForTitle(MediaWiki\Title\Title)
#7 /srv/mediawiki/php-1.42.0-wmf.18/extensions/EventBus/includes/JobExecutor.php(80): RefreshLinksJob->run()
#8 /srv/mediawiki/rpc/RunSingleJob.php(60): MediaWiki\Extension\EventBus\JobExecutor->execute(array)
#9 {main}
Impact

Unclear.

Notes

Noticed a burst of these in 1.42.0-wmf.18 (T354436) after deploying to group1. At this writing, none seen since 19:33 UTC, so possibly transient.

IDs redacted, see logstash.

Details

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

Event Timeline

Error
normalized_message
[{reqId}] {exception_url}   InvalidArgumentException: The given page ([0:Абжанов,_Хангельды_Махмутович]) does not belong to page ID 11029798 but actually belongs to 11029732
FrameLocationCall
from/srv/mediawiki/php-1.44.0-wmf.21/includes/Revision/RevisionStoreRecord.php(112)
#0/srv/mediawiki/php-1.44.0-wmf.21/includes/Revision/RevisionStore.php(1823)MediaWiki\Revision\RevisionStoreRecord->__construct(WikiPage, MediaWiki\User\UserIdentityValue, MediaWiki\CommentStore\CommentStoreComment, stdClass, MediaWiki\Revision\RevisionSlots, bool)
#1/srv/mediawiki/php-1.44.0-wmf.21/includes/Revision/RevisionStore.php(1623)MediaWiki\Revision\RevisionStore->newRevisionFromRowAndSlots(stdClass, MediaWiki\Revision\RevisionSlots, int, WikiPage, bool)
#2/srv/mediawiki/php-1.44.0-wmf.21/includes/Revision/RevisionStore.php(2361)MediaWiki\Revision\RevisionStore->newRevisionFromRow(stdClass, int, WikiPage)
#3/srv/mediawiki/php-1.44.0-wmf.21/includes/Revision/RevisionStore.php(1307)MediaWiki\Revision\RevisionStore->loadRevisionFromConds(Wikimedia\Rdbms\DBConnRef, array, int, WikiPage)
#4/srv/mediawiki/php-1.44.0-wmf.21/includes/actions/InfoAction.php(150)MediaWiki\Revision\RevisionStore->getRevisionByTitle(WikiPage, int, int)
#5/srv/mediawiki/php-1.44.0-wmf.21/includes/jobqueue/jobs/RefreshLinksJob.php(299)InfoAction::invalidateCache(WikiPage)
#6/srv/mediawiki/php-1.44.0-wmf.21/includes/jobqueue/jobs/RefreshLinksJob.php(217)RefreshLinksJob->runForTitle(MediaWiki\Title\Title)
#7/srv/mediawiki/php-1.44.0-wmf.21/extensions/EventBus/includes/JobExecutor.php(88)RefreshLinksJob->run()
#8/srv/mediawiki/rpc/RunSingleJob.php(60)MediaWiki\Extension\EventBus\JobExecutor->execute(array)
#9{main}
Impact
Notes

At a glance, InfoAction::invalidateCache stands out on the stack trace. I'd probably start digging there. This might be fallout of us recently moving cache update logic to ingress objects (e.g. ChangeTrackingeventIngress), but I don't see anything obvious. As far as I can tell at a glance, we didn't touch how InfoAction::invalidateCache is called.

daniel triaged this task as High priority.May 7 2025, 5:01 PM
daniel moved this task from Incoming (Needs Triage) to Next Up on the MW-Interfaces-Team board.

Still happening at a low rate, maybe one per day. The ones that involve InfoAction seem to all come from job runner. There are also instances from web requests, from PageTriage's handler for the ArticleViewFooter hook.

This looks suspiciously like a race condition, perhaps caused by concurrent page moves. For example, there is an instance of this error from November 20, involving Martin_kosch on dewiki (be8fd66d-416e-4a52-a0b7-089706273dc9). That page was moved to Martin_Kosch (uppercase K) and then the redirect was deleted, see https://de.wikipedia.org/wiki/Martin_kosch.

HCoplin-WMF lowered the priority of this task from High to Low.Wed, Dec 3, 2:23 PM
HCoplin-WMF subscribed.

Given the reduced frequency and low impact to users (likely fixed by a retry) we're updating the priority to low.