Bug #84829 handle_fatal_signal (sig=11) in Table_id::operator=
Submitted: 6 Feb 2017 8:21 Modified: 27 Feb 2017 5:39
Reporter: Roel Van de Paar Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: DML Severity:S2 (Serious)
Version:5.6.35 OS:Any
Assigned to: CPU Architecture:Any

[6 Feb 2017 8:21] Roel Van de Paar
Description:
Core was generated by `/sda/MS020217-mysql-5.6.35-linux-x86_64-debug/bin/mysqld --no-defaults --core -'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007fb526c6c741 in __pthread_kill (threadid=<optimized out>, signo=11) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
61        val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
(gdb) bt
#0  0x00007fb526c6c741 in __pthread_kill (threadid=<optimized out>, signo=11) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1  0x0000000000a9cf79 in my_write_core (sig=11) at /git/MS-5.6.35_dbg/mysys/stacktrace.c:424
#2  0x000000000072c620 in handle_fatal_signal (sig=11) at /git/MS-5.6.35_dbg/sql/signal_handler.cc:230
#3  <signal handler called>
#4  0x000000000077a1f5 in Table_id::operator= (this=0x12721d8f0, tid=...) at /git/MS-5.6.35_dbg/sql/table_id.h:40
#5  0x000000000076e3dc in assign_new_table_id (share=0x12721d630) at /git/MS-5.6.35_dbg/sql/sql_base.cc:3712
#6  0x0000000000767fa6 in get_table_share (thd=0x7fb4f1c74020, table_list=0x7fb4f1c774c8, key=0x7fb4f1c7788d "test", key_length=8, db_flags=8192, error=0x7fb52721d954,
    hash_value=1097148272) at /git/MS-5.6.35_dbg/sql/sql_base.cc:496
#7  0x0000000000768384 in get_table_share_with_discover (thd=0x7fb4f1c74020, table_list=0x7fb4f1c774c8, key=0x7fb4f1c7788d "test", key_length=8, db_flags=8192,
    error=0x7fb52721d954, hash_value=1097148272) at /git/MS-5.6.35_dbg/sql/sql_base.cc:583
#8  0x000000000076d0b1 in open_table (thd=0x7fb4f1c74020, table_list=0x7fb4f1c774c8, ot_ctx=0x7fb52721db10) at /git/MS-5.6.35_dbg/sql/sql_base.cc:3037
#9  0x000000000076fc60 in open_and_process_table (thd=0x7fb4f1c74020, lex=0x7fb4f1c75de8, tables=0x7fb4f1c774c8, counter=0x7fb52721dc14, flags=1,
    prelocking_strategy=0x7fb52721dcc0, has_prelocking_list=false, ot_ctx=0x7fb52721db10) at /git/MS-5.6.35_dbg/sql/sql_base.cc:4732
#10 0x00000000007708da in open_tables (thd=0x7fb4f1c74020, start=0x7fb52721dbd0, counter=0x7fb52721dc14, flags=1, prelocking_strategy=0x7fb52721dcc0)
    at /git/MS-5.6.35_dbg/sql/sql_base.cc:5165
#11 0x0000000000771867 in open_and_lock_tables (thd=0x7fb4f1c74020, tables=0x7fb4f1c774c8, derived=false, flags=1, prelocking_strategy=0x7fb52721dcc0)
    at /git/MS-5.6.35_dbg/sql/sql_base.cc:5818
#12 0x000000000077136c in open_n_lock_single_table (thd=0x7fb4f1c74020, table_l=0x7fb4f1c774c8, lock_type=TL_WRITE_DELAYED, flags=1, prelocking_strategy=0x7fb52721dcc0)
    at /git/MS-5.6.35_dbg/sql/sql_base.cc:5670
#13 0x00000000007bcd4a in Delayed_insert::open_and_lock_table (this=0x7fb4f1c74000) at /git/MS-5.6.35_dbg/sql/sql_insert.cc:2854
#14 0x00000000007bd08e in handle_delayed_insert (arg=0x7fb4f1c74000) at /git/MS-5.6.35_dbg/sql/sql_insert.cc:2951
#15 0x0000000000ae9335 in pfs_spawn_thread (arg=0x7fb4f1cfc020) at /git/MS-5.6.35_dbg/storage/perfschema/pfs.cc:1860
#16 0x00007fb526c67dc5 in start_thread (arg=0x7fb52721e700) at pthread_create.c:308
#17 0x00007fb5252ca73d 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_impON_2";
SET GLOBAL debug='+d,simulate_out_of_memory';
set global binlog_format=ROW;
INSERT DELAYED INTO t4 VALUES(1);
[6 Feb 2017 8:40] MySQL Verification Team
Hello Roel,

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

Thanks,
Umesh
[27 Feb 2017 5:39] Erlend Dahl
[6 Feb 2017 1:39] Roy Lyseng

INSERT DELAYED has been removed since 5.7, so fixing a debug problem in an
older release is not feasible.