Bug #50784 | MDL: Assertion `m_tickets.is_empty() || m_tickets.front() == m_trans_sentinel' | ||
---|---|---|---|
Submitted: | 1 Feb 2010 9:01 | Modified: | 7 Mar 2010 1:06 |
Reporter: | Philip Stoev | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Locking | Severity: | S1 (Critical) |
Version: | mysql-next-4284-stage | OS: | Any |
Assigned to: | Dmitry Lenev | CPU Architecture: | Any |
[1 Feb 2010 9:01]
Philip Stoev
[1 Feb 2010 9:07]
Philip Stoev
Core and binary: http://mysql-systemqa.s3.amazonaws.com/var-bug50784.zip Source: revision-id: kostja@sun.com-20100129154650-wmq5gczzj868s66r date: 2010-01-29 18:46:50 +0300 build-date: 2010-02-01 11:07:16 +0200 revno: 3084 branch-nick: mysql-next-4284-stage
[1 Feb 2010 9:28]
Philip Stoev
Non-concurrent test case SET AUTOCOMMIT = 0; OPTIMIZE LOCAL TABLE t1, t2; So, the issue happens when trying to perform a housekeeping operation on several tables at once in autocommit=off mode.
[2 Feb 2010 11:24]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/98931 3059 Dmitry Lenev 2010-02-02 Fix for bug #50784 "MDL: Assertion `m_tickets.is_empty() || m_tickets.front() == m_trans_sentinel'". Debug build of server crashed due to assert failure in MDL subsystem when one tried to execute multi-table REPAIR or OPTIMIZE in autocommit=0 mode. The assert failure occured when multi-table REPAIR or OPTIMIZE started processing of second table from its table list and tried to acquire upgradable metadata lock on this table. The cause of the assert failure were MDL locks left over from processing of previous table. It turned out that in autocommit=0 mode close_thread_tables() which happens at the end of table processing doesn't release metadata locks. This fix solves problem by releasing locks explicitly using MDL_context::release_trans_locks() call. @ mysql-test/r/repair.result Added test for bug #50784 "MDL: Assertion `m_tickets.is_empty() || m_tickets.front() == m_trans_sentinel'". @ mysql-test/t/repair.test Added test for bug #50784 "MDL: Assertion `m_tickets.is_empty() || m_tickets.front() == m_trans_sentinel'". @ sql/sql_table.cc Ensure that metadata locks are released after multi-table REPAIR/ OPTIMIZE/... processes each table. close_thread_tables() which is called after processing each table doesn't release metadata locks if we are in autocommit=0 mode. So this have to be done explicitly by calling MDL_context::release_trans_locks().
[3 Feb 2010 5:34]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/99002 3063 Dmitry Lenev 2010-02-03 Fix for bug #50784 "MDL: Assertion `m_tickets.is_empty() || m_tickets.front() == m_trans_sentinel'". Debug build of server crashed due to assert failure in MDL subsystem when one tried to execute multi-table REPAIR or OPTIMIZE in autocommit=0 mode. The assert failure occured when multi-table REPAIR or OPTIMIZE started processing of second table from its table list and tried to acquire upgradable metadata lock on this table. The cause of the assert failure were MDL locks left over from processing of previous table. It turned out that in autocommit=0 mode close_thread_tables() which happens at the end of table processing doesn't release metadata locks. This fix solves problem by releasing locks explicitly using MDL_context::release_trans_locks() call. @ mysql-test/r/repair.result Added test for bug #50784 "MDL: Assertion `m_tickets.is_empty() || m_tickets.front() == m_trans_sentinel'". @ mysql-test/t/repair.test Added test for bug #50784 "MDL: Assertion `m_tickets.is_empty() || m_tickets.front() == m_trans_sentinel'". @ sql/sql_table.cc Ensure that metadata locks are released after multi-table REPAIR/ OPTIMIZE/... processes each table. close_thread_tables() which is called after processing each table doesn't release metadata locks if we are in autocommit=0 mode. So this have to be done explicitly by calling MDL_context::release_trans_locks().
[3 Feb 2010 5:36]
Dmitry Lenev
Fix for this bug was pushed into mysql-next-4284 tree. Since this problem was reported against tree which is not publicly available yet there is nothing to document. So I am simply closing this bug.
[16 Feb 2010 16:51]
Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100216101445-2ofzkh48aq2e0e8o) (version source revid:kostja@sun.com-20100210211106-nq8ztcq2z9o4csit) (merge vers: 6.0.14-alpha) (pib:16)
[16 Feb 2010 17:00]
Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100216101208-33qkfwdr0tep3pf2) (version source revid:kostja@sun.com-20100203111037-ajk1r65ssvwn8dio) (pib:16)
[6 Mar 2010 11:07]
Bugs System
Pushed into 5.5.3-m3 (revid:alik@sun.com-20100306103849-hha31z2enhh7jwt3) (version source revid:vvaintroub@mysql.com-20100216221947-luyhph0txl2c5tc8) (merge vers: 5.5.99-m3) (pib:16)
[7 Mar 2010 1:06]
Paul DuBois
No changelog entry needed.