Last modified: 2014-06-05 22:34:17 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 T50636, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 48636 - Database error at undeletion (race condition?): LocalFileRestoreBatch::execute Error: Deadlock found when trying to get lock; try restarting transaction
Database error at undeletion (race condition?): LocalFileRestoreBatch::execut...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.22.0
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: platformeng
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-20 14:36 UTC by Maarten Dammers
Modified: 2014-06-05 22:34 UTC (History)
5 users (show)

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


Attachments

Description Maarten Dammers 2013-05-20 14:36:48 UTC
Jcb asked on irc to undelete some files. Me and odder both responded, I was faster at the first three, but the last one (https://commons.wikimedia.org/w/index.php?title=Special:Log&page=File%3AMaison+Morisset%2C+Sainte-Famille%2C+%C3%AEle+d%27Orl%C3%A9ans%2C+Qu%C3%A9bec+07.jpg) Odder was faster.

I got this nice error. No layout or anything so it seems to come straight from php:
""""

A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script
Query: INSERT INTO `image` (img_name,img_size,img_width,img_height,img_metadata,img_bits,img_media_type,img_major_mime,img_minor_mime,img_description,img_user,img_user_text,img_timestamp,img_sha1) VALUES ('Maison_Morisset,_Sainte-Famille,_île_d\'Orléans,_Québec_07.jpg','183210','1092','768','a:1:{s:22:\"MEDIAWIKI_EXIF_VERSION\";i:2;}','8','BITMAP','image','jpeg','User created page with UploadWizard','57323','Benoit Rochon','20130103190436','429oa40hdi65he0dn1192er17m05fia')
Function: LocalFileRestoreBatch::execute
Error: 1213 Deadlock found when trying to get lock; try restarting transaction (10.64.32.29)
"""

Looks like odder and me triggered a race condition here.
Comment 1 Maarten Dammers 2013-05-20 15:11:35 UTC
Ah, looks like I had another one:
"""
A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script
Query: INSERT INTO `image` (img_name,img_size,img_width,img_height,img_metadata,img_bits,img_media_type,img_major_mime,img_minor_mime,img_description,img_user,img_user_text,img_timestamp,img_sha1) VALUES ('Maison_Morisset,_Sainte-Famille,_île_d\'Orléans,_Québec_05.jpg','258148','1090','782','a:1:{s:22:\"MEDIAWIKI_EXIF_VERSION\";i:2;}','8','BITMAP','image','jpeg','User created page with UploadWizard','57323','Benoit Rochon','20130103190430','o5qoold6r84zreonlw45thopk3tospz')
Function: LocalFileRestoreBatch::execute
Error: 1213 Deadlock found when trying to get lock; try restarting transaction (10.64.32.29)
"""
Comment 2 Andre Klapper 2013-05-29 12:59:24 UTC
Also see bug 33292
Comment 3 Greg Grossmeier 2013-06-03 15:47:07 UTC
So, now work was lost (the files were undeleted) just you ran into the error message, right, Maarten? The raw message isn't the nicest but let's just leave this as a normal priority for now.
Comment 4 Andre Klapper 2013-06-24 16:26:36 UTC
Maarten: Could you answer comment 3?
Comment 5 Maarten Dammers 2013-06-24 16:49:42 UTC
(In reply to comment #3)
> So, now work was lost (the files were undeleted) just you ran into the error
> message, right, Maarten? The raw message isn't the nicest but let's just
> leave
> this as a normal priority for now.

Only admins can undelete files and that doesn't happen a lot, let alone two admins trying to delete the same file at the same time. Normal is just fine.
Comment 6 Aaron Schulz 2014-06-05 22:33:02 UTC
Probably fixed in https://gerrit.wikimedia.org/r/#/c/136343/
Comment 7 Aaron Schulz 2014-06-05 22:34:17 UTC
Also https://gerrit.wikimedia.org/r/#/c/134502/

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


Navigation
Links