Page MenuHomePhabricator

Fatal exception from FlaggedRevs: "Flagged revision with ID … exists with unexpected fr_page_id"
Open, MediumPublicPRODUCTION ERROR

Description

Error

MediaWiki version: 1.35.0-wmf.37

message
Exception:
Flagged revision with ID 107684164 exists with unexpected fr_page_id
exception.trace
#0 /srv/mediawiki/php-1.35.0-wmf.37/extensions/FlaggedRevs/business/RevisionReviewForm.php(303): RevisionReviewForm->approveRevision(MediaWiki\Revision\RevisionStoreRecord, NULL)
#1 /srv/mediawiki/php-1.35.0-wmf.37/extensions/FlaggedRevs/business/FRGenericSubmitForm.php(191): RevisionReviewForm->doSubmit()
#2 /srv/mediawiki/php-1.35.0-wmf.37/extensions/FlaggedRevs/frontend/specialpages/actions/RevisionReview.php(116): FRGenericSubmitForm->submit()
#3 /srv/mediawiki/php-1.35.0-wmf.37/includes/specialpage/SpecialPage.php(580): RevisionReview->execute(NULL)
#4 /srv/mediawiki/php-1.35.0-wmf.37/includes/specialpage/SpecialPageFactory.php(634): SpecialPage->run(NULL)
#5 /srv/mediawiki/php-1.35.0-wmf.37/includes/MediaWiki.php(307): MediaWiki\SpecialPage\SpecialPageFactory->executePath(Title, RequestContext)
#6 /srv/mediawiki/php-1.35.0-wmf.37/includes/MediaWiki.php(986): MediaWiki->performRequest()
#7 /srv/mediawiki/php-1.35.0-wmf.37/includes/MediaWiki.php(543): MediaWiki->main()
#8 /srv/mediawiki/php-1.35.0-wmf.37/index.php(47): MediaWiki->run()
#9 /srv/mediawiki/w/index.php(3): require(string)
#10 {main}

Impact

User unable to submit their content review, and getting a generic internal system error page. The page likely remains marked as unreviewed.

Notes

Noticed one of these for wmf.37 in log triage meeting.

Details

Request ID
b1c0e40a-7c71-486f-9ac9-8b34a0053442
Request URL
https://ru.wikipedia.org/w/index.php?title=Служебная:Проверка_версий&action=submit

Event Timeline

Seems related to the code @daniel added as mitigation for T246720

BPirkle triaged this task as Medium priority.Jun 24 2020, 8:52 PM
BPirkle moved this task from Inbox to Later on the Platform Team Workboards (Clinic Duty Team) board.
Krinkle renamed this task from Flagged revision with ID [id] exists with unexpected fr_page_id to Fatal exception from FlaggedRevs: "Flagged revision with ID … exists with unexpected fr_page_id".Jul 22 2020, 11:45 PM
Krinkle changed Request URL from https://ru.wikipedia.org/w/index.php?title=%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:%D0%9F%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D0%BA%D0%B0_%D0%B2%D0%B5%D1%80%D1%81%D0%B8%D0%B9&action=submit to https://ru.wikipedia.org/w/index.php?title=Служебная:Проверка_версий&action=submit.
Krinkle updated the task description. (Show Details)
Krinkle edited Stack Trace. (Show Details)

Still seen. message:"exists with unexpected fr_page_id" on mediawiki-errors in Logstash.

Same issue on plwiki (ref, 1.37.0-wmf.12): Flagged revision with ID 63918438 exists with unexpected fr_page_id.

Edit: it seems a null edit fixed this. Note the page was previously deleted and recreated a few times due to a history merge.

Same issue on plwiki (ref, 1.37.0-wmf.12): Flagged revision with ID 63918438 exists with unexpected fr_page_id.

Edit: it seems a null edit fixed this. Note the page was previously deleted and recreated a few times due to a history merge.

well, i wasn't completely 'null' — i've changed coma to semicolon; absolutely no changes — i've tried — does not do work.

Krinkle added subscribers: jeena, Umherirrender.

Per T299711, this affects both the GUI (via index.php Special:RevisionReview) and the API (via rest.php).

Currently any case I can find is from rest.php. My guess is that the previous ticket mitigated handling corrupted data in FR but the new functionality added (rest.php replacing the action=ajax) after the patch doesn't have the mitigation in place.

One way to see why we have corrupted data in the first place, another is to just simply drop fr_page_id and rely on revision table for the data (which I think we join with that anyway...), I take a look

While I was looking for this, I realized three columns of flaggedrevs are completely unused (https://gerrit.wikimedia.org/r/757949). I got sidetracked, will work on it a bit now.

Assigning to reflect the above (and to make it easier not to forget via your phab dash).

@Ladsgroup: Removing task assignee as this open task has been assigned for more than two years - see the email sent to all task assignees on 2024-04-15.
Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome! :)
If this task has been resolved in the meantime, or should not be worked on by anybody ("declined"), please update its task status via "Add Action… 🡒 Change Status".
Also see https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator. Thanks!