Bug #74730 Assertion failure in fil0fil.cc line 5594 | abort sig 6 in fil/fil0fil.cc:5594
Submitted: 7 Nov 2014 10:23 Modified: 7 Nov 2014 10:34
Reporter: Ramesh Sivaraman Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Options Severity:S3 (Non-critical)
Version:5.6.20-debug, 5.6.22, 5.7.6 OS:Linux (CentOS 7)
Assigned to: CPU Architecture:Any

[7 Nov 2014 10:23] Ramesh Sivaraman
Description:
**** GDB info

#0  0x00007f198c6ff771 in pthread_kill () from /lib64/libpthread.so.0
#1  0x0000000000a9035e in my_write_core (sig=6) at /ssd/ramesh/mysql-server/mysql-5.6/mysys/stacktrace.c:422
#2  0x0000000000723688 in handle_fatal_signal (sig=6) at /ssd/ramesh/mysql-server/mysql-5.6/sql/signal_handler.cc:230
#3  <signal handler called>
#4  0x00007f198b50b5c9 in raise () from /lib64/libc.so.6
#5  0x00007f198b50ccd8 in abort () from /lib64/libc.so.6
#6  0x0000000000d87faa in fil_io (type=10, sync=true, space_id=6, zip_size=0, block_offset=3, byte_offset=0, len=16384, buf=0x7f190c014000, message=0x7f190b500dc0) at /ssd/ramesh/mysql-server/mysql-5.6/storage/innobase/fil/fil0fil.cc:5594
#7  0x0000000000d39c9f in buf_read_page_low (err=0x7f198ccf55fc, sync=true, mode=132, space=6, zip_size=0, unzip=0, tablespace_version=8, offset=10) at /ssd/ramesh/mysql-server/mysql-5.6/storage/innobase/buf/buf0rea.cc:194
#8  0x0000000000d3a267 in buf_read_page (space=6, zip_size=0, offset=10) at /ssd/ramesh/mysql-server/mysql-5.6/storage/innobase/buf/buf0rea.cc:411
#9  0x0000000000d1a449 in buf_page_get_gen (space=6, zip_size=0, offset=10, rw_latch=2, guess=0x0, mode=10, file=0xfed2f0 "/ssd/ramesh/mysql-server/mysql-5.6/storage/innobase/handler/ha_innodb.cc", line=14432, mtr=0x7f198ccf5720) at /ssd/ramesh/mysql-server/mysql-5.6/storage/innobase/buf/buf0buf.cc:2613
#10 0x0000000000b5d383 in innodb_make_page_dirty (thd=0x7f18f9324000, var=0x1517720 <mysql_sysvar_fil_make_page_dirty_debug>, var_ptr=0x18151a0 <srv_fil_make_page_dirty_debug>, save=0x7f18efc1f248) at /ssd/ramesh/mysql-server/mysql-5.6/storage/innobase/handler/ha_innodb.cc:14431
#11 0x00000000007e6788 in sys_var_pluginvar::global_update (this=0x7f1985f6f668, thd=0x7f18f9324000, var=0x7f18efc1f228) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_plugin.cc:3271
#12 0x00000000007211af in sys_var::update (this=0x7f1985f6f668, thd=0x7f18f9324000, var=0x7f18efc1f228) at /ssd/ramesh/mysql-server/mysql-5.6/sql/set_var.cc:193
#13 0x00000000007222b8 in set_var::update (this=0x7f18efc1f228, thd=0x7f18f9324000) at /ssd/ramesh/mysql-server/mysql-5.6/sql/set_var.cc:670
#14 0x0000000000721e86 in sql_set_variables (thd=0x7f18f9324000, var_list=0x7f18f9326e10) at /ssd/ramesh/mysql-server/mysql-5.6/sql/set_var.cc:573
#15 0x00000000007d2449 in mysql_execute_command (thd=0x7f18f9324000) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_parse.cc:3713
#16 0x00000000007d8fa4 in mysql_parse (thd=0x7f18f9324000, rawbuf=0x7f18efc1f010 "set global innodb_fil_make_page_dirty_debug=@space_id", length=53, parser_state=0x7f198ccf6e70) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_parse.cc:6245
#17 0x00000000007cc557 in dispatch_command (command=COM_QUERY, thd=0x7f18f9324000, packet=0x7f18f9362001 "set global innodb_fil_make_page_dirty_debug=@space_id", packet_length=53) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_parse.cc:1332
#18 0x00000000007cb646 in do_command (thd=0x7f18f9324000) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_parse.cc:1034
#19 0x0000000000793a61 in do_handle_one_connection (thd_arg=0x7f18f9324000) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_connect.cc:982
#20 0x000000000079354a in handle_one_connection (arg=0x7f18f9324000) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_connect.cc:898
#21 0x0000000000ad4b5c in pfs_spawn_thread (arg=0x7f1988bfeb00) at /ssd/ramesh/mysql-server/mysql-5.6/storage/perfschema/pfs.cc:1860
#22 0x00007f198c6fadf3 in start_thread () from /lib64/libpthread.so.0
#23 0x00007f198b5cc01d in clone () from /lib64/libc.so.6

How to repeat:
DROP DATABASE test;CREATE DATABASE test;USE test;
set global innodb_saved_page_number_debug=10;
CREATE TABLE t1(a TIME,b TIME(1),c INT,d CHAR (1),e INT);
ALTER TABLE t1 ADD KEY(d(1));
insert into t1(a)values (1),(1) on duplicate key update b=3,c=c;
INSERT INTO t1(a)VALUES (0),(0),(0);
select space from information_schema.innodb_sys_tables where name='test/t1' into @space_id;
set global innodb_limit_optimistic_insert_debug=0;
INSERT INTO t1(a,b)VALUES (1,1),(1,2),(1,3),(1,4),(1,5),(2,2),(2,3),(2,1),(3,1),(4,1),(4,2),(4,3),(4,4),(4,5),(4,6);
UPDATE t1 SET b=0
set global innodb_fil_make_page_dirty_debug=@space_id;
[7 Nov 2014 10:34] MySQL Verification Team
Hello Ramesh Sivaraman,

Thank you for the bug report and test case.
Confirmed that only debug builds are affected - 5.6.22.

Thanks,
Umesh
[7 Nov 2014 10:35] MySQL Verification Team
// 5.6.22

(gdb) bt
#0  0x0000003deb00c8ac in pthread_kill () from /lib64/libpthread.so.0
#1  0x0000000000b0011b in my_write_core (sig=6) at /pb2/build/sb_0-13562263-1414689457.82/mysqlcom-pro-5.6.22/mysys/stacktrace.c:422
#2  0x000000000077ecb8 in handle_fatal_signal (sig=6) at /pb2/build/sb_0-13562263-1414689457.82/mysqlcom-pro-5.6.22/sql/signal_handler.cc:230
#3  <signal handler called>
#4  0x0000003deac32625 in raise () from /lib64/libc.so.6
#5  0x0000003deac33e05 in abort () from /lib64/libc.so.6
#6  0x0000000000dd564b in fil_io (type=10, sync=true, space_id=6, zip_size=0, block_offset=3, byte_offset=0, len=16384, buf=0x7f4f201c4000, message=0x7f4f1f9a7e80)
    at /pb2/build/sb_0-13562263-1414689457.82/mysqlcom-pro-5.6.22/storage/innobase/fil/fil0fil.cc:5608
#7  0x0000000000d863a7 in buf_read_page_low (err=0x7f4f19e868bc, sync=true, mode=132, space=6, zip_size=0, unzip=0, tablespace_version=8, offset=10)
    at /pb2/build/sb_0-13562263-1414689457.82/mysqlcom-pro-5.6.22/storage/innobase/buf/buf0rea.cc:194
#8  0x0000000000d8699d in buf_read_page (space=6, zip_size=0, offset=10) at /pb2/build/sb_0-13562263-1414689457.82/mysqlcom-pro-5.6.22/storage/innobase/buf/buf0rea.cc:411
#9  0x0000000000d6699d in buf_page_get_gen (space=6, zip_size=0, offset=10, rw_latch=2, guess=0x0, mode=10,
    file=0x110ad30 "/pb2/build/sb_0-13562263-1414689457.82/mysqlcom-pro-5.6.22/storage/innobase/handler/ha_innodb.cc", line=14480, mtr=0x7f4f19e86a10)
    at /pb2/build/sb_0-13562263-1414689457.82/mysqlcom-pro-5.6.22/storage/innobase/buf/buf0buf.cc:2618
#10 0x0000000000ba766c in innodb_make_page_dirty (thd=0x29f2c90, var=0x1696840, var_ptr=0x19a4100, save=0x7f4ef0005208)
    at /pb2/build/sb_0-13562263-1414689457.82/mysqlcom-pro-5.6.22/storage/innobase/handler/ha_innodb.cc:14479
#11 0x0000000000845a63 in sys_var_pluginvar::global_update (this=0x233bef8, thd=0x29f2c90, var=0x7f4ef00051e8)
    at /pb2/build/sb_0-13562263-1414689457.82/mysqlcom-pro-5.6.22/sql/sql_plugin.cc:3271
#12 0x000000000077c782 in sys_var::update (this=0x233bef8, thd=0x29f2c90, var=0x7f4ef00051e8) at /pb2/build/sb_0-13562263-1414689457.82/mysqlcom-pro-5.6.22/sql/set_var.cc:194
#13 0x000000000077d8bc in set_var::update (this=0x7f4ef00051e8, thd=0x29f2c90) at /pb2/build/sb_0-13562263-1414689457.82/mysqlcom-pro-5.6.22/sql/set_var.cc:670
#14 0x000000000077d48e in sql_set_variables (thd=0x29f2c90, var_list=0x29f5aa0) at /pb2/build/sb_0-13562263-1414689457.82/mysqlcom-pro-5.6.22/sql/set_var.cc:573
#15 0x0000000000830ec8 in mysql_execute_command (thd=0x29f2c90) at /pb2/build/sb_0-13562263-1414689457.82/mysqlcom-pro-5.6.22/sql/sql_parse.cc:3713
#16 0x00000000008380e1 in mysql_parse (thd=0x29f2c90, rawbuf=0x7f4ef0004fd0 "set global innodb_fil_make_page_dirty_debug=@space_id", length=53, parser_state=0x7f4f19e88680)
    at /pb2/build/sb_0-13562263-1414689457.82/mysqlcom-pro-5.6.22/sql/sql_parse.cc:6357
#17 0x000000000082aa63 in dispatch_command (command=COM_QUERY, thd=0x29f2c90, packet=0x2b225b1 "set global innodb_fil_make_page_dirty_debug=@space_id", packet_length=53)
    at /pb2/build/sb_0-13562263-1414689457.82/mysqlcom-pro-5.6.22/sql/sql_parse.cc:1332
#18 0x0000000000829ac8 in do_command (thd=0x29f2c90) at /pb2/build/sb_0-13562263-1414689457.82/mysqlcom-pro-5.6.22/sql/sql_parse.cc:1034
#19 0x00000000007f0f17 in do_handle_one_connection (thd_arg=0x29f2c90) at /pb2/build/sb_0-13562263-1414689457.82/mysqlcom-pro-5.6.22/sql/sql_connect.cc:982
#20 0x00000000007f09e8 in handle_one_connection (arg=0x29f2c90) at /pb2/build/sb_0-13562263-1414689457.82/mysqlcom-pro-5.6.22/sql/sql_connect.cc:898
#21 0x0000000000e64c25 in pfs_spawn_thread (arg=0x2ae5ce0) at /pb2/build/sb_0-13562263-1414689457.82/mysqlcom-pro-5.6.22/storage/perfschema/pfs.cc:1860
#22 0x0000003deb0079d1 in start_thread () from /lib64/libpthread.so.0
#23 0x0000003deace89dd in clone () from /lib64/libc.so.6
[7 Nov 2014 10:37] MySQL Verification Team
// 5.7.6

(gdb) bt
#0  0x0000003deb00c8ac in pthread_kill () from /lib64/libpthread.so.0
#1  0x0000000000f990a1 in my_write_core (sig=6) at /pb2/build/sb_0-13559856-1414670154.69/mysqlcom-pro-5.7.6-m16/mysys/stacktrace.c:247
#2  0x000000000092d7cc in handle_fatal_signal (sig=6) at /pb2/build/sb_0-13559856-1414670154.69/mysqlcom-pro-5.7.6-m16/sql/signal_handler.cc:219
#3  <signal handler called>
#4  0x0000003deac32625 in raise () from /lib64/libc.so.6
#5  0x0000003deac33e05 in abort () from /lib64/libc.so.6
#6  0x000000000121b81b in ut_dbg_assertion_failed (expr=0x0, file=0x177f108 "/pb2/build/sb_0-13559856-1414670154.69/mysqlcom-pro-5.7.6-m16/storage/innobase/fil/fil0fil.cc", line=4957)
    at /pb2/build/sb_0-13559856-1414670154.69/mysqlcom-pro-5.7.6-m16/storage/innobase/ut/ut0dbg.cc:67
#7  0x00000000012f8159 in fil_io (type=10, sync=true, page_id=..., page_size=..., byte_offset=0, len=16384, buf=0x7f82e3f68000, message=0x7f82e35ab480)
    at /pb2/build/sb_0-13559856-1414670154.69/mysqlcom-pro-5.7.6-m16/storage/innobase/fil/fil0fil.cc:4957
#8  0x00000000012a1a12 in buf_read_page_low (err=0x7f82e2b5cf7c, sync=true, mode=132, page_id=..., page_size=..., unzip=0)
    at /pb2/build/sb_0-13559856-1414670154.69/mysqlcom-pro-5.7.6-m16/storage/innobase/buf/buf0rea.cc:184
#9  0x00000000012a21ab in buf_read_page (page_id=..., page_size=...) at /pb2/build/sb_0-13559856-1414670154.69/mysqlcom-pro-5.7.6-m16/storage/innobase/buf/buf0rea.cc:400
#10 0x000000000127d203 in buf_page_get_gen (page_id=..., page_size=..., rw_latch=2, guess=0x0, mode=10,
    file=0x16e19c0 "/pb2/build/sb_0-13559856-1414670154.69/mysqlcom-pro-5.7.6-m16/storage/innobase/handler/ha_innodb.cc", line=14952, mtr=0x7f82e2b5d670, dirty_with_no_latch=false)
    at /pb2/build/sb_0-13559856-1414670154.69/mysqlcom-pro-5.7.6-m16/storage/innobase/buf/buf0buf.cc:3946
#11 0x000000000104d5d0 in innodb_make_page_dirty (thd=0x7f82b0000cf0, var=0x2049de0, var_ptr=0x2109b20, save=0x7f82b0005fe0)
    at /pb2/build/sb_0-13559856-1414670154.69/mysqlcom-pro-5.7.6-m16/storage/innobase/handler/ha_innodb.cc:14950
#12 0x0000000000cd7a16 in sys_var_pluginvar::global_update (this=0x2b25440, thd=0x7f82b0000cf0, var=0x7f82b0005fc0)
    at /pb2/build/sb_0-13559856-1414670154.69/mysqlcom-pro-5.7.6-m16/sql/sql_plugin.cc:3362
#13 0x0000000000c020c8 in sys_var::update (this=0x2b25440, thd=0x7f82b0000cf0, var=0x7f82b0005fc0) at /pb2/build/sb_0-13559856-1414670154.69/mysqlcom-pro-5.7.6-m16/sql/set_var.cc:192
#14 0x0000000000c03306 in set_var::update (this=0x7f82b0005fc0, thd=0x7f82b0000cf0) at /pb2/build/sb_0-13559856-1414670154.69/mysqlcom-pro-5.7.6-m16/sql/set_var.cc:679
#15 0x0000000000c02ed6 in sql_set_variables (thd=0x7f82b0000cf0, var_list=0x7f82b00033d0) at /pb2/build/sb_0-13559856-1414670154.69/mysqlcom-pro-5.7.6-m16/sql/set_var.cc:582
#16 0x0000000000cb7d95 in mysql_execute_command (thd=0x7f82b0000cf0) at /pb2/build/sb_0-13559856-1414670154.69/mysqlcom-pro-5.7.6-m16/sql/sql_parse.cc:3643
#17 0x0000000000cbce6a in mysql_parse (thd=0x7f82b0000cf0, parser_state=0x7f82e2b5f660) at /pb2/build/sb_0-13559856-1414670154.69/mysqlcom-pro-5.7.6-m16/sql/sql_parse.cc:5397
#18 0x0000000000cb0f2c in dispatch_command (command=COM_QUERY, thd=0x7f82b0000cf0, packet=0x7f82b0009a21 "set global innodb_fil_make_page_dirty_debug=@space_id", packet_length=53)
    at /pb2/build/sb_0-13559856-1414670154.69/mysqlcom-pro-5.7.6-m16/sql/sql_parse.cc:1249
#19 0x0000000000cafbd4 in do_command (thd=0x7f82b0000cf0) at /pb2/build/sb_0-13559856-1414670154.69/mysqlcom-pro-5.7.6-m16/sql/sql_parse.cc:833
#20 0x0000000000dbe89c in handle_connection (arg=0x36a0b90) at /pb2/build/sb_0-13559856-1414670154.69/mysqlcom-pro-5.7.6-m16/sql/conn_handler/connection_handler_per_thread.cc:298
#21 0x000000000138347f in pfs_spawn_thread (arg=0x373f860) at /pb2/build/sb_0-13559856-1414670154.69/mysqlcom-pro-5.7.6-m16/storage/perfschema/pfs.cc:2137
#22 0x0000003deb0079d1 in start_thread () from /lib64/libpthread.so.0
#23 0x0000003deace89dd in clone () from /lib64/libc.so.6
[13 Aug 2017 23:25] Roel Van de Paar
UPDATE t1 SET b=0 - note there is no delimiter. Test both with and without.