Bug #54053 | Drop table mysql.ibbackup_binlog_marker crashes the server for innodb plugin | ||
---|---|---|---|
Submitted: | 28 May 2010 3:15 | Modified: | 5 Oct 2010 20:06 |
Reporter: | Hema Sridharan | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Enterprise Backup | Severity: | S2 (Serious) |
Version: | mysql-5.1-meb, MEB 3.1.0 | OS: | Linux |
Assigned to: | Thava Alagu | CPU Architecture: | Any |
[28 May 2010 3:15]
Hema Sridharan
[28 May 2010 3:16]
Hema Sridharan
Here is the attached test case to reproduce the crash
Attachment: innobackup_bug.test (application/test, text), 3.75 KiB.
[29 May 2010 5:38]
Sveta Smirnova
Thank you for the report. Verified as described. Option --innodb-file-per-table=1 should be used.
[10 Jun 2010 11:35]
Thava Alagu
The attached test case removes datadir/dbb directory when the server is up and running. This is not supported. It will be interesting to see if the bug reproduces if the rm -rf datadir/dbb is replaced with drop database dbb;
[23 Jun 2010 6:57]
Sveta Smirnova
It still crashes with InnoDB Plugin
[26 Jul 2010 13:03]
Thava Alagu
Need to fix the reproducible test case that performs unsupported operation.
[4 Aug 2010 21:42]
Thava Alagu
I was able to reproduce the crash. The root cause of the problem seems to be with the innodb plugin which crashes after detecting a missing tablespace (.ibd file). However the same problem does not reproduce with the latest innodb plugin available with mysql-5.1 tree. The problem is reproducible with mysql-5.1-meb tree as of today which contains changes from mysql-5.1 upto 2010-04-12; One of the later changes has changed the way of table space id assignment and management. May be the fix for Bug #53578 [ assert on invalid page access, in fil_io() ] may have fixed this problem too. The crash produces the following stack trace: #0 0xb8034430 in __kernel_vsyscall () #1 0xb7ff1158 in pthread_kill () from /lib/tls/i686/cmov/libpthread.so.0 #2 0x0860c87d in my_write_core (sig=6) at stacktrace.c:329 #3 0x08282995 in handle_segfault (sig=6) at mysqld.cc:2571 #4 <signal handler called> #5 0xb8034430 in __kernel_vsyscall () #6 0xb7e278a0 in raise () from /lib/tls/i686/cmov/libc.so.6 #7 0xb7e29268 in abort () from /lib/tls/i686/cmov/libc.so.6 #8 0xb74468ec in fil_open_single_table_tablespace (check_space_id=1, id=1, flags=1, name=0xa96a3c0c "mydb/t1") at fil/fil0fil.c:2981 #9 0xb743e6f7 in dict_load_table (name=0xa96a3c0c "mydb/t1") at dict/dict0load.c:974 #10 0xb7434d7e in dict_table_get_low (table_name=0xa96a3c0c "mydb/t1") at ./include/dict0dict.ic:768 #11 0xb74ad60d in row_drop_table_for_mysql (name=0xa96a3c0c "mydb/t1", trx=0x9d5e140, drop_db=0) at row/row0mysql.c:3050 #12 0xb745f788 in ha_innodb::delete_table (this=0x9d875b0, name=0xa96a4e9b "./mydb/t1") at handler/ha_innodb.cc:6911 #13 0x083c9bda in handler::ha_delete_table (this=0x9d875b0, name=0xa96a4e9b "./mydb/t1") at handler.cc:3369 #14 0x083d0476 in ha_delete_table (thd=0x9d5a3f0, table_type=0x95a4bc8, path=0xa96a4e9b "./mydb/t1", db=0x9d875a8 "mydb", alias=0x9d873a8 "t1", generate_warning=true) at handler.cc:1992 #15 0x083fb824 in mysql_rm_table_part2 (thd=0x9d5a3f0, tables=0x9d873d0, if_exists=false, drop_temporary=false, drop_view=false, dont_log_query=false) at sql_table.cc:2040 #16 0x083fbf5a in mysql_rm_table (thd=0x9d5a3f0, tables=0x9d873d0, if_exists=0 '\0', drop_temporary=0 '\0') at sql_table.cc:1819 #17 0x082993ef in mysql_execute_command (thd=0x9d5a3f0) at sql_parse.cc:3385 #18 0x0829f33b in mysql_parse (thd=0x9d5a3f0, inBuf=0x9d87340 "DROP TABLE t1", length=13, found_semicolon=0xa96a6090) at sql_parse.cc:5971 #19 0x082a015f in dispatch_command (command=COM_QUERY, thd=0x9d5a3f0, packet=0x9d7f2e1 "DROP TABLE t1", packet_length=13) at sql_parse.cc:1233 #20 0x082a16c4 in do_command (thd=0x9d5a3f0) at sql_parse.cc:874 #21 0x0828c77b in handle_one_connection (arg=0x9d5a3f0) at sql_connect.cc:1127 #22 0xb7fec50f in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #23 0xb7edda0e in clone () from /lib/tls/i686/cmov/libc.so.6 The crash happens in fil_open_single_table_tablespace() function line 2981 assert failure: ut_a(flags != DICT_TF_COMPACT); Following MTR test script rm_ibd.test can be used to reproduce the problem. Note that missing tablespace condition should not cause crash; For documentation on how to deal with such conditions, see: http://dev.mysql.com/doc/refman/5.1/en/innodb-troubleshooting-datadict.html --source include/not_embedded.inc --source include/have_innodb.inc --source suite/innodb/include/have_innodb_plugin.inc SET GLOBAL innodb_file_per_table=on; show plugins; show variables like '%innodb%' ; LET $MYSQLD_DATADIR = `SELECT @@datadir`; CREATE DATABASE mydb; CREATE TABLE mydb.t1(id INT)ENGINE=INNODB; INSERT INTO mydb.t1 VALUES (1),(2),(3),(4),(5); # Now shutdown the server. --source suite/meb/include/stop_mysqld.inc # Now delete mydb/t1.ibd file --remove_file $MYSQLD_DATADIR/mydb/t1.ibd # Restart server. --source suite/meb/include/restart_mysqld.inc # After restore verify that databases and tables are restored USE mydb; # SHOW TABLES; DROP TABLE t1; exit; rm_ibd.opt file contains: --ignore-builtin-innodb The problem may have been fixed by now, but it needs review by some one from innodb plugin development team.
[8 Sep 2010 16:02]
Mark Callaghan
I think this was fixed by http://bugs.mysql.com/bug.php?id=54009
[5 Oct 2010 11:21]
Thava Alagu
Verified that the problem no longer reproduces with the latest mysql 5.1 version.
[5 Oct 2010 20:06]
Hema Sridharan
Verified this bug in the latest mysql-5.1 tree and seems the issue is fixed now. So closing the bug.