ALTER TABLE crashes on corrupted InnoDB table

Bug #1385062 reported by Roel Van de Paar
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.1
Won't Fix
Undecided
Unassigned
5.5
Won't Fix
Undecided
Unassigned
5.6
Won't Fix
Medium
Unassigned
5.7
Fix Released
Medium
Unassigned

Bug Description

2014-10-20 23:26:16 7fd96c54b700 InnoDB: Warning: cannot find a free slot for an undo log. Do you have too
InnoDB: many active transactions running concurrently?
2014-10-20 23:26:16 7fd96c54b700 InnoDB: Unable to assign a new identifier to table `test`.`t2` /* Partition `p0` */
InnoDB: after truncating it. Background processes may corrupt the table!
12:26:16 UTC - mysqld got signal 11 ;
[...]
Query (7fd914004e90): ALTER TABLE t2 ADD c2 TINYBLOB NULL
Connection ID (thread ID): 4

Single threaded run, single mysqld involved

Thread 1 (Thread 0x7fd96c54b700 (LWP 18848)):
+bt
#0 0x00007fd975b4d771 in pthread_kill () from /lib64/libpthread.so.0
#1 0x0000000000ab7586 in my_write_core (sig=11) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/mysys/stacktrace.c:422
#2 0x000000000072f9ff in handle_fatal_signal (sig=11) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/signal_handler.cc:236
#3 <signal handler called>
#4 0x00007fd9747a2901 in __strnlen_sse2 () from /lib64/libc.so.6
#5 0x0000000000e9d822 in process_str_arg (cs=0x186c3c0 <my_charset_utf8_general_ci>, to=0x7fd96c546546 "", end=0x7fd96c54673f "", width=18446744073709551615, par=0x8f8f8f8f8f8f8f8f <Address 0x8f8f8f8f8f8f8f8f out of bounds>, print_type=0) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/strings/my_vsnprintf.c:195
#6 0x0000000000e9f206 in my_vsnprintf_ex (cs=0x186c3c0 <my_charset_utf8_general_ci>, to=0x7fd96c546546 "", n=512, fmt=0x3695e5f "s is corrupted", ap=0x7fd96c546740) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/strings/my_vsnprintf.c:607
#7 0x0000000000aae348 in my_error (nr=1712, MyFlags=0) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/mysys/my_error.c:181
#8 0x0000000000af7683 in ha_innobase::inplace_alter_table (this=0x7fd9140b07d0, altered_table=0x7fd9140b71a0, ha_alter_info=0x7fd96c547090) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/storage/innobase/handler/handler0alter.cc:4000
#9 0x000000000085f201 in handler::ha_inplace_alter_table (this=0x7fd9140b07d0, altered_table=0x7fd9140b71a0, ha_alter_info=0x7fd96c547090) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/handler.h:2955
#10 0x0000000000e5c087 in ha_partition::inplace_alter_table (this=0x7fd91407f7b0, altered_table=0x7fd9140b71a0, ha_alter_info=0x7fd96c547090) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/ha_partition.cc:8157
#11 0x000000000085f201 in handler::ha_inplace_alter_table (this=0x7fd91407f7b0, altered_table=0x7fd9140b71a0, ha_alter_info=0x7fd96c547090) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/handler.h:2955
#12 0x000000000085729c in mysql_inplace_alter_table (thd=0x36c6430, table_list=0x7fd914004f88, table=0x7fd9140afee0, altered_table=0x7fd9140b71a0, ha_alter_info=0x7fd96c547090, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7fd96c546ae0, alter_ctx=0x7fd96c5475f0) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_table.cc:6627
#13 0x000000000085c080 in mysql_alter_table (thd=0x36c6430, new_db=0x7fd9140054e8 "test", new_name=0x0, create_info=0x7fd96c5484b0, table_list=0x7fd914004f88, alter_info=0x7fd96c5483f0, order_num=0, order=0x0, ignore=false) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_table.cc:8638
#14 0x00000000009a3d65 in Sql_cmd_alter_table::execute (this=0x7fd9140055b0, thd=0x36c6430) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_alter.cc:317
#15 0x00000000007e9da3 in mysql_execute_command (thd=0x36c6430) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_parse.cc:5411
#16 0x00000000007ed193 in mysql_parse (thd=0x36c6430, rawbuf=0x7fd914004e90 "ALTER TABLE t2 ADD c2 TINYBLOB NULL", length=35, parser_state=0x7fd96c549d50) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_parse.cc:6773
#17 0x00000000007df5fc in dispatch_command (command=COM_QUERY, thd=0x36c6430, packet=0x3eb6291 "ALTER TABLE t2 ADD c2 TINYBLOB NULL;", packet_length=36) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_parse.cc:1432
#18 0x00000000007de528 in do_command (thd=0x36c6430) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_parse.cc:1049
#19 0x00000000008c2c30 in threadpool_process_request (thd=0x36c6430) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/threadpool_common.cc:311
#20 0x00000000008c5572 in handle_event (connection=0x3e39390) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/threadpool_unix.cc:1553
#21 0x00000000008c57a2 in worker_main (param=0x1898400 <all_groups+2048>) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/threadpool_unix.cc:1606
#22 0x0000000000dc5bac in pfs_spawn_thread (arg=0x3e7d6a0) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/storage/perfschema/pfs.cc:1860
#23 0x00007fd975b48df3 in start_thread () from /lib64/libpthread.so.0
#24 0x00007fd97481201d in clone () from /lib64/libc.so.6

Revision history for this message
Roel Van de Paar (roel11) wrote :
Revision history for this message
Roel Van de Paar (roel11) wrote :
Revision history for this message
Ramesh Sivaraman (rameshvs02) wrote :

** Testcase

DROP DATABASE test;CREATE DATABASE test;USE test;
create table t1(c1 int);
set global innodb_trx_rseg_n_slots_debug=1;
truncate t1;
ALTER TABLE t1 ADD COLUMN c4 INT COMMENT ' E ';

tags: added: upstream
summary: - mysqld got signal 11 ; on ALTER TABLE | handle_fatal_signal (sig=11) in
- ha_innobase::inplace_alter_table
+ ALTER TABLE crashes on corrupted InnoDB table
tags: added: innodb
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1567

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.