LP #1538019: Crash on attempting to execute non-existing prepared statement with QRT enabled | handle_fatal_signal (sig=11) in query_response_time_audit_notify

Description

**Reported in Launchpad by Roel Van de Paar last update 10-03-2016 08:06:44

+bt
#0 0x00007f93c9b24741 in __pthread_kill (threadid=<optimized out>, signo=11) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1 0x0000000001811920 in my_write_core (sig=11) at /git/PS-5.7_dbg/mysys/stacktrace.c:247
#2 0x0000000000e609e3 in handle_fatal_signal (sig=11) at /git/PS-5.7_dbg/sql/signal_handler.cc:223
#3 <signal handler called>
#4 0x00007f9389bf9c36 in query_response_time_audit_notify (thd=0x7f9382419000, event_class=MYSQL_AUDIT_GENERAL_CLASS, event=0x7f93ca0d60a0) at /git/PS-5.7_dbg/plugin/query_response_time/plugin.cc:164
#5 0x0000000000e6254e in plugins_dispatch (thd=0x7f9382419000, plugin=0x7f93838f3d80, arg=0x7f93ca0d6040) at /git/PS-5.7_dbg/sql/sql_audit.cc:1037
#6 0x0000000000e62649 in event_class_dispatch (thd=0x7f9382419000, event_class=MYSQL_AUDIT_GENERAL_CLASS, event=0x7f93ca0d60a0) at /git/PS-5.7_dbg/sql/sql_audit.cc:1077
#7 0x0000000000e6123e in mysql_audit_notify (thd=0x7f9382419000, subclass=MYSQL_AUDIT_GENERAL_STATUS, error_code=1243, msg=0x202748f "Query", msg_len=5) at /git/PS-5.7_dbg/sql/sql_audit.cc:273
#8 0x0000000001500320 in mysql_audit_general (thd=0x7f9382419000, event_subtype=MYSQL_AUDIT_GENERAL_STATUS, error_code=1243, msg=0x202748f "Query") at /git/PS-5.7_dbg/sql/sql_audit.h:93
#9 0x00000000015055d1 in dispatch_command (thd=0x7f9382419000, com_data=0x7f93ca0d6c90, command=COM_QUERY) at /git/PS-5.7_dbg/sql/sql_parse.cc:1866
#10 0x00000000015030fb in do_command (thd=0x7f9382419000) at /git/PS-5.7_dbg/sql/sql_parse.cc:1008
#11 0x000000000163abb3 in handle_connection (arg=0x7f93b57ff4f0) at /git/PS-5.7_dbg/sql/conn_handler/connection_handler_per_thread.cc:313
#12 0x0000000001840188 in pfs_spawn_thread (arg=0x7f93a3ff2320) at /git/PS-5.7_dbg/storage/perfschema/pfs.cc:2192
#13 0x00007f93c9b1fdc5 in start_thread (arg=0x7f93ca0d7700) at pthread_create.c:308
#14 0x00007f93c7f7e21d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Environment

None

Smart Checklist

Activity

lpjirasync January 21, 2018 at 2:47 AM

lpjirasync January 21, 2018 at 2:47 AM

**Comment from Launchpad by: Roel Van de Paar on: 26-01-2016 10:16:35

5.6 (crashes on next stmt):

+bt
#0 0x00007fe10d0ae741 in __pthread_kill (threadid=<optimized out>, signo=11) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1 0x0000000000abfc84 in my_write_core (sig=11) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl-new/label_exp/centos6-64/percona-server-5.6.25-73.2/mysys/stacktrace.c:422
#2 0x000000000073309d in handle_fatal_signal (sig=11) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl-new/label_exp/centos6-64/percona-server-5.6.25-73.2/sql/signal_handler.cc:236
#3 <signal handler called>
#4 0x00007fe0387facfe in query_response_time_audit_notify (thd=0x7fe056727000, event_class=0, event=0x7fe10d6a06f0) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl-new/label_exp/centos6-64/percona-server-5.6.25-73.2/plugin/query_response_time/plugin.cc:155
#5 0x000000000076e49e in plugins_dispatch (thd=0x7fe056727000, plugin=0x7fe0fa3fd3b8, arg=0x7fe10d6a06a0) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl-new/label_exp/centos6-64/percona-server-5.6.25-73.2/sql/sql_audit.cc:455
#6 0x000000000076e54f in event_class_dispatch (thd=0x7fe056727000, event_class=0, event=0x7fe10d6a06f0) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl-new/label_exp/centos6-64/percona-server-5.6.25-73.2/sql/sql_audit.cc:491
#7 0x000000000076d60c in general_class_handler(THD *, uint, typedef __va_list_tag __va_list_tag *) (thd=0x7fe056727000, event_subtype=3, ap=0x7fe10d6a07b0) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl-new/label_exp/centos6-64/percona-server-5.6.25-73.2/sql/sql_audit.cc:90
#8 0x000000000076df74 in mysql_audit_notify (thd=0x7fe056727000, event_class=0, event_subtype=3) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl-new/label_exp/centos6-64/percona-server-5.6.25-73.2/sql/sql_audit.cc:217
#9 0x00000000007e002c in mysql_audit_general (thd=0x7fe056727000, event_subtype=3, error_code=1243, msg=0xf57b58 "Query") at /mnt/workspace/percona-server-5.6-binaries-debug-yassl-new/label_exp/centos6-64/percona-server-5.6.25-73.2/sql/sql_audit.h:195
#10 0x00000000007e46cc in dispatch_command (command=COM_QUERY, thd=0x7fe056727000, packet=0x7fe05672b001 "", packet_length=12) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl-new/label_exp/centos6-64/percona-server-5.6.25-73.2/sql/sql_parse.cc:1876
#11 0x00000000007e20cc in do_command (thd=0x7fe056727000) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl-new/label_exp/centos6-64/percona-server-5.6.25-73.2/sql/sql_parse.cc:1054
#12 0x00000000007a9f20 in do_handle_one_connection (thd_arg=0x7fe05fead000) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl-new/label_exp/centos6-64/percona-server-5.6.25-73.2/sql/sql_connect.cc:1541
#13 0x00000000007a99a0 in handle_one_connection (arg=0x7fe05fead000) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl-new/label_exp/centos6-64/percona-server-5.6.25-73.2/sql/sql_connect.cc:1444
#14 0x0000000000dd1463 in pfs_spawn_thread (arg=0x7fe0f4bfef20) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl-new/label_exp/centos6-64/percona-server-5.6.25-73.2/storage/perfschema/pfs.cc:1860
#15 0x00007fe10d0a9dc5 in start_thread (arg=0x7fe10d6a2700) at pthread_create.c:308
#16 0x00007fe10bd7221d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

lpjirasync January 21, 2018 at 2:47 AM

**Comment from Launchpad by: Roel Van de Paar on: 26-01-2016 09:02:56

MS gives:

mysql> SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
ERROR 1193 (HY000): Unknown system variable 'QUERY_RESPONSE_TIME_STATS'
mysql> EXECUTE stmt;
ERROR 1243 (HY000): Unknown prepared statement handler (stmt) given to EXECUTE

lpjirasync January 21, 2018 at 2:47 AM

**Comment from Launchpad by: Roel Van de Paar on: 26-01-2016 09:00:27

Or

DROP DATABASE test;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
execute stmt1 using @v;

lpjirasync January 21, 2018 at 2:47 AM

**Comment from Launchpad by: Roel Van de Paar on: 26-01-2016 09:00:04

Managed to get a testcase for this one

DROP DATABASE test;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
EXECUTE stmt;

Done

Details

Assignee

Reporter

Priority

Smart Checklist

Created January 21, 2018 at 2:46 AM
Updated January 21, 2018 at 2:47 AM
Resolved January 21, 2018 at 2:46 AM