Last modified: 2014-11-18 18:07:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T28224, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 26224 - Deadlock in FlaggedRevision::insertOn on edit autoreview
Deadlock in FlaggedRevision::insertOn on edit autoreview
Status: RESOLVED DUPLICATE of bug 28598
Product: MediaWiki extensions
Classification: Unclassified
FlaggedRevs (Other open bugs)
unspecified
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-12-03 22:06 UTC by Tisza Gergő
Modified: 2014-11-18 18:07 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Tisza Gergő 2010-12-03 22:06:18 UTC
A hu.wikipedia user reported an "1213: Deadlock found when trying to get lock" SQL error thrown by FlaggedRevision::insertOn when trying to save a page. The reporter is in the 'trusted' group (that is, he has autoreview right but not review). The page he tried to edit was in 'sighted' state.
Comment 1 Aaron Schulz 2010-12-03 23:27:21 UTC
Does this happen often? Things like that will happen from rarely, but not never, under normal cases.
Comment 2 Tisza Gergő 2010-12-04 18:04:18 UTC
We had only one report to date. Then again, it has only been a week or two since the FlaggedRevs code update, so - assuming the bug is related to that - it can't be too infrequent if it occured this soon. (At least frequent enough to merit a better error message.)
Comment 3 Aaron Schulz 2010-12-04 19:38:12 UTC
(In reply to comment #2)
> We had only one report to date. Then again, it has only been a week or two
> since the FlaggedRevs code update, so - assuming the bug is related to that -
> it can't be too infrequent if it occured this soon. (At least frequent enough
> to merit a better error message.)

Was this with the JavaScript AJAX review form? Previously, those kind of errors were simply not displayed to the user (you just get "action failed" in the title).
Comment 4 Aaron Schulz 2010-12-04 19:42:43 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > We had only one report to date. Then again, it has only been a week or two
> > since the FlaggedRevs code update, so - assuming the bug is related to that -
> > it can't be too infrequent if it occured this soon. (At least frequent enough
> > to merit a better error message.)
> 
> Was this with the JavaScript AJAX review form? Previously, those kind of errors
> were simply not displayed to the user (you just get "action failed" in the
> title).

Nevermind, this is about autoreview on edit.
Comment 5 merl 2010-12-04 22:10:10 UTC
I am running a script using api on dewiki this evening i'll used many times before without any problems. But i got this error three times within 10 minutes. The last one:

editing de:Izumi Sakai using api with action=edit&appendtext=...

<?xml version="1.0"?><api><error code="internal_api_error_DBQueryError" info="Database query error" xml:space="preserve">

#0 /usr/local/apache/common-local/wmf-deployment/includes/db/Database.php(541): DatabaseBase-&gt;reportQueryError('Deadlock found ...', 1213, 'INSERT IGNORE I...', 'FlaggedRevision...', false)
#1 /usr/local/apache/common-local/wmf-deployment/includes/db/Database.php(1174): DatabaseBase-&gt;query('INSERT IGNORE I...', 'FlaggedRevision...')
#2 /usr/local/apache/common-local/wmf-deployment/extensions/FlaggedRevs/FlaggedRevision.php(324): DatabaseBase-&gt;insert('flaggedtemplate...', Array, 'FlaggedRevision...', 'IGNORE')
#3 /usr/local/apache/common-local/wmf-deployment/extensions/FlaggedRevs/FlaggedRevs.class.php(1353): FlaggedRevision-&gt;insertOn(true)
#4 /usr/local/apache/common-local/wmf-deployment/extensions/FlaggedRevs/FlaggedRevs.hooks.php(726): FlaggedRevs::autoReviewEdit(Object(Article), Object(User), Object(Revision), NULL)
#5 [internal function]: FlaggedRevsHooks::maybeMakeEditReviewed(Object(Article), Object(Revision), false, Object(User))
#6 /usr/local/apache/common-local/wmf-deployment/includes/Hooks.php(133): call_user_func_array(Array, Array)
#7 /usr/local/apache/common-local/wmf-deployment/includes/Article.php(1982): wfRunHooks('NewRevisionFrom...', Array)
#8 /usr/local/apache/common-local/wmf-deployment/includes/Article.php(1791): Article-&gt;doEdit('[[Bild:Entertai...', '+[[fi:Izumi Sak...', 102)
#9 /usr/local/apache/common-local/wmf-deployment/includes/EditPage.php(1047): Article-&gt;updateArticle('[[Bild:Entertai...', '+[[fi:Izumi Sak...', true, true, false, '')
#10 /usr/local/apache/common-local/wmf-deployment/includes/api/ApiEditPage.php(238): EditPage-&gt;internalAttemptSave(NULL, false)
#11 /usr/local/apache/common-local/wmf-deployment/includes/api/ApiMain.php(595): ApiEditPage-&gt;execute()
#12 /usr/local/apache/common-local/wmf-deployment/includes/api/ApiMain.php(338): ApiMain-&gt;executeAction()
#13 /usr/local/apache/common-local/wmf-deployment/includes/api/ApiMain.php(322): ApiMain-&gt;executeActionWithErrorHandling()
#14 /usr/local/apache/common-local/wmf-deployment/api.php(116): ApiMain-&gt;execute()
#15 /usr/local/apache/common-local/live-1.5/api.php(3): require('/usr/local/apac...')
#16 {main}

</error></api>
Comment 6 Aaron Schulz 2010-12-06 21:18:56 UTC
(In reply to comment #5)
> I am running a script using api on dewiki this evening i'll used many times
> before without any problems. But i got this error three times within 10
> minutes.
How are you using the review API? It might help to know the usage patterns, though these things can be tricky to track either way.
Comment 7 Aaron Schulz 2010-12-06 23:06:52 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > I am running a script using api on dewiki this evening i'll used many times
> > before without any problems. But i got this error three times within 10
> > minutes.
> How are you using the review API? It might help to know the usage patterns,
> though these things can be tricky to track either way.

Bitten again...edit API, not review. At least that narrows it down to autoReviewEdit() function area.
Comment 8 Aaron Schulz 2010-12-08 19:19:17 UTC
Tweaked the insertOn() function to be less deadlock prone in r78052. Synced. I'll wait to see if other tweaks are needed.
Comment 9 Aaron Schulz 2010-12-08 19:56:06 UTC
Is this still occurring often?
Comment 10 Aaron Schulz 2010-12-22 22:13:51 UTC
Marking closed. r78052 should reduce this, and I haven't heard of new reports (this kind of thing isn't a problem unless it is frequent).
Comment 11 Aaron Schulz 2011-05-08 22:41:35 UTC
Folding into (a bit) more general bug 28598.

*** This bug has been marked as a duplicate of bug 28598 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links