Bug #32422 deadlocks with 'closing tables' and 'Opening tables' impossible to debug
| Submitted: | 15 Nov 2007 21:10 | Modified: | 4 Dec 2013 8:32 |
|---|---|---|---|
| Reporter: | Mark Callaghan | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Performance Schema | Severity: | S4 (Feature request) |
| Version: | 5.0.37 | OS: | Any |
| Assigned to: | Marc ALFF | CPU Architecture: | Any |
| Tags: | debug, dictionary, lock, table | ||
[15 Nov 2007 21:10]
Mark Callaghan
[15 Nov 2007 21:19]
Mark Callaghan
The first session to get stuck was in state 'closing tables'. It was probably stuck somewhere in close_thread_stables() and stayed in that state for ~15 minutes.
[16 Nov 2007 5:12]
Valeriy Kravchuk
Thank you for a feature request. Have you tried to use mysqladmin debug command? It writes some information about table-level locks to the error log.
[16 Nov 2007 8:05]
Mark Callaghan
I always forget about that. However, I don't catch these errors in real time. I usually catch them a day after they happen. I then debug from archives of SHOW PROCESSLIST samples and the contents of the database error log. This is why I want dumping of lock state to be done when a session waits too long. Also, given that much of the locking in the MySQL layer is done directly on pthread_mutex, rather than using the mutex to protect the read/write of a 'locked' flag, many of the lock have/wait relationships cannot be displayed.
[16 Nov 2007 8:14]
Valeriy Kravchuk
Thank you for a reasonable feature request :)
[4 Dec 2013 8:32]
Marc ALFF
Resolved in MySQL 5.7.3, with the performance schema instrumentation http://dev.mysql.com/doc/refman/5.7/en/metadata-locks-table.html http://dev.mysql.com/doc/refman/5.7/en/table-handles-table.html
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.044 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.