Bug #31692 | binlog_killed.test crashes sometimes | ||
---|---|---|---|
Submitted: | 18 Oct 2007 12:51 | Modified: | 24 Oct 2007 18:43 |
Reporter: | Ingo Strüwing | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Locking | Severity: | S1 (Critical) |
Version: | 5.1.23 | OS: | Linux |
Assigned to: | Ingo Strüwing | CPU Architecture: | Any |
Tags: | crash |
[18 Oct 2007 12:51]
Ingo Strüwing
[18 Oct 2007 13: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/35839 ChangeSet@1.2574, 2007-10-18 15:24:30+02:00, istruewing@stella.local +1 -0 Bug#31692 - binlog_killed.test crashes sometimes The server crashed when a thread was killed while locking the general_log table at statement begin. The general_log table is handled like a performance schema table. The state of open tables is saved and cleared so that this table seems to be the only open one. Then this table is opened and locked. After writing, the table is closed and the open table state is restored. Before restoring, however, it is asserted that there is no current table open. After locking the table, mysql_lock_tables() checks if the thread was killed in between. If so, it unlocks the table and returns an error. open_ltable() just returns with the error and leaves closing of the table to close_thread_tables(), which is called at statement end. open_performance_schema_table() did not take this into account. It assumed that a failed open_ltable() would not leave an open table behind. Fixed by closing thread tables after open_ltable() and before restore_backup_open_tables_state() if the thread was killed. No test case. It requires correctly timed parallel execution. Since this bug was detected by the test suite, it seems dispensable to add another test.
[18 Oct 2007 13:38]
Konstantin Osipov
OK to push, it's safe to call close_thread_tables in all cases, so please do so.
[18 Oct 2007 14:14]
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/35844 ChangeSet@1.2576, 2007-10-18 16:14:27+02:00, istruewing@stella.local +1 -0 Bug#31692 - binlog_killed.test crashes sometimes The server crashed when a thread was killed while locking the general_log table at statement begin. The general_log table is handled like a performance schema table. The state of open tables is saved and cleared so that this table seems to be the only open one. Then this table is opened and locked. After writing, the table is closed and the open table state is restored. Before restoring, however, it is asserted that there is no current table open. After locking the table, mysql_lock_tables() checks if the thread was killed in between. If so, it unlocks the table and returns an error. open_ltable() just returns with the error and leaves closing of the table to close_thread_tables(), which is called at statement end. open_performance_schema_table() did not take this into account. It assumed that a failed open_ltable() would not leave an open table behind. Fixed by closing thread tables after open_ltable() and before restore_backup_open_tables_state() if the thread was killed. No test case. It requires correctly timed parallel execution. Since this bug was detected by the test suite, it seems dispensable to add another test.
[19 Oct 2007 10:21]
Ingo Strüwing
Queued to 6.0-engines, 5.2-engines, 5.1-engines.
[22 Oct 2007 17:03]
Bugs System
Pushed into 5.1.23-beta
[24 Oct 2007 18:43]
Paul DuBois
Noted in 5.1.23 changelog.