Last modified: 2014-06-19 13:39:46 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 T19819, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 17819 - Database deadlock on page table page_counter after import
Database deadlock on page table page_counter after import
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.14.x
All Linux
: Low major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 28599
  Show dependency treegraph
 
Reported: 2009-03-06 21:15 UTC by Dan Barrett
Modified: 2014-06-19 13:39 UTC (History)
2 users (show)

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


Attachments

Description Dan Barrett 2009-03-06 21:15:56 UTC
I did an XML import on our wiki, containing about 40 articles. It reported 39 of the imports on Special:RecentChanges but not the 40th, and the import page hung.

When I hit the 40th page directly, I got;

Database error
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: 
UPDATE `vpw_page` SET page_counter = page_counter + 1 WHERE page_id = 20392
from within function "". MySQL returned error "1205: Lock wait timeout exceeded; try restarting transaction (localhost)".

or:

The last attempted database query was: 
UPDATE `vpw_page` SET page_touched = '20090306210413' WHERE page_namespace = '0' AND page_title = 'My_page_title_whatever'
from within function "Title::invalidateCache". MySQL returned error "1205: Lock wait timeout exceeded; try restarting transaction (localhost)".

This situation has lasted now for 30 minutes straight.

Other wiki pages are unaffected, just this one.

I viewed the entries for this article in the page table (page_id=20392), revision table, and text table.  They are consistent. The import (which would have modified the page) did not succeed -- the old page text is present.

I can view the History and Edit pages with problem.  Only the actual article cannot be viewed.

I ran "show innodb status" and it showed the following deadlock information:

------------------------
LATEST DETECTED DEADLOCK
------------------------
090305 22:26:04
*** (1) TRANSACTION:
TRANSACTION 0 41477638, ACTIVE 1 sec, process no 2239, OS thread id 1186842944 inserting
mysql tables in use 1, locked 1
LOCK WAIT 4 lock struct(s), heap size 1216
MySQL thread id 99508, query id 1859443 localhost wikiuser update
INSERT /* MediaWikiBagOStuff::_doinsert 10.95.201.34 */ IGNORE INTO `vpw_objectcache` (keyname,value,exptime) VALUES ('wikidb-vpw_:pcache:idhash:21029-0!1!0!!en!2!edit=0','lots of binary data here...'
Comment 1 Dan Barrett 2009-03-06 21:22:26 UTC
Other facts:

The import never finished. It hung for several minutes and then I closed the browser window.

Restarting apache cleared up the problem.  Maybe the import process was still holding a lock via some httpd process.
Comment 2 Sumana Harihareswara 2011-10-01 02:20:36 UTC
Dan, sorry it took so long to reply to you.  If you still happen to have the old pages lying around so we could test the XML import on MediaWiki 1.17.0 (or, better yet, trunk), we could check whether this bug might still affect people, or whether it's already been fixed.

Thanks!
Comment 3 Dan Barrett 2011-10-15 19:36:28 UTC
Sorry, I do not have the old import file anymore.
Comment 4 Andre Klapper 2014-06-19 13:39:46 UTC
I'm afraid that without an available testcase to reproduce, there's not much that can be investigated anymore nowadays, unfortunately. :(

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


Navigation
Links