[draft] COM_STMT_CLOSE crash in Query_cache::end_of_result: DBUG_ASSERT(thd->get_stmt_da()->is_eof())

Bug #1676764 reported by Laurynas Biveinis
6
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
New
Undecided
Unassigned
5.6
In Progress
High
Unassigned
5.7
In Progress
Undecided
Unassigned

Bug Description

On 5.6 trunk, debug build, very intermittently:

main.mysql_client_test w2 [ fail ]
        Test ended at 2017-03-25 09:05:56

CURRENT_TEST: main.mysql_client_test
mysqltest: At line 21: command "$MYSQL_CLIENT_TEST --getopt-ll-test=25600M $PLUGIN_AUTH_CLIENT_OPT >> $MYSQLTEST_VARDIR/log/mysql_client_test.out.log 2>&1" failed
...
Program terminated with signal SIGABRT, Aborted.
#0 0x00007f21e82050c1 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
61 ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c: No such file or directory.
#0 0x00007f21e82050c1 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1 0x0000000000ac9dea in my_write_core (sig=6) at /mnt/workspace/percona-server-5.6-trunk/BUILD_TYPE/debug/Host/debian-jessie-64bit/mysys/stacktrace.c:424
#2 0x000000000073c192 in handle_fatal_signal (sig=6) at /mnt/workspace/percona-server-5.6-trunk/BUILD_TYPE/debug/Host/debian-jessie-64bit/sql/signal_handler.cc:236
#3 <signal handler called>
#4 0x00007f21e6398067 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#5 0x00007f21e6399448 in __GI_abort () at abort.c:89
#6 0x00007f21e6391266 in __assert_fail_base (fmt=0x7f21e64c9f18 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0xed7304 "thd->get_stmt_da()->is_eof()", file=file@entry=0xed6e28 "/mnt/workspace/percona-server-5.6-trunk/BUILD_TYPE/debug/Host/debian-jessie-64bit/sql/sql_cache.cc", line=line@entry=1213, function=function@entry=0xed9620 <Query_cache::end_of_result(THD*)::__PRETTY_FUNCTION__> "void Query_cache::end_of_result(THD*)") at assert.c:92
#7 0x00007f21e6391312 in __GI___assert_fail (assertion=0xed7304 "thd->get_stmt_da()->is_eof()", file=0xed6e28 "/mnt/workspace/percona-server-5.6-trunk/BUILD_TYPE/debug/Host/debian-jessie-64bit/sql/sql_cache.cc", line=1213, function=0xed9620 <Query_cache::end_of_result(THD*)::__PRETTY_FUNCTION__> "void Query_cache::end_of_result(THD*)") at assert.c:101
#8 0x000000000079218b in Query_cache::end_of_result (this=0x17d6d40 <query_cache>, thd=0x2088030) at /mnt/workspace/percona-server-5.6-trunk/BUILD_TYPE/debug/Host/debian-jessie-64bit/sql/sql_cache.cc:1213
#9 0x00000000007ee3fa in dispatch_command (command=COM_STMT_CLOSE, thd=0x2088030, packet=0x207f741 "\006", packet_length=4) at /mnt/workspace/percona-server-5.6-trunk/BUILD_TYPE/debug/Host/debian-jessie-64bit/sql/sql_parse.cc:1911
#10 0x00000000007ebe6a in do_command (thd=0x2088030) at /mnt/workspace/percona-server-5.6-trunk/BUILD_TYPE/debug/Host/debian-jessie-64bit/sql/sql_parse.cc:1062
#11 0x00000000007b3f01 in do_handle_one_connection (thd_arg=0x20838a0) at /mnt/workspace/percona-server-5.6-trunk/BUILD_TYPE/debug/Host/debian-jessie-64bit/sql/sql_connect.cc:1550
#12 0x00000000007b3c05 in handle_one_connection (arg=0x20838a0) at /mnt/workspace/percona-server-5.6-trunk/BUILD_TYPE/debug/Host/debian-jessie-64bit/sql/sql_connect.cc:1454
#13 0x0000000000b1338b in pfs_spawn_thread (arg=0x2009b20) at /mnt/workspace/percona-server-5.6-trunk/BUILD_TYPE/debug/Host/debian-jessie-64bit/storage/perfschema/pfs.cc:1860
#14 0x00007f21e8200064 in start_thread (arg=0x7f21a3fff700) at pthread_create.c:309
#15 0x00007f21e644b62d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

For COM_STMT_CLOSE, thd->query_cache_tls->first_query_block should have been NULL. Maybe a previous query on the same THD object did not clean it up

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-3668

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

Other bug subscribers

Remote bug watches

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