Bug #83112 handle_fatal_signal (sig=11) in sp_get_flags_for_command
Submitted: 23 Sep 2016 4:13 Modified: 23 Sep 2016 18:19
Reporter: Roel Van de Paar Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S1 (Critical)
Version:8.0-dmr OS:Any
Assigned to: CPU Architecture:Any

[23 Sep 2016 4:13] Roel Van de Paar
Description:
+bt
#0  0x00007f15e1fd6741 in __pthread_kill (threadid=<optimized out>, signo=11) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1  0x00000000023fc1b9 in my_write_core (sig=11) at /git/MS8.0_dbg/mysys/stacktrace.cc:275
#2  0x0000000001b517ed in handle_fatal_signal (sig=11) at /git/MS8.0_dbg/sql/signal_handler.cc:219
#3  <signal handler called>
#4  0x000000000225c65d in sp_get_flags_for_command (lex=0x7f15b04d6b50) at /git/MS8.0_dbg/sql/sp.cc:2239
#5  0x0000000001b63ae7 in MYSQLparse (YYTHD=0x7f15b0419000) at /git/MS8.0_dbg/sql/sql_yacc.yy:3862
#6  0x00000000018793d1 in parse_sql (thd=0x7f15b0419000, parser_state=0x7f15e25c94e0, creation_ctx=0x0) at /git/MS8.0_dbg/sql/sql_parse.cc:6858
#7  0x00000000018757df in mysql_parse (thd=0x7f15b0419000, parser_state=0x7f15e25c94e0) at /git/MS8.0_dbg/sql/sql_parse.cc:5126
#8  0x000000000186c3b8 in dispatch_command (thd=0x7f15b0419000, com_data=0x7f15e25c9c70, command=COM_QUERY) at /git/MS8.0_dbg/sql/sql_parse.cc:1481
#9  0x000000000186b244 in do_command (thd=0x7f15b0419000) at /git/MS8.0_dbg/sql/sql_parse.cc:1043
#10 0x0000000001b43af1 in handle_connection (arg=0x7f15afd6c080) at /git/MS8.0_dbg/sql/conn_handler/connection_handler_per_thread.cc:301
#11 0x000000000242bf29 in pfs_spawn_thread (arg=0x7f15afde4f20) at /git/MS8.0_dbg/storage/perfschema/pfs.cc:2282
#12 0x00007f15e1fd1dc5 in start_thread (arg=0x7f15e25ca700) at pthread_create.c:308
#13 0x00007f15e042eced in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

How to repeat:
DROP DATABASE test;
use information_schema;
create PROCEDURE p0()begin create TABLE t0(a int) engine=InnoDB;
[23 Sep 2016 4:16] Roel Van de Paar
Frequency: showstopper
[23 Sep 2016 7:05] MySQL Verification Team
Hello Roel,

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

Thanks,
Umesh
[23 Sep 2016 7:05] MySQL Verification Team
-- 8.0

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `bin/mysqld-debug --basedir=/export/umesh/server/binaries/Trunk/mysql-advanced-8'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f4355892771 in pthread_kill () from /lib64/libpthread.so.0
Missing separate debuginfos, use: debuginfo-install glibc-2.17-78.0.1.el7.x86_64 libaio-0.3.109-12.el7.x86_64 libgcc-4.8.3-9.el7.x86_64 libstdc++-4.8.3-9.el7.x86_64 nss-softokn-freebl-3.16.2.3-13.el7_1.x86_64 numactl-libs-2.0.9-5.el7_1.x86_64
(gdb) bt
#0  0x00007f4355892771 in pthread_kill () from /lib64/libpthread.so.0
#1  0x0000000002428189 in my_write_core (sig=11) at /export/home/pb2/build/sb_0-20238057-1472571207.78/mysqlcom-pro-8.0.1-dmr/mysys/stacktrace.cc:275
#2  0x0000000001bdeced in handle_fatal_signal (sig=11) at /export/home/pb2/build/sb_0-20238057-1472571207.78/mysqlcom-pro-8.0.1-dmr/sql/signal_handler.cc:219
#3  <signal handler called>
#4  0x00000000022be0d5 in sp_get_flags_for_command (lex=0x7f42bc14e460) at /export/home/pb2/build/sb_0-20238057-1472571207.78/mysqlcom-pro-8.0.1-dmr/sql/sp.cc:2239
#5  0x0000000001bf0f7b in MYSQLparse (YYTHD=0x7f42bc000be0) at /export/home/pb2/build/sb_0-20237716-1472569389.13/mysql-trunk-export-9950609/sql/sql_yacc.yy:3865
#6  0x00000000018f9b57 in parse_sql (thd=0x7f42bc000be0, parser_state=0x7f43480fe620, creation_ctx=0x0)
    at /export/home/pb2/build/sb_0-20238057-1472571207.78/mysqlcom-pro-8.0.1-dmr/sql/sql_parse.cc:6858
#7  0x00000000018f5ffd in mysql_parse (thd=0x7f42bc000be0, parser_state=0x7f43480fe620) at /export/home/pb2/build/sb_0-20238057-1472571207.78/mysqlcom-pro-8.0.1-dmr/sql/sql_parse.cc:5126
#8  0x00000000018eccf9 in dispatch_command (thd=0x7f42bc000be0, com_data=0x7f43480fedb0, command=COM_QUERY)
    at /export/home/pb2/build/sb_0-20238057-1472571207.78/mysqlcom-pro-8.0.1-dmr/sql/sql_parse.cc:1481
#9  0x00000000018ebc5f in do_command (thd=0x7f42bc000be0) at /export/home/pb2/build/sb_0-20238057-1472571207.78/mysqlcom-pro-8.0.1-dmr/sql/sql_parse.cc:1043
#10 0x0000000001bd0f75 in handle_connection (arg=0x5aab830) at /export/home/pb2/build/sb_0-20238057-1472571207.78/mysqlcom-pro-8.0.1-dmr/sql/conn_handler/connection_handler_per_thread.cc:301
#11 0x000000000288a051 in pfs_spawn_thread (arg=0x5b8f7e0) at /export/home/pb2/build/sb_0-20238057-1472571207.78/mysqlcom-pro-8.0.1-dmr/storage/perfschema/pfs.cc:2282
#12 0x00007f435588ddf5 in start_thread () from /lib64/libpthread.so.0
#13 0x00007f435434d60d in clone () from /lib64/libc.so.6
[23 Sep 2016 7:12] MySQL Verification Team
Bug #83119 marked as duplicate of this
[23 Sep 2016 8:49] MySQL Verification Team
Bug #83116 marked as duplicate of this
[23 Sep 2016 11:46] Sivert Sørumgård
Posted by developer:
 
Already fixed on trunk.
[23 Sep 2016 11:50] Sivert Sørumgård
Already fixed on trunk.
[23 Sep 2016 16:50] Hartmut Holzgraefe
Shouldn't this be "Closed" and not "Won't fix" if it is actually fixed already?
[23 Sep 2016 18:19] Mark Leith
Setting to closed rather than won't fix given this bug has been fixed.