Bug #60917 | DEADLOCK ending in FLUSH TABLES which never ends. | ||
---|---|---|---|
Submitted: | 19 Apr 2011 8:46 | Modified: | 29 Apr 2011 19:55 |
Reporter: | Simon E | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: Locking | Severity: | S1 (Critical) |
Version: | 5.1.49-1ubuntu | OS: | Linux (Ubuntu 10.10) |
Assigned to: | CPU Architecture: | Any |
[19 Apr 2011 8:46]
Simon E
[19 Apr 2011 8:50]
Simon E
Argh.. to see the output better: http://dpaste.org/pia9/
[19 Apr 2011 14:14]
Valeriy Kravchuk
I see that this statement TRUNCATE stats_implicitratings_today is executed for a long time, and probably it blocks others. So, what storage engine is used for this table and how big is it? Also, please, check if the same problem still happens with a newer version, 5.1.56.
[28 Apr 2011 7:38]
Simon E
Ok i can think it's related to http://bugs.mysql.com/bug.php?id=45066 When you do something like this (whereas client1 is a long running mysqldump command): client1: LOCK TABLE xyz READ LOCAL; //.. also other tables .... time went by client2: LOCK TABLE xyz READ; client2: FLUSH TABLE xyz; // will block ... now client1 (mysqldump) wants to dump the db and begins with SHOW TABLE STATUS client1: SHOW TABLE STATUS LIKE 'xyz'; // will block so client1 waits for client2 and client2 for client1.. I'm not sure if this is wanted but its confusing.. if client1 would also FLUSH TABLE xyz then ok its a little bit weird (but could be resolved to do something like: close xyz, reopen for both clients and readd lock table read).. but that "SHOW TABLE STATUS" locks but any SELECT wouldn't thats not logical or did i forget something?
[29 Apr 2011 19:55]
Sveta Smirnova
Thank you for the feedback. You are right this is duplicate of bug #45066. Please upgrade to version 5.5 where this problem does not exist.