Page MenuHomePhabricator

UnexpectedValueException: The title "Discussioni utente:Barstein" does not refer to an existing page
Closed, ResolvedPublic2 Estimated Story PointsPRODUCTION ERROR

Description

Error

Request ID: XJ-JzApAMFcAAEu0NPoAAAAD

message
[XJ-JzApAMFcAAEu0NPoAAAAD] /w/index.php?title=Discussioni_utente:Barstein&action=submit   UnexpectedValueException from line 147 of /srv/mediawiki/php-1.33.0-wmf.23/extensions/TwoColConflict/includes/SplitTwoColConflict/SplitTwoColConflictHelper.php: The title "Discussioni utente:Barstein" does not refer to an existing page
trace
	#0 /srv/mediawiki/php-1.33.0-wmf.23/extensions/TwoColConflict/includes/SplitTwoColConflict/SplitTwoColConflictHelper.php(237): TwoColConflict\SplitTwoColConflict\SplitTwoColConflictHelper->getRevisionRecord()
#1 /srv/mediawiki/php-1.33.0-wmf.23/extensions/TwoColConflict/includes/SplitTwoColConflict/SplitTwoColConflictHelper.php(203): TwoColConflict\SplitTwoColConflict\SplitTwoColConflictHelper->buildEditConflictView()
#2 /srv/mediawiki/php-1.33.0-wmf.23/includes/EditPage.php(2943): TwoColConflict\SplitTwoColConflict\SplitTwoColConflictHelper->getEditFormHtmlBeforeContent()
#3 /srv/mediawiki/php-1.33.0-wmf.23/includes/EditPage.php(719): EditPage->showEditForm()
#4 /srv/mediawiki/php-1.33.0-wmf.23/includes/actions/EditAction.php(60): EditPage->edit()
#5 /srv/mediawiki/php-1.33.0-wmf.23/includes/actions/SubmitAction.php(38): EditAction->show()
#6 /srv/mediawiki/php-1.33.0-wmf.23/includes/MediaWiki.php(501): SubmitAction->show()
#7 /srv/mediawiki/php-1.33.0-wmf.23/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)
#8 /srv/mediawiki/php-1.33.0-wmf.23/includes/MediaWiki.php(867): MediaWiki->performRequest()
#9 /srv/mediawiki/php-1.33.0-wmf.23/includes/MediaWiki.php(517): MediaWiki->main()
#10 /srv/mediawiki/php-1.33.0-wmf.23/index.php(42): MediaWiki->run()
#11 /srv/mediawiki/w/index.php(3): include(string)
#12 {main}

Impact

This error was reported on itwiki, and the reporter said that

while creating or editing talk pages, it seems like the edit seems to "save twice" and this error is shown. Nevertheless, the edit is correctly saved.

A quick search on logstash says this error showed up 8 times in the last 7 days. Extending the time range to 6 months reveals an uniform distribution over the last month, with a total of 50 hits. Events older than that have probably been deleted, so I'm unable to determine a start date.

Notes

Seems very similar to T205942, especially to the stacktrace reported by Krinkle at T205942#4726989.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I was just looking for the page and found it exists: https://it.wikipedia.org/wiki/Discussioni_utente:Barstein. The timestamps and task description sound like the error happened the moment the talk page was created.

WMDE-Fisch set the point value for this task to 5.Apr 24 2019, 10:01 AM

WMDE-Fisch set the point value for this task to 5

FYI: For now these 5 points are meant as upper limit for a first bigger investigation on that task. Depending on how these issues are triggered the fix could be quite different and atm hard to estimate.

Just from some first approach manual testing:

  • I can provoke an edit conflict when creating a new page under the following conditions
    • I am not logged in ( when I am logged in - at least this method - does not work )
    • I click three times very fast the save button ( clicking very fast only twice does not seem to help )

The fact that there's an edit conflict appearing is independent from TwoColConflict and is a bug that, when fixed would probably solve the issues in this ticket as well.

Why this is clearly a bug:

  • it's the same user doing the edits ( maybe the fact that it's an anon user weakens that argument though )
  • it's the same content

So we might want to focus on this bug in this ticket ( or create another one for it ).

I also wonder how this ticket might me related: T58849: Edit conflict detection by timestamp should be deprecated

Edit: I almost forget to mention, that even though I got the edit conflict screen, I do not get the error.

I had a look at the code in question. The HtmlSplitConflictHeader tries to load the current revision of the page where the conflict appears. But not to do anything with this revisions actual contents, but only to be able to show the last edits user name and comment. This code is brittle, and also in the wrong class, it appears. I will try to move it to a more appropriate place.

It appears a conflict can appear on a page that does not exist, e.g. when two users try to create a new talk page the same time. In this case, there is still a conflict (between the two edits), but no old revision … Dang, wait, This doesn't make much sense. The first edit should have been successful, and create the first revision. We are even calling WikiPage::loadPageData( 'fromdbmaster' ) to make sure we are not reading outdated secondary databases.

Change 506972 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/TwoColConflict@master] Allow HtmlSplitConflictHeader to work without a latest revision

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

Change 507017 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/TwoColConflict@master] Simplify HtmlSplitConflictHeader test setup a bit

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

Just from some first approach manual testing:

  • I can provoke an edit conflict when creating a new page under the following conditions
    • I am not logged in ( when I am logged in - at least this method - does not work )
    • I click three times very fast the save button ( clicking very fast only twice does not seem to help )

Just for completeness: I can get a similar issue when I create a new section ( e.g. on a talk page using Add topic ) when I hit the submit button four times really fast. This also works when logged in.

WMDE-Fisch changed the point value for this task from 5 to 2.
WMDE-Fisch moved this task from Sprint Backlog to Review on the WMDE-QWERTY-Sprint-2019-04-30 board.
thiemowmde triaged this task as Medium priority.
thiemowmde added a subscriber: awight.

Change 506972 merged by jenkins-bot:
[mediawiki/extensions/TwoColConflict@master] Allow HtmlSplitConflictHeader to work without a latest revision

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

Change 507017 merged by jenkins-bot:
[mediawiki/extensions/TwoColConflict@master] Simplify HtmlSplitConflictHeader test setup a bit

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

Lea_WMDE subscribed.

Not resolving yet as there is no ticket yet describing the backend side issues that are out of scope of our project

I also left a note to myself to check the logs, when this is starting to be live tomorrow, so we _really_ can be sure, the error does not appear anymore.

I also left a note to myself to check the logs, when this is starting to be live tomorrow, so we _really_ can be sure, the error does not appear anymore.

Checked the logs, error did not appear over the last week.

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:07 PM