Page MenuHomePhabricator

RuntimeException: The revision #1218831252 belongs to a deleted page.
Open, Needs TriagePublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   RuntimeException: The revision #1218831252 belongs to a deleted page. You can [//en.wikipedia.org/w/index.php?title=Special:Undelete&target=Wikipedia:Administrators'_noticeboard/Incidents&timestamp=20240414031012&diff=prev view
exception.trace
from /srv/mediawiki/php-1.42.0-wmf.26/extensions/DiscussionTools/includes/Hooks/HookUtils.php(159)
#0 /srv/mediawiki/php-1.42.0-wmf.26/extensions/DiscussionTools/includes/ApiDiscussionToolsCompare.php(98): MediaWiki\Extension\DiscussionTools\Hooks\HookUtils::parseRevisionParsoidHtml(MediaWiki\Revision\RevisionStoreRecord, string)
#1 /srv/mediawiki/php-1.42.0-wmf.26/includes/api/ApiMain.php(1946): MediaWiki\Extension\DiscussionTools\ApiDiscussionToolsCompare->execute()
#2 /srv/mediawiki/php-1.42.0-wmf.26/includes/api/ApiMain.php(922): ApiMain->executeAction()
#3 /srv/mediawiki/php-1.42.0-wmf.26/includes/api/ApiMain.php(893): ApiMain->executeActionWithErrorHandling()
#4 /srv/mediawiki/php-1.42.0-wmf.26/includes/api/ApiEntryPoint.php(158): ApiMain->execute()
#5 /srv/mediawiki/php-1.42.0-wmf.26/includes/MediaWikiEntryPoint.php(199): MediaWiki\Api\ApiEntryPoint->execute()
#6 /srv/mediawiki/php-1.42.0-wmf.26/api.php(44): MediaWiki\MediaWikiEntryPoint->run()
#7 /srv/mediawiki/w/api.php(3): require(string)
#8 {main}
Notes

These started arriving on April 14, 2024 and have been happening at low volume, but high enough to regularly be first or second in logspam-watch output. The mentioned revision is always the same.

Event Timeline

The error is not new, and has been thrown in the past for different revisions on different pages, it's only a recent spike that's all about revision #1218831252:

https://logstash.wikimedia.org/goto/077f507936b72691177b819b616fcf0f

image.png (719×3 px, 148 KB)

https://logstash.wikimedia.org/goto/98f99943544fbdb732945977cca01ee5

image.png (719×3 px, 144 KB)


The error probably happens when someone opens the reply tool on some page, which then regularly polls for new comments on the page since the last revision they viewed, then the revision they started commenting on gets deleted (probably a regular occurrence on "Wikipedia:Administrators'_noticeboard/Incidents"), causing the polling to fail.

I don't think anything changed in the code recently, so this is probably just someone sitting there with a browser tab open that is continuously retrying this failing API request. Annoying but not urgent, and will probably go away on its own.

The error message is misleading though. It's not the page that's deleted, it's a revision of the page.

huh, reply on that page constantly pinging does seem a likely explanation, but I'm curious why we're getting spikes here:

2024-04-24_runtime-deleted-revision.png (597×930 px, 43 KB)

I also don't see this revision on the incidentpage currently. Is there a way to dig a little deeper into this? I wonder, for example, if this is coming from a single ip or if this is coming from multiple folks and if so: what are they trying to reply to? (I was unable to find the relevant topic)

huh, reply on that page constantly pinging does seem a likely explanation, but I'm curious why we're getting spikes here:

The polling stops when leaving the browser tab and restarts when interacting with it.

I also don't see this revision on the incidentpage currently.

It's a suppressed revision: https://en.wikipedia.org/wiki/Wikipedia:Administrators'_noticeboard/Incidents?oldid=1218831252 I won't bother finding out what it was.

Is there a way to dig a little deeper into this? I wonder, for example, if this is coming from a single ip or if this is coming from multiple folks and if so: what are they trying to reply to? (I was unable to find the relevant topic)

We don't seem to log this data in Logstash, that's probably for the best. Maybe you can find it in some other more private logs.

My best guess is that the person who posted whatever it was still has the page open on their computer, and admires it from time to time.

Anyway, I can just fix it.

Change #1024532 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] ApiDiscussionToolsCompare: Show nice error for deleted revisions

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

Change #1024533 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] CommentController: Delay polling on error

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

Change #1024534 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@master] ParserOutputAccess: Replace misleading error for deleted revisions

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

Only the first patch of the above is needed to resolve the log spam, the other ones are cleanup/hardening.

Thank you for the fix @matmarex the spikes here were getting distracting on the error dashboards. I really appreciate it <3

Change #1024532 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] ApiDiscussionToolsCompare: Show nice error for deleted revisions

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

Change #1024533 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] CommentController: Delay polling on error

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