Bug #83741 InnoDB: Failing assertion: lock->magic_n == 22643
Submitted: 8 Nov 2016 10:16 Modified: 8 Nov 2016 11:15
Reporter: Roel Van de Paar Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S6 (Debug Builds)
Version:5.7.16 OS:Any
Assigned to: CPU Architecture:Any

[8 Nov 2016 10:16] Roel Van de Paar
Description:
Messy;
5.5.52 ERROR 1214 (HY000): The used table type doesn't support FULLTEXT indexes
5.6.34 ERROR 1709 (HY000): Index column size too large. The maximum column size is 767 bytes.
5.7.15 Crashes with bt below

+bt
#0  0x00007f2698682741 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1  0x0000000001822fb0 in my_write_core (sig=6) at /git/mysql-server_dbg/mysys/stacktrace.c:247
#2  0x0000000000e7457c in handle_fatal_signal (sig=6) at /git/mysql-server_dbg/sql/signal_handler.cc:220
#3  <signal handler called>
#4  0x00007f2696a195f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#5  0x00007f2696a1ace8 in __GI_abort () at abort.c:90
#6  0x0000000001b8980f in ut_dbg_assertion_failed (expr=0x2103afa "lock->magic_n == 22643", file=0x21038e0 "/git/mysql-server_dbg/storage/innobase/sync/sync0rw.cc", line=929) at /git/mysql-server_dbg/storage/innobase/ut/ut0dbg.cc:67
#7  0x0000000001b31ea9 in rw_lock_validate (lock=0x7f266c51b2d8) at /git/mysql-server_dbg/storage/innobase/sync/sync0rw.cc:929
#8  0x0000000001b30f58 in rw_lock_free_func (lock=0x7f266c51b2d8) at /git/mysql-server_dbg/storage/innobase/sync/sync0rw.cc:304
#9  0x0000000001c27336 in pfs_rw_lock_free_func (lock=0x7f266c51b2d8) at /git/mysql-server_dbg/storage/innobase/include/sync0rw.ic:769
#10 0x0000000001c2c0f0 in dict_table_stats_latch_free (table=0x7f266c4916a0) at /git/mysql-server_dbg/storage/innobase/dict/dict0dict.cc:305
#11 0x0000000001c2c1c4 in dict_table_stats_latch_destroy (table=0x7f266c4916a0) at /git/mysql-server_dbg/storage/innobase/dict/dict0dict.cc:342
#12 0x0000000001c4f6bb in dict_mem_table_free (table=0x7f266c4916a0) at /git/mysql-server_dbg/storage/innobase/dict/dict0mem.cc:208
#13 0x0000000001ca4e58 in fts_create_one_common_table (trx=0x7f2688400cf8, table=0x7f266c491320, fts_table_name=0x7f2698c70520 "test/FTS_", '0' <repeats 14 times>, "24_BEING_DELETED", fts_suffix=0x2150186 "BEING_DELETED", heap=0x7f266c437518) at /git/mysql-server_dbg/storage/innobase/fts/fts0fts.cc:1867
#14 0x0000000001ca5052 in fts_create_common_tables (trx=0x7f2688400cf8, table=0x7f266c491320, name=0x7f2698c71730 "test/t0", skip_doc_id_index=false) at /git/mysql-server_dbg/storage/innobase/fts/fts0fts.cc:1932
#15 0x0000000001962cc7 in create_table_info_t::create_table (this=0x7f2698c71610) at /git/mysql-server_dbg/storage/innobase/handler/ha_innodb.cc:11809
#16 0x0000000001963647 in ha_innobase::create (this=0x7f266c4aa830, name=0x7f2698c74120 "./test/t0", form=0x7f2698c723d0, create_info=0x7f2698c74a50) at /git/mysql-server_dbg/storage/innobase/handler/ha_innodb.cc:12083
#17 0x0000000000ef5888 in handler::ha_create (this=0x7f266c4aa830, name=0x7f2698c74120 "./test/t0", form=0x7f2698c723d0, info=0x7f2698c74a50) at /git/mysql-server_dbg/sql/handler.cc:4916
#18 0x0000000000ef5e86 in ha_create_table (thd=0x7f266c419000, path=0x7f2698c74120 "./test/t0", db=0x7f266c42bf98 "test", table_name=0x7f266c42b9d8 "t0", create_info=0x7f2698c74a50, update_create_info=false, is_temp_table=false) at /git/mysql-server_dbg/sql/handler.cc:5075
#19 0x00000000015ff15a in rea_create_table (thd=0x7f266c419000, path=0x7f2698c74120 "./test/t0", db=0x7f266c42bf98 "test", table_name=0x7f266c42b9d8 "t0", create_info=0x7f2698c74a50, create_fields=..., keys=2, key_info=0x7f266c42ca90, file=0x7f266c42c7a0, no_ha_table=false) at /git/mysql-server_dbg/sql/unireg.cc:537
#20 0x000000000157f547 in create_table_impl (thd=0x7f266c419000, db=0x7f266c42bf98 "test", table_name=0x7f266c42b9d8 "t0", path=0x7f2698c74120 "./test/t0", create_info=0x7f2698c74a50, alter_info=0x7f2698c744c0, internal_tmp_table=false, select_field_count=0, no_ha_table=false, is_trans=0x7f2698c743ae, key_info=0x7f2698c74330, key_count=0x7f2698c7432c) at /git/mysql-server_dbg/sql/sql_table.cc:5254
#21 0x000000000157fa9f in mysql_create_table_no_lock (thd=0x7f266c419000, db=0x7f266c42bf98 "test", table_name=0x7f266c42b9d8 "t0", create_info=0x7f2698c74a50, alter_info=0x7f2698c744c0, select_field_count=0, is_trans=0x7f2698c743ae) at /git/mysql-server_dbg/sql/sql_table.cc:5382
#22 0x000000000157fb95 in mysql_create_table (thd=0x7f266c419000, create_table=0x7f266c42ba10, create_info=0x7f2698c74a50, alter_info=0x7f2698c744c0) at /git/mysql-server_dbg/sql/sql_table.cc:5428
#23 0x00000000014f306a in mysql_execute_command (thd=0x7f266c419000, first_level=true) at /git/mysql-server_dbg/sql/sql_parse.cc:3199
#24 0x00000000014f97d5 in mysql_parse (thd=0x7f266c419000, parser_state=0x7f2698c75560) at /git/mysql-server_dbg/sql/sql_parse.cc:5559
#25 0x00000000014eef69 in dispatch_command (thd=0x7f266c419000, com_data=0x7f2698c75cb0, command=COM_QUERY) at /git/mysql-server_dbg/sql/sql_parse.cc:1427
#26 0x00000000014ede33 in do_command (thd=0x7f266c419000) at /git/mysql-server_dbg/sql/sql_parse.cc:995
#27 0x000000000161d370 in handle_connection (arg=0x7f267cfe9840) at /git/mysql-server_dbg/sql/conn_handler/connection_handler_per_thread.cc:300
#28 0x000000000184f79c in pfs_spawn_thread (arg=0x7f267ce76020) at /git/mysql-server_dbg/storage/perfschema/pfs.cc:2188
#29 0x00007f269867ddc5 in start_thread (arg=0x7f2698c76700) at pthread_create.c:308
#30 0x00007f2696adaced in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

How to repeat:
DROP DATABASE test;CREATE DATABASE test;USE test;
set session debug="+d,ib_create_table_fail_at_create_index";
CREATE TABLE t0(b INT,c TEXT,KEY(b),FULLTEXT(c)) ENGINE=InnoDB;
[8 Nov 2016 11:15] MySQL Verification Team
Hello Roel,

Thank you for the report and test case.
Observed that 5.7.16 debug build is affected.

Thanks,
Umesh