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

Bug #1538019 reported by Roel Van de Paar
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
Invalid
Undecided
Unassigned
5.6
Fix Released
High
Laurynas Biveinis
5.7
Fix Released
High
Laurynas Biveinis

Bug Description

+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

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

If it's hard to reduce a testcase, then a core dump please?

tags: added: query-response-time
Revision history for this message
Roel Van de Paar (roel11) wrote :

Managed to get a testcase for this one

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

Revision history for this message
Roel Van de Paar (roel11) wrote :

Or

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

Revision history for this message
Roel Van de Paar (roel11) wrote :

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

Revision history for this message
Roel Van de Paar (roel11) wrote :
Download full text (3.2 KiB)

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=0x7fe10d6a270...

Read more...

tags: added: qa qa57
summary: - handle_fatal_signal (sig=11) in query_response_time_audit_notify
+ Crash on attempting to execute non-existing prepared statement with QRT
+ enabled | handle_fatal_signal (sig=11) in
+ query_response_time_audit_notify
tags: added: regression
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-963

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.