|
Repeating the testcase a number of times has shown the server to hang more easily.
|
|
Inserting this into the testcase:
CREATE TABLE bug56143_1 (a INT);
|
Makes the testcase more reliably crashable it seems, especially when repeated twice.
|
|
With the modifications specified in the last comment, and uploaded as fk2.sql, the outcome is:
|
10.4.15 eae968f62d285de97ed607c87bc131cd863d5d03 (Optimized)
|
Core was generated by `/test/MD110820-mariadb-10.4.15-linux-x86_64-opt/bin/mysqld --no-defaults --core'.
|
Program terminated with signal SIGSEGV, Segmentation fault.
|
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
|
at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
|
[Current thread is 1 (Thread 0x14f632df3700 (LWP 2209794))]
|
(gdb) bt
|
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
|
#1 0x000055ee5b081a77 in my_write_core (sig=sig@entry=11) at /test/10.4_opt/mysys/stacktrace.c:482
|
#2 0x000055ee5aa5962a in handle_fatal_signal (sig=11) at /test/10.4_opt/sql/signal_handler.cc:343
|
#3 <signal handler called>
|
#4 0x000055ee5aa6247b in handler::ha_create_partitioning_metadata (this=0x14f60b9be4b8, name=<optimized out>, old_name=<optimized out>, action_flag=<optimized out>) at /test/10.4_opt/sql/handler.cc:4807
|
#5 0x000055ee5a8dad80 in create_table_impl (thd=thd@entry=0x14f60b812008, orig_db=@0x14f60b83f098: {str = 0x14f60b83f740 "test", length = 4}, orig_table_name=@0x14f60b83f0a8: {str = 0x14f60b83f048 "t1", length = 2}, db=@0x14f60b83f098: {str = 0x14f60b83f740 "test", length = 4}, table_name=@0x14f60b83f0a8: {str = 0x14f60b83f048 "t1", length = 2}, path=path@entry=0x14f632df0010 "./test/t1", options={m_options = DDL_options_st::OPT_NONE}, create_info=0x14f632df03e0, alter_info=0x14f632df0320, create_table_mode=0, is_trans=0x14f632df0297, key_info=0x14f632defff8, key_count=0x14f632defff4, frm=0x14f632df0000) at /test/10.4_opt/sql/sql_table.cc:5094
|
#6 0x000055ee5a8db0ab in mysql_create_table_no_lock (thd=thd@entry=0x14f60b812008, db=db@entry=0x14f60b83f098, table_name=table_name@entry=0x14f60b83f0a8, create_info=create_info@entry=0x14f632df03e0, alter_info=0x14f632df0320, is_trans=is_trans@entry=0x14f632df0297, create_table_mode=0, table_list=0x14f60b83f080) at /test/10.4_opt/sql/sql_table.cc:5176
|
#7 0x000055ee5a8db2c1 in mysql_create_table (thd=thd@entry=0x14f60b812008, create_table=create_table@entry=0x14f60b83f080, create_info=create_info@entry=0x14f632df03e0, alter_info=alter_info@entry=0x14f632df0320) at /test/10.4_opt/sql/sql_table.cc:5268
|
#8 0x000055ee5a8dc5ea in Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x14f60b812008) at /test/10.4_opt/sql/sql_table.cc:11493
|
#9 0x000055ee5a848ca4 in mysql_execute_command (thd=thd@entry=0x14f60b812008) at /test/10.4_opt/sql/sql_parse.cc:6098
|
#10 0x000055ee5a85022a in mysql_parse (thd=0x14f60b812008, rawbuf=<optimized out>, length=74203, parser_state=0x14f632df24d0, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.4_opt/sql/sql_parse.cc:7896
|
#11 0x000055ee5a852685 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14f60b812008, packet=packet@entry=0x14f60b8ce009 "CREATE TABLE t1 ( `a` int(11) DEFAULT NULL, KEY `a` (`a`), CONSTRAINT `", 'a' <repeats 50 times>, "1` FOREIGN KEY (`a`) REFERENCES `bug56143_1` (`a`) ON UPDATE SET NULL, CONSTR"..., packet_length=packet_length@entry=74203, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_opt/sql/sql_parse.cc:1834
|
#12 0x000055ee5a853e04 in do_command (thd=0x14f60b812008) at /test/10.4_opt/sql/sql_parse.cc:1352
|
#13 0x000055ee5a930dbe in do_handle_one_connection (connect=connect@entry=0x14f62fc32748) at /test/10.4_opt/sql/sql_connect.cc:1412
|
#14 0x000055ee5a930e7d in handle_one_connection (arg=0x14f62fc32748) at /test/10.4_opt/sql/sql_connect.cc:1316
|
#15 0x000014f631ff16db in start_thread (arg=0x14f632df3700) at pthread_create.c:463
|
#16 0x000014f63116ba3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Bug confirmed present in:
MariaDB: 10.1.47 (dbg), 10.1.47 (opt), 10.2.34 (dbg), 10.2.34 (opt), 10.3.25 (dbg), 10.3.25 (opt), 10.4.15 (dbg), 10.4.15 (opt)
Bug confirmed not present in:
MariaDB: 10.5.6 (dbg), 10.5.6 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)
Producing the crash on a debug build of 10.4.15 specifically required executing fk2.sql multiple times (4-5) in succession. Even 30-40+ repeats did not crash 10.5 in any way.
|
|
Lowering the priority as the use case probably will never be the real world. Also high chance it is superseded by MDEV-16417.
|
|
Adding ASAN trace for fk.sql as requested in MDEV-23467
|
10.4.14 ed1434df88270ebe70ae412b5b723920b6b4e0e8 (Optimized)
|
ASAN:DEADLYSIGNAL
|
=================================================================
|
==2380091==ERROR: AddressSanitizer: SEGV on unknown address 0x6210000a0000 (pc 0x1501e5c91d8f bp 0x000000000d68 sp 0x1501c192c1d8 T31)
|
==2380091==The signal is caused by a WRITE memory access.
|
#0 0x1501e5c91d8e (/lib/x86_64-linux-gnu/libc.so.6+0x18ed8e)
|
#1 0x1501e5b9153b in _IO_default_xsputn (/lib/x86_64-linux-gnu/libc.so.6+0x8e53b)
|
#2 0x1501e5b6007a in vfprintf (/lib/x86_64-linux-gnu/libc.so.6+0x5d07a)
|
#3 0x1501e5b84740 in _IO_vsprintf (/lib/x86_64-linux-gnu/libc.so.6+0x81740)
|
#4 0x55b2cbbcbd18 in __interceptor_vsprintf (/test/ASAN_MD290520-mariadb-10.4.14-linux-x86_64-opt/bin/mysqld+0x4ec6d18)
|
#5 0x55b2cdea90ed in ib_push_warning(trx_t*, dberr_t, char const*, ...) /test/10.4_opt/storage/innobase/handler/ha_innodb.cc:21571
|
#6 0x55b2ce816ebc in dict_create_foreign_constraints_low /test/10.4_opt/storage/innobase/dict/dict0dict.cc:4194
|
#7 0x55b2ce81a568 in dict_create_foreign_constraints(trx_t*, char const*, unsigned long, char const*, unsigned long) /test/10.4_opt/storage/innobase/dict/dict0dict.cc:4582
|
#8 0x55b2cdeeb34e in create_table_info_t::create_table(bool) /test/10.4_opt/storage/innobase/handler/ha_innodb.cc:12436
|
#9 0x55b2cdf1605f in ha_innobase::create(char const*, TABLE*, HA_CREATE_INFO*, bool, trx_t*) /test/10.4_opt/storage/innobase/handler/ha_innodb.cc:12884
|
#10 0x55b2cd117a86 in handler::ha_create(char const*, TABLE*, HA_CREATE_INFO*) /test/10.4_opt/sql/handler.cc:4742
|
#11 0x55b2cd11b503 in ha_create_table(THD*, char const*, char const*, char const*, HA_CREATE_INFO*, st_mysql_const_unsigned_lex_string*) /test/10.4_opt/sql/handler.cc:5206
|
#12 0x55b2cc5b60e0 in create_table_impl /test/10.4_opt/sql/sql_table.cc:5070
|
#13 0x55b2cc5b85df in mysql_create_table_no_lock(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, Table_specification_st*, Alter_info*, bool*, int, TABLE_LIST*) /test/10.4_opt/sql/sql_table.cc:5154
|
#14 0x55b2cc5b939c in mysql_create_table(THD*, TABLE_LIST*, Table_specification_st*, Alter_info*) /test/10.4_opt/sql/sql_table.cc:5246
|
#15 0x55b2cc5cfdb1 in Sql_cmd_create_table_like::execute(THD*) /test/10.4_opt/sql/sql_table.cc:11466
|
#16 0x55b2cc1b54a3 in mysql_execute_command(THD*) /test/10.4_opt/sql/sql_parse.cc:6101
|
#17 0x55b2cc1e239b in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /test/10.4_opt/sql/sql_parse.cc:7901
|
#18 0x55b2cc1efefd in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /test/10.4_opt/sql/sql_parse.cc:1841
|
#19 0x55b2cc1f9937 in do_command(THD*) /test/10.4_opt/sql/sql_parse.cc:1359
|
#20 0x55b2cc8044ae in do_handle_one_connection(CONNECT*) /test/10.4_opt/sql/sql_connect.cc:1412
|
#21 0x55b2cc804d92 in handle_one_connection /test/10.4_opt/sql/sql_connect.cc:1316
|
#22 0x1501e800b6da in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76da)
|
#23 0x1501e5c24a3e in __clone (/lib/x86_64-linux-gnu/libc.so.6+0x121a3e)
|
|
AddressSanitizer can not provide additional info.
|
SUMMARY: AddressSanitizer: SEGV (/lib/x86_64-linux-gnu/libc.so.6+0x18ed8e)
|
Thread T31 created by T0 here:
|
#0 0x55b2cbb6520f in __interceptor_pthread_create (/test/ASAN_MD290520-mariadb-10.4.14-linux-x86_64-opt/bin/mysqld+0x4e6020f)
|
#1 0x55b2cbc6043b in inline_mysql_thread_create /test/10.4_opt/include/mysql/psi/mysql_thread.h:1275
|
#2 0x55b2cbc6043b in create_thread_to_handle_connection(CONNECT*) /test/10.4_opt/sql/mysqld.cc:6261
|
#3 0x55b2cbc72e29 in create_new_thread(CONNECT*) /test/10.4_opt/sql/mysqld.cc:6329
|
#4 0x55b2cbc73688 in handle_accepted_socket(st_mysql_socket, st_mysql_socket) /test/10.4_opt/sql/mysqld.cc:6427
|
#5 0x55b2cbc74d0b in handle_connections_sockets() /test/10.4_opt/sql/mysqld.cc:6585
|
#6 0x55b2cbc772a4 in mysqld_main(int, char**) /test/10.4_opt/sql/mysqld.cc:5917
|
#7 0x1501e5b24b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
|
|
==2380091==ABORTING
|
|
|
Adding ASAN trace for fk2.sql
|
10.4.14 ed1434df88270ebe70ae412b5b723920b6b4e0e8 (Optimized)
|
ASAN:DEADLYSIGNAL
|
=================================================================
|
==2391945==ERROR: AddressSanitizer: SEGV on unknown address 0x6210000a0000 (pc 0x1496a0c19d8f bp 0x000000000d68 sp 0x14967c8b41c8 T31)
|
==2391945==The signal is caused by a WRITE memory access.
|
#0 0x1496a0c19d8e (/lib/x86_64-linux-gnu/libc.so.6+0x18ed8e)
|
#1 0x1496a0b1953b in _IO_default_xsputn (/lib/x86_64-linux-gnu/libc.so.6+0x8e53b)
|
#2 0x1496a0ae807a in vfprintf (/lib/x86_64-linux-gnu/libc.so.6+0x5d07a)
|
#3 0x1496a0b0c740 in _IO_vsprintf (/lib/x86_64-linux-gnu/libc.so.6+0x81740)
|
#4 0x56443055bd18 in __interceptor_vsprintf (/test/ASAN_MD290520-mariadb-10.4.14-linux-x86_64-opt/bin/mysqld+0x4ec6d18)
|
#5 0x5644328390ed in ib_push_warning(trx_t*, dberr_t, char const*, ...) /test/10.4_opt/storage/innobase/handler/ha_innodb.cc:21571
|
#6 0x5644331a81c3 in dict_create_foreign_constraints_low /test/10.4_opt/storage/innobase/dict/dict0dict.cc:4514
|
#7 0x5644331aa568 in dict_create_foreign_constraints(trx_t*, char const*, unsigned long, char const*, unsigned long) /test/10.4_opt/storage/innobase/dict/dict0dict.cc:4582
|
#8 0x56443287b34e in create_table_info_t::create_table(bool) /test/10.4_opt/storage/innobase/handler/ha_innodb.cc:12436
|
#9 0x5644328a605f in ha_innobase::create(char const*, TABLE*, HA_CREATE_INFO*, bool, trx_t*) /test/10.4_opt/storage/innobase/handler/ha_innodb.cc:12884
|
#10 0x564431aa7a86 in handler::ha_create(char const*, TABLE*, HA_CREATE_INFO*) /test/10.4_opt/sql/handler.cc:4742
|
#11 0x564431aab503 in ha_create_table(THD*, char const*, char const*, char const*, HA_CREATE_INFO*, st_mysql_const_unsigned_lex_string*) /test/10.4_opt/sql/handler.cc:5206
|
#12 0x564430f460e0 in create_table_impl /test/10.4_opt/sql/sql_table.cc:5070
|
#13 0x564430f485df in mysql_create_table_no_lock(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, Table_specification_st*, Alter_info*, bool*, int, TABLE_LIST*) /test/10.4_opt/sql/sql_table.cc:5154
|
#14 0x564430f4939c in mysql_create_table(THD*, TABLE_LIST*, Table_specification_st*, Alter_info*) /test/10.4_opt/sql/sql_table.cc:5246
|
#15 0x564430f5fdb1 in Sql_cmd_create_table_like::execute(THD*) /test/10.4_opt/sql/sql_table.cc:11466
|
#16 0x564430b454a3 in mysql_execute_command(THD*) /test/10.4_opt/sql/sql_parse.cc:6101
|
#17 0x564430b7239b in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /test/10.4_opt/sql/sql_parse.cc:7901
|
#18 0x564430b7fefd in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /test/10.4_opt/sql/sql_parse.cc:1841
|
#19 0x564430b89937 in do_command(THD*) /test/10.4_opt/sql/sql_parse.cc:1359
|
#20 0x5644311944ae in do_handle_one_connection(CONNECT*) /test/10.4_opt/sql/sql_connect.cc:1412
|
#21 0x564431194d92 in handle_one_connection /test/10.4_opt/sql/sql_connect.cc:1316
|
#22 0x1496a2f936da in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76da)
|
#23 0x1496a0baca3e in __clone (/lib/x86_64-linux-gnu/libc.so.6+0x121a3e)
|
|
AddressSanitizer can not provide additional info.
|
SUMMARY: AddressSanitizer: SEGV (/lib/x86_64-linux-gnu/libc.so.6+0x18ed8e)
|
Thread T31 created by T0 here:
|
#0 0x5644304f520f in __interceptor_pthread_create (/test/ASAN_MD290520-mariadb-10.4.14-linux-x86_64-opt/bin/mysqld+0x4e6020f)
|
#1 0x5644305f043b in inline_mysql_thread_create /test/10.4_opt/include/mysql/psi/mysql_thread.h:1275
|
#2 0x5644305f043b in create_thread_to_handle_connection(CONNECT*) /test/10.4_opt/sql/mysqld.cc:6261
|
#3 0x564430602e29 in create_new_thread(CONNECT*) /test/10.4_opt/sql/mysqld.cc:6329
|
#4 0x564430603688 in handle_accepted_socket(st_mysql_socket, st_mysql_socket) /test/10.4_opt/sql/mysqld.cc:6427
|
#5 0x564430604d0b in handle_connections_sockets() /test/10.4_opt/sql/mysqld.cc:6585
|
#6 0x5644306072a4 in mysqld_main(int, char**) /test/10.4_opt/sql/mysqld.cc:5917
|
#7 0x1496a0aacb96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
|
|
==2391945==ABORTING
|
Also, shell level output seen on CLI exit - perhaps due to an incomplete server response (as server crashed).
|
10.4.14 ed1434df88270ebe70ae412b5b723920b6b4e0e8 (Optimized)
|
=================================================================
|
==2392008==ERROR: LeakSanitizer: detected memory leaks
|
|
Direct leak of 128 byte(s) in 1 object(s) allocated from:
|
#0 0x55ad125da1d8 in calloc (/test/ASAN_MD290520-mariadb-10.4.14-linux-x86_64-opt/bin/mysql+0x3f91d8)
|
#1 0x55ad12653948 in mysql_init /test/10.4_opt/libmariadb/libmariadb/mariadb_lib.c:1108
|
#2 0x55ad12624a61 in sql_real_connect /test/10.4_opt/client/mysql.cc:4665
|
#3 0x55ad12624a61 in sql_connect /test/10.4_opt/client/mysql.cc:4741
|
#4 0x55ad12626bed in com_connect /test/10.4_opt/client/mysql.cc:4334
|
#5 0x55ad12626bed in reconnect /test/10.4_opt/client/mysql.cc:2937
|
#6 0x55ad12627398 in mysql_real_query_for_lazy(char const*, unsigned long) /test/10.4_opt/client/mysql.cc:2985
|
#7 0x55ad1262f8a9 in com_go /test/10.4_opt/client/mysql.cc:3242
|
#8 0x55ad1263471d in add_line /test/10.4_opt/client/mysql.cc:2411
|
#9 0x55ad1263471d in read_and_execute /test/10.4_opt/client/mysql.cc:2111
|
#10 0x55ad1263a5b3 in com_source /test/10.4_opt/client/mysql.cc:4398
|
#11 0x55ad1263419e in read_and_execute /test/10.4_opt/client/mysql.cc:2101
|
#12 0x55ad12519f48 in main /test/10.4_opt/client/mysql.cc:1277
|
#13 0x1469c0565b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
|
|
Direct leak of 8 byte(s) in 1 object(s) allocated from:
|
#0 0x55ad125da1d8 in calloc (/test/ASAN_MD290520-mariadb-10.4.14-linux-x86_64-opt/bin/mysql+0x3f91d8)
|
#1 0x55ad12653905 in mysql_init /test/10.4_opt/libmariadb/libmariadb/mariadb_lib.c:1106
|
#2 0x55ad12624a61 in sql_real_connect /test/10.4_opt/client/mysql.cc:4665
|
#3 0x55ad12624a61 in sql_connect /test/10.4_opt/client/mysql.cc:4741
|
#4 0x55ad12626bed in com_connect /test/10.4_opt/client/mysql.cc:4334
|
#5 0x55ad12626bed in reconnect /test/10.4_opt/client/mysql.cc:2937
|
#6 0x55ad12627398 in mysql_real_query_for_lazy(char const*, unsigned long) /test/10.4_opt/client/mysql.cc:2985
|
#7 0x55ad1262f8a9 in com_go /test/10.4_opt/client/mysql.cc:3242
|
#8 0x55ad1263471d in add_line /test/10.4_opt/client/mysql.cc:2411
|
#9 0x55ad1263471d in read_and_execute /test/10.4_opt/client/mysql.cc:2111
|
#10 0x55ad1263a5b3 in com_source /test/10.4_opt/client/mysql.cc:4398
|
#11 0x55ad1263419e in read_and_execute /test/10.4_opt/client/mysql.cc:2101
|
#12 0x55ad12519f48 in main /test/10.4_opt/client/mysql.cc:1277
|
#13 0x1469c0565b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
|
|
SUMMARY: AddressSanitizer: 136 byte(s) leaked in 2 allocation(s).
|
|
|
oktopush
|
|
will take a closer look though
|
|
approve
|