Description:
When we start mysql server with --innodb-force-recovery=6 option, set global innodb_file_format_max=Barracuda statement crashing server.
GDB
#0 0x00007f1b0d051771 in pthread_kill () from /lib64/libpthread.so.0
#1 0x0000000000a945ea in my_write_core (sig=6) at /sda/mysql-server-5.6/mysys/stacktrace.c:422
#2 0x0000000000726d14 in handle_fatal_signal (sig=6) at /sda/mysql-server-5.6/sql/signal_handler.cc:230
#3 <signal handler called>
#4 0x00007f1b0be5d5d7 in raise () from /lib64/libc.so.6
#5 0x00007f1b0be5ecc8 in abort () from /lib64/libc.so.6
#6 0x0000000000bb05a9 in mtr_commit (mtr=0x7f1b0d618ec0) at /sda/mysql-server-5.6/storage/innobase/mtr/mtr0mtr.cc:323
#7 0x0000000000ca8276 in trx_sys_file_format_max_write (format_id=1, name=0x17f4b00 <innobase_file_format_max>) at /sda/mysql-server-5.6/storage/innobase/trx/trx0sys.cc:646
#8 0x0000000000ca850e in trx_sys_file_format_max_set (format_id=1, name=0x17f4b00 <innobase_file_format_max>) at /sda/mysql-server-5.6/storage/innobase/trx/trx0sys.cc:773
#9 0x0000000000b46caf in innodb_file_format_max_update (thd=0x7f1afc7ae000, var=0x14f6400 <mysql_sysvar_file_format_max>, var_ptr=0x17f4b00 <innobase_file_format_max>, save=0x7f1af7c1f230) at /sda/mysql-server-5.6/storage/innobase/handler/ha_innodb.cc:14199
#10 0x00000000007ea2c8 in sys_var_pluginvar::global_update (this=0x7f1b067f9010, thd=0x7f1afc7ae000, var=0x7f1af7c1f210) at /sda/mysql-server-5.6/sql/sql_plugin.cc:3267
#11 0x0000000000724869 in sys_var::update (this=0x7f1b067f9010, thd=0x7f1afc7ae000, var=0x7f1af7c1f210) at /sda/mysql-server-5.6/sql/set_var.cc:193
#12 0x0000000000725942 in set_var::update (this=0x7f1af7c1f210, thd=0x7f1afc7ae000) at /sda/mysql-server-5.6/sql/set_var.cc:670
#13 0x000000000072551a in sql_set_variables (thd=0x7f1afc7ae000, var_list=0x7f1afc7b0a68) at /sda/mysql-server-5.6/sql/set_var.cc:573
#14 0x00000000007d5cb4 in mysql_execute_command (thd=0x7f1afc7ae000) at /sda/mysql-server-5.6/sql/sql_parse.cc:3720
#15 0x00000000007dcbc1 in mysql_parse (thd=0x7f1afc7ae000, rawbuf=0x7f1af7c1f010 "set global innodb_file_format_max=Barracuda", length=43, parser_state=0x7f1b0d61a6a0) at /sda/mysql-server-5.6/sql/sql_parse.cc:6386
#16 0x00000000007cfdb0 in dispatch_command (command=COM_QUERY, thd=0x7f1afc7ae000, packet=0x7f1af8ecd001 "set global innodb_file_format_max=Barracuda", packet_length=43) at /sda/mysql-server-5.6/sql/sql_parse.cc:1340
#17 0x00000000007cee03 in do_command (thd=0x7f1afc7ae000) at /sda/mysql-server-5.6/sql/sql_parse.cc:1037
#18 0x0000000000796805 in do_handle_one_connection (thd_arg=0x7f1afc7ae000) at /sda/mysql-server-5.6/sql/sql_connect.cc:982
#19 0x00000000007962ee in handle_one_connection (arg=0x7f1afc7ae000) at /sda/mysql-server-5.6/sql/sql_connect.cc:898
#20 0x0000000000df83d5 in pfs_spawn_thread (arg=0x7f1b0a3f1e80) at /sda/mysql-server-5.6/storage/perfschema/pfs.cc:1860
#21 0x00007f1b0d04cdf5 in start_thread () from /lib64/libpthread.so.0
#22 0x00007f1b0bf1e1ad in clone () from /lib64/libc.so.6
How to repeat:
Testcase
DROP DATABASE test;CREATE DATABASE test;USE test;
set global innodb_file_format_max=Barracuda;
The attached tarball gives the testcase as an exact match of our system,
including some handy utilities
$ vi {epoch}_mybase # Update base path in this file (the only change
required!). For non-binary distribution please update SOURCE_DIR
location also.
$ ./{epoch}_init # Initializes the data dir
$ ./{epoch}_start # Starts mysqld
$ ./{epoch}_cl # To check mysqld is up
$ ./{epoch}_run # Run the testcase with pquery binary(produces
output)
$ vi /dev/shm/{epoch}/error.log.out # Verify the error log
$ ./{epoch}_gdb # Brings you to a gdb prompt attached to correct
mysqld
& generated core
$ ./{epoch}_parse_core # Create {epoch}_STD.gdb and {epoch}_FULL.gdb;
standard and full var gdb stack traces
etc.