Kill idle transaction debug build assert: safe_mutex: Trying to destroy a mutex that was locked at sql_class.cc, line 880 at sql_class.cc, line 1773

Bug #1179136 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.1
Won't Fix
High
Unassigned
5.5
Won't Fix
High
Laurynas Biveinis
5.6
Fix Released
High
Laurynas Biveinis
5.7
Fix Released
High
Laurynas Biveinis

Bug Description

http://jenkins.percona.com/job/percona-server-5.6-param/94/BUILD_TYPE=debug,Host=ubuntu-precise-64bit/consoleFull:

00:58:33.455 innodb.percona_innodb_kill_idle_trx w4 [ fail ]
00:58:33.455 Test ended at 2013-05-10 16:22:05
00:58:33.455
00:58:33.455 CURRENT_TEST: innodb.percona_innodb_kill_idle_trx
00:58:33.455 mysqltest: At line 24: query 'SELECT * FROM t1' failed: 2013: Lost connection to MySQL server at 'reading initial communication packet', system error: 104
00:58:33.455
00:58:33.455 The result from queries just before the failure was:
00:58:33.455 < snip >
00:58:33.455 SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_kill_idle_transaction';
00:58:33.455 VARIABLE_NAME VARIABLE_VALUE
00:58:33.455 INNODB_KILL_IDLE_TRANSACTION 0
00:58:33.455 SET GLOBAL innodb_kill_idle_transaction=1;
00:58:33.455 SHOW GLOBAL VARIABLES LIKE 'innodb_kill_idle_transaction';
00:58:33.455 Variable_name Value
00:58:33.455 innodb_kill_idle_transaction 1
00:58:33.455 SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_kill_idle_transaction';
00:58:33.455 VARIABLE_NAME VARIABLE_VALUE
00:58:33.455 INNODB_KILL_IDLE_TRANSACTION 1
00:58:33.455 BEGIN;
00:58:33.455 INSERT INTO t1 VALUES (1),(2),(3);
00:58:33.455 COMMIT;
00:58:33.455 SELECT * FROM t1;
00:58:33.455 a
00:58:33.455 1
00:58:33.455 2
00:58:33.455 3
00:58:33.455 BEGIN;
00:58:33.455 INSERT INTO t1 VALUES (4),(5),(6);
00:58:33.455
00:58:33.455 More results from queries before failure can be found in /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/build/mysql-test/var/4/log/percona_innodb_kill_idle_trx.log
00:58:33.455
00:58:33.455
00:58:33.455 Server [mysqld.1 - pid: 373, winpid: 373, exit: 256] failed during test run
00:58:33.455 Server log from this test:
00:58:33.455 ----------SERVER LOG START-----------
00:58:33.455 safe_mutex: Trying to destroy a mutex that was locked at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/sql/sql_class.cc, line 880 at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/sql/sql_class.cc, line 1773
00:58:33.455 16:22:05 UTC - mysqld got signal 6 ;
00:58:33.455 This could be because you hit a bug. It is also possible that this binary
00:58:33.455 or one of the libraries it was linked against is corrupt, improperly built,
00:58:33.455 or misconfigured. This error can also be caused by malfunctioning hardware.
00:58:33.455 We will try our best to scrape up some info that will hopefully help
00:58:33.455 diagnose the problem, but since we have already crashed,
00:58:33.455 something is definitely wrong and this may fail.
00:58:33.455 Please help us make Percona Server better by reporting any
00:58:33.455 bugs at http://bugs.percona.com/
00:58:33.455
00:58:33.455 key_buffer_size=1048576
00:58:33.455 read_buffer_size=131072
00:58:33.455 max_used_connections=1
00:58:33.455 max_threads=153
00:58:33.455 thread_count=0
00:58:33.455 connection_count=0
00:58:33.455 It is possible that mysqld could use up to
00:58:33.455 key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 61993 K bytes of memory
00:58:33.455 Hope that's ok; if not, decrease some variables in the equation.
00:58:33.455
00:58:33.455 Thread pointer: 0x2f76c80
00:58:33.455 Attempting backtrace. You can use the following information to find out
00:58:33.455 where mysqld died. If you see no messages after this, something went
00:58:33.455 terribly wrong...
00:58:33.455 stack_bottom = 7ff68fffedf0 thread_stack 0x40000
00:58:33.455 /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/build/sql/mysqld-debug(my_print_stacktrace+0x35)[0xaa8baa]
00:58:33.455 /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/build/sql/mysqld-debug(handle_fatal_signal+0x429)[0x728391]
00:58:33.455 /lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0)[0x7ff6adaf6cb0]
00:58:33.455 /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35)[0x7ff6acf4c425]
00:58:33.455 /lib/x86_64-linux-gnu/libc.so.6(abort+0x17b)[0x7ff6acf4fb8b]
00:58:33.455 /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/build/sql/mysqld-debug(safe_mutex_destroy+0xc0)[0xaad715]
00:58:33.455 /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/build/sql/mysqld-debug[0x788442]
00:58:33.455 /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/build/sql/mysqld-debug(_ZN3THDD1Ev+0x1ab)[0x78c90b]
00:58:33.455 /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/build/sql/mysqld-debug(_ZN3THDD0Ev+0x18)[0x78cd5a]
00:58:33.455 /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/build/sql/mysqld-debug(_Z29one_thread_per_connection_endP3THDb+0x116)[0x620226]
00:58:33.455 /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/build/sql/mysqld-debug(_Z24do_handle_one_connectionP3THD+0x274)[0x79b9a5]
00:58:33.455 /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/build/sql/mysqld-debug(handle_one_connection+0x33)[0x79b2f3]
00:58:33.455 /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/build/sql/mysqld-debug(pfs_spawn_thread+0x1b2)[0xb02e5c]
00:58:33.455 /lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a)[0x7ff6adaeee9a]
00:58:33.455 /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7ff6ad009ccd]
00:58:33.455
00:58:33.455 Trying to get some variables.
00:58:33.455 Some pointers may be invalid and cause the dump to abort.
00:58:33.455 Query (0): Connection ID (thread ID): 9
00:58:33.455 Status: KILL_CONNECTION
00:58:33.455
00:58:33.455 You may download the Percona Server operations manual by visiting
00:58:33.455 http://www.percona.com/software/percona-server/. You may find information
00:58:33.455 in the manual which will help you identify the cause of the crash.
00:58:33.455 Writing a core file
00:58:33.455 ----------SERVER LOG END-------------
00:58:33.455
00:58:33.455
00:58:33.455 - saving '/mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/build/mysql-test/var/4/log/innodb.percona_innodb_kill_idle_trx/' to '/mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/build/mysql-test/var/log/innodb.percona_innodb_kill_idle_trx/'
00:58:33.455 - found 'core' (0/5)
00:58:33.455
00:58:33.455 Trying 'dbx' to get a backtrace
00:58:33.456
00:58:33.456 Trying 'gdb' to get a backtrace
00:58:36.839 Guessing that core was generated by '/mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/build/sql/mysqld-debug'
00:58:40.335 Output from gdb follows. The first stack trace is from the failing thread.
00:58:40.335 The following stack traces are from all threads (so the failing one is
00:58:40.335 duplicated).
00:58:40.335 --------------------------
00:58:40.335 [New LWP 434]
00:58:40.335 [New LWP 380]
00:58:40.335 [New LWP 381]
00:58:40.335 [New LWP 379]
00:58:40.335 [New LWP 383]
00:58:40.335 [New LWP 420]
00:58:40.335 [New LWP 378]
00:58:40.335 [New LWP 421]
00:58:40.335 [New LWP 382]
00:58:40.335 [New LWP 422]
00:58:40.335 [New LWP 432]
00:58:40.335 [New LWP 430]
00:58:40.335 [New LWP 374]
00:58:40.335 [New LWP 423]
00:58:40.335 [New LWP 433]
00:58:40.335 [New LWP 431]
00:58:40.335 [New LWP 428]
00:58:40.335 [New LWP 424]
00:58:40.335
00:58:40.335 warning: Can't read pathname for load map: Input/output error.
00:58:40.335 [Thread debugging using libthread_db enabled]
00:58:40.335 Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
00:58:40.335 Core was generated by `/mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64'.
00:58:40.335 Program terminated with signal 6, Aborted.
00:58:40.335 #0 __pthread_kill (threadid=<optimized out>, signo=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:63
00:58:40.335 63 ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c: No such file or directory.
00:58:40.335 #0 __pthread_kill (threadid=<optimized out>, signo=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:63
00:58:40.335 #1 0x0000000000aa8c2c in my_write_core (sig=6) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/mysys/stacktrace.c:422
00:58:40.335 #2 0x00000000007285b9 in handle_fatal_signal (sig=6) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/sql/signal_handler.cc:251
00:58:40.335 #3 <signal handler called>
00:58:40.335 #4 0x00007ff6acf4c425 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
00:58:40.335 #5 0x00007ff6acf4fb8b in __GI_abort () at abort.c:91
00:58:40.335 #6 0x0000000000aad715 in safe_mutex_destroy (mp=0x2f77ca0, file=0xf1b180 "/mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/sql/sql_class.cc", line=1773) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/mysys/thr_mutex.c:318
00:58:40.335 #7 0x0000000000788442 in inline_mysql_mutex_destroy (that=0x2f77ca0, src_file=0xf1b180 "/mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/sql/sql_class.cc", src_line=1773) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/include/mysql/psi/mysql_thread.h:641
00:58:40.335 #8 0x000000000078c90b in THD::~THD (this=0x2f76c80, __in_chrg=<optimized out>) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/sql/sql_class.cc:1773
00:58:40.335 #9 0x000000000078cd5a in THD::~THD (this=0x2f76c80, __in_chrg=<optimized out>) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/sql/sql_class.cc:1804
00:58:40.335 #10 0x0000000000620226 in one_thread_per_connection_end (thd=0x2f76c80, block_pthread=true) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/sql/mysqld.cc:2743
00:58:40.335 #11 0x000000000079b9a5 in do_handle_one_connection (thd_arg=0x2f76c80) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/sql/sql_connect.cc:1626
00:58:40.335 #12 0x000000000079b2f3 in handle_one_connection (arg=0x2f76c80) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/sql/sql_connect.cc:1528
00:58:40.335 #13 0x0000000000b02e5c in pfs_spawn_thread (arg=0x2eed5d0) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/perfschema/pfs.cc:1853
00:58:40.335 #14 0x00007ff6adaeee9a in start_thread (arg=0x7ff68ffff700) at pthread_create.c:308
00:58:40.335 #15 0x00007ff6ad009ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
00:58:40.335 #16 0x0000000000000000 in ?? ()
00:58:40.335
00:58:40.335 Thread 18 (Thread 0x7ff69e5c5700 (LWP 424)):
00:58:40.335 #0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
00:58:40.335 #1 0x0000000000c16eca in os_cond_wait (cond=0x2da93c0, fast_mutex=0x2da9380) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0sync.cc:214
00:58:40.335 #2 0x0000000000c17444 in os_event_wait_low (event=0x2da9380, reset_sig_count=5) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0sync.cc:610
00:58:40.335 #3 0x0000000000cdbf25 in srv_purge_coordinator_suspend (slot=0x2da9190, rseg_history_len=21) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/srv/srv0srv.cc:3104
00:58:40.335 #4 0x0000000000cdc437 in srv_purge_coordinator_thread (arg=0x0) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/srv/srv0srv.cc:3221
00:58:40.335 #5 0x00007ff6adaeee9a in start_thread (arg=0x7ff69e5c5700) at pthread_create.c:308
00:58:40.335 #6 0x00007ff6ad009ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
00:58:40.335 #7 0x0000000000000000 in ?? ()
00:58:40.335
00:58:40.335 Thread 17 (Thread 0x7ff6a0dca700 (LWP 428)):
00:58:40.335 #0 0x00007ff6ad003033 in select () at ../sysdeps/unix/syscall-template.S:82
00:58:40.335 #1 0x0000000000c181c8 in os_thread_sleep (tm=1000000) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0thread.cc:255
00:58:40.335 #2 0x0000000000d7a800 in page_cleaner_sleep_if_needed (next_loop_time=1368202925140) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/buf/buf0flu.cc:2341
00:58:40.335 #3 0x0000000000d7a8f5 in buf_flush_page_cleaner_thread (arg=0x0) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/buf/buf0flu.cc:2382
00:58:40.335 #4 0x00007ff6adaeee9a in start_thread (arg=0x7ff6a0dca700) at pthread_create.c:308
00:58:40.335 #5 0x00007ff6ad009ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
00:58:40.335 #6 0x0000000000000000 in ?? ()
00:58:40.335
00:58:40.335 Thread 16 (Thread 0x7ff69d5c3700 (LWP 431)):
00:58:40.335 #0 pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:215
00:58:40.335 #1 0x0000000000c16dd0 in os_cond_wait_timed (cond=0x2e9d090, fast_mutex=0x2e9d050, abstime=0x7ff69d5c2e40) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0sync.cc:177
00:58:40.335 #2 0x0000000000c1762d in os_event_wait_time_low (event=0x2e9d050, time_in_usec=10000000, reset_sig_count=3) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0sync.cc:723
00:58:40.335 #3 0x0000000000dbfa11 in dict_stats_thread (arg=0x0) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/dict/dict0stats_bg.cc:349
00:58:40.335 #4 0x00007ff6adaeee9a in start_thread (arg=0x7ff69d5c3700) at pthread_create.c:308
00:58:40.335 #5 0x00007ff6ad009ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
00:58:40.335 #6 0x0000000000000000 in ?? ()
00:58:40.335
00:58:40.335 Thread 15 (Thread 0x7ff6ac05d700 (LWP 433)):
00:58:40.335 #0 do_sigwait (set=<optimized out>, sig=0x7ff6ac05ce48) at ../nptl/sysdeps/unix/sysv/linux/../../../../../sysdeps/unix/sysv/linux/sigwait.c:65
00:58:40.335 #1 0x00007ff6adaf6a79 in __sigwait (set=<optimized out>, sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/../../../../../sysdeps/unix/sysv/linux/sigwait.c:100
00:58:40.335 #2 0x0000000000620d22 in signal_hand (arg=0x0) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/sql/mysqld.cc:3158
00:58:40.335 #3 0x0000000000b02e5c in pfs_spawn_thread (arg=0x2ee7120) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/perfschema/pfs.cc:1853
00:58:40.335 #4 0x00007ff6adaeee9a in start_thread (arg=0x7ff6ac05d700) at pthread_create.c:308
00:58:40.335 #5 0x00007ff6ad009ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
00:58:40.335 #6 0x0000000000000000 in ?? ()
00:58:40.335
00:58:40.335 Thread 14 (Thread 0x7ff69edc6700 (LWP 423)):
00:58:40.335 #0 0x00007ff6ad003033 in select () at ../sysdeps/unix/syscall-template.S:82
00:58:40.335 #1 0x0000000000c181c8 in os_thread_sleep (tm=1000000) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0thread.cc:255
00:58:40.335 #2 0x0000000000cdb4e5 in srv_master_sleep () at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/srv/srv0srv.cc:2767
00:58:40.335 #3 0x0000000000cdb610 in srv_master_thread (arg=0x0) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/srv/srv0srv.cc:2811
00:58:40.335 #4 0x00007ff6adaeee9a in start_thread (arg=0x7ff69edc6700) at pthread_create.c:308
00:58:40.335 #5 0x00007ff6ad009ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
00:58:40.335 #6 0x0000000000000000 in ?? ()
00:58:40.335
00:58:40.335 Thread 13 (Thread 0x7ff6ae95f740 (LWP 374)):
00:58:40.335 #0 0x00007ff6acffe313 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
00:58:40.335 #1 0x0000000000626783 in handle_connections_sockets () at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/sql/mysqld.cc:6311
00:58:40.335 #2 0x000000000062583d in mysqld_main (argc=77, argv=0x2c88888) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/sql/mysqld.cc:5726
00:58:40.335 #3 0x000000000061a7a4 in main (argc=7, argv=0x7fffe513e418) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/sql/main.cc:25
00:58:40.335
00:58:40.335 Thread 12 (Thread 0x7ff69ddc4700 (LWP 430)):
00:58:40.335 #0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
00:58:40.335 #1 0x0000000000c16eca in os_cond_wait (cond=0x2da9570, fast_mutex=0x2da9530) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0sync.cc:214
00:58:40.335 #2 0x0000000000c17444 in os_event_wait_low (event=0x2da9530, reset_sig_count=1) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0sync.cc:610
00:58:40.335 #3 0x0000000000d73558 in buf_dump_thread (arg=0x0) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/buf/buf0dump.cc:594
00:58:40.335 #4 0x00007ff6adaeee9a in start_thread (arg=0x7ff69ddc4700) at pthread_create.c:308
00:58:40.335 #5 0x00007ff6ad009ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
00:58:40.335 #6 0x0000000000000000 in ?? ()
00:58:40.335
00:58:40.335 Thread 11 (Thread 0x7ff69cdc2700 (LWP 432)):
00:58:40.335 #0 pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:215
00:58:40.335 #1 0x0000000000c16dd0 in os_cond_wait_timed (cond=0x2eeeba0, fast_mutex=0x2eeeb60, abstime=0x7ff69cdc1d90) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0sync.cc:177
00:58:40.335 #2 0x0000000000c1762d in os_event_wait_time_low (event=0x2eeeb60, time_in_usec=5000000, reset_sig_count=1) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0sync.cc:723
00:58:40.335 #3 0x0000000000d1f7d7 in ib_wqueue_timedwait (wq=0x2eea0d8, wait_in_usecs=5000000) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/ut/ut0wqueue.cc:154
00:58:40.335 #4 0x0000000000dfd9da in fts_optimize_thread (arg=0x2eea0d8) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/fts/fts0opt.cc:2932
00:58:40.335 #5 0x00007ff6adaeee9a in start_thread (arg=0x7ff69cdc2700) at pthread_create.c:308
00:58:40.335 #6 0x00007ff6ad009ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
00:58:40.335 #7 0x0000000000000000 in ?? ()
00:58:40.335
00:58:40.335 Thread 10 (Thread 0x7ff69f5c7700 (LWP 422)):
00:58:40.335 #0 pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:215
00:58:40.335 #1 0x0000000000c16dd0 in os_cond_wait_timed (cond=0x2da94e0, fast_mutex=0x2da94a0, abstime=0x7ff69f5c6df0) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0sync.cc:177
00:58:40.335 #2 0x0000000000c1762d in os_event_wait_time_low (event=0x2da94a0, time_in_usec=5000000, reset_sig_count=1) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0sync.cc:723
00:58:40.335 #3 0x0000000000cd9822 in srv_monitor_thread (arg=0x0) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/srv/srv0srv.cc:1786
00:58:40.335 #4 0x00007ff6adaeee9a in start_thread (arg=0x7ff69f5c7700) at pthread_create.c:308
00:58:40.335 #5 0x00007ff6ad009ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
00:58:40.335 #6 0x0000000000000000 in ?? ()
00:58:40.335
00:58:40.335 Thread 9 (Thread 0x7ff6a21d3700 (LWP 382)):
00:58:40.335 #0 0x00007ff6ae349644 in ?? () from /lib/x86_64-linux-gnu/libaio.so.1
00:58:40.335 #1 0x0000000000c14808 in os_aio_linux_collect (array=0x2dfa8b0, segment=0, seg_size=256) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0file.cc:5027
00:58:40.335 #2 0x0000000000c14bd8 in os_aio_linux_handle (global_seg=4, message1=0x7ff6a21d2e48, message2=0x7ff6a21d2e50, type=0x7ff6a21d2e58, space_id=0x7ff6a21d2e60) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0file.cc:5172
00:58:40.335 #3 0x0000000000dd2144 in fil_aio_wait (segment=4) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/fil/fil0fil.cc:5453
00:58:40.335 #4 0x0000000000cdeead in io_handler_thread (arg=0x186dea0) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/srv/srv0start.cc:479
00:58:40.335 #5 0x00007ff6adaeee9a in start_thread (arg=0x7ff6a21d3700) at pthread_create.c:308
00:58:40.335 #6 0x00007ff6ad009ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
00:58:40.335 #7 0x0000000000000000 in ?? ()
00:58:40.335
00:58:40.335 Thread 8 (Thread 0x7ff69fdc8700 (LWP 421)):
00:58:40.335 #0 pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:215
00:58:40.335 #1 0x0000000000c16dd0 in os_cond_wait_timed (cond=0x2da9450, fast_mutex=0x2da9410, abstime=0x7ff69fdc7dc0) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0sync.cc:177
00:58:40.335 #2 0x0000000000c1762d in os_event_wait_time_low (event=0x2da9410, time_in_usec=1000000, reset_sig_count=1) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0sync.cc:723
00:58:40.335 #3 0x0000000000cd9fe0 in srv_error_monitor_thread (arg=0x0) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/srv/srv0srv.cc:2048
00:58:40.335 #4 0x00007ff6adaeee9a in start_thread (arg=0x7ff69fdc8700) at pthread_create.c:308
00:58:40.335 #5 0x00007ff6ad009ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
00:58:40.335 #6 0x0000000000000000 in ?? ()
00:58:40.335
00:58:40.335 Thread 7 (Thread 0x7ff6acf15700 (LWP 378)):
00:58:40.335 #0 0x00007ff6ae349644 in ?? () from /lib/x86_64-linux-gnu/libaio.so.1
00:58:40.335 #1 0x0000000000c14808 in os_aio_linux_collect (array=0x2decdf0, segment=0, seg_size=256) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0file.cc:5027
00:58:40.335 #2 0x0000000000c14bd8 in os_aio_linux_handle (global_seg=0, message1=0x7ff6acf14e48, message2=0x7ff6acf14e50, type=0x7ff6acf14e58, space_id=0x7ff6acf14e60) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0file.cc:5172
00:58:40.335 #3 0x0000000000dd2144 in fil_aio_wait (segment=0) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/fil/fil0fil.cc:5453
00:58:40.335 #4 0x0000000000cdeead in io_handler_thread (arg=0x186de80) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/srv/srv0start.cc:479
00:58:40.335 #5 0x00007ff6adaeee9a in start_thread (arg=0x7ff6acf15700) at pthread_create.c:308
00:58:40.335 #6 0x00007ff6ad009ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
00:58:40.335 #7 0x0000000000000000 in ?? ()
00:58:40.335
00:58:40.335 Thread 6 (Thread 0x7ff6a05c9700 (LWP 420)):
00:58:40.335 #0 pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:215
00:58:40.336 #1 0x0000000000c16dd0 in os_cond_wait_timed (cond=0x2e8f490, fast_mutex=0x2e8f450, abstime=0x7ff6a05c8e20) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0sync.cc:177
00:58:40.336 #2 0x0000000000c1762d in os_event_wait_time_low (event=0x2e8f450, time_in_usec=1000000, reset_sig_count=1) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0sync.cc:723
00:58:40.336 #3 0x0000000000beecd8 in lock_wait_timeout_thread (arg=0x0) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/lock/lock0wait.cc:502
00:58:40.336 #4 0x00007ff6adaeee9a in start_thread (arg=0x7ff6a05c9700) at pthread_create.c:308
00:58:40.336 #5 0x00007ff6ad009ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
00:58:40.336 #6 0x0000000000000000 in ?? ()
00:58:40.336
00:58:40.336 Thread 5 (Thread 0x7ff6a19d2700 (LWP 383)):
00:58:40.336 #0 0x00007ff6ae349644 in ?? () from /lib/x86_64-linux-gnu/libaio.so.1
00:58:40.336 #1 0x0000000000c14808 in os_aio_linux_collect (array=0x2dfa8b0, segment=1, seg_size=256) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0file.cc:5027
00:58:40.336 #2 0x0000000000c14bd8 in os_aio_linux_handle (global_seg=5, message1=0x7ff6a19d1e48, message2=0x7ff6a19d1e50, type=0x7ff6a19d1e58, space_id=0x7ff6a19d1e60) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0file.cc:5172
00:58:40.336 #3 0x0000000000dd2144 in fil_aio_wait (segment=5) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/fil/fil0fil.cc:5453
00:58:40.336 #4 0x0000000000cdeead in io_handler_thread (arg=0x186dea8) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/srv/srv0start.cc:479
00:58:40.336 #5 0x00007ff6adaeee9a in start_thread (arg=0x7ff6a19d2700) at pthread_create.c:308
00:58:40.336 #6 0x00007ff6ad009ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
00:58:40.336 #7 0x0000000000000000 in ?? ()
00:58:40.336
00:58:40.336 Thread 4 (Thread 0x7ff6a39d6700 (LWP 379)):
00:58:40.336 #0 0x00007ff6ae349644 in ?? () from /lib/x86_64-linux-gnu/libaio.so.1
00:58:40.336 #1 0x0000000000c14808 in os_aio_linux_collect (array=0x2ddf350, segment=0, seg_size=256) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0file.cc:5027
00:58:40.336 #2 0x0000000000c14bd8 in os_aio_linux_handle (global_seg=1, message1=0x7ff6a39d5e48, message2=0x7ff6a39d5e50, type=0x7ff6a39d5e58, space_id=0x7ff6a39d5e60) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0file.cc:5172
00:58:40.336 #3 0x0000000000dd2144 in fil_aio_wait (segment=1) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/fil/fil0fil.cc:5453
00:58:40.336 #4 0x0000000000cdeead in io_handler_thread (arg=0x186de88) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/srv/srv0start.cc:479
00:58:40.336 #5 0x00007ff6adaeee9a in start_thread (arg=0x7ff6a39d6700) at pthread_create.c:308
00:58:40.336 #6 0x00007ff6ad009ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
00:58:40.336 #7 0x0000000000000000 in ?? ()
00:58:40.336
00:58:40.336 Thread 3 (Thread 0x7ff6a29d4700 (LWP 381)):
00:58:40.336 #0 0x00007ff6ae349644 in ?? () from /lib/x86_64-linux-gnu/libaio.so.1
00:58:40.336 #1 0x0000000000c14808 in os_aio_linux_collect (array=0x2da7b90, segment=1, seg_size=256) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0file.cc:5027
00:58:40.336 #2 0x0000000000c14bd8 in os_aio_linux_handle (global_seg=3, message1=0x7ff6a29d3e48, message2=0x7ff6a29d3e50, type=0x7ff6a29d3e58, space_id=0x7ff6a29d3e60) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0file.cc:5172
00:58:40.336 #3 0x0000000000dd2144 in fil_aio_wait (segment=3) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/fil/fil0fil.cc:5453
00:58:40.336 #4 0x0000000000cdeead in io_handler_thread (arg=0x186de98) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/srv/srv0start.cc:479
00:58:40.336 #5 0x00007ff6adaeee9a in start_thread (arg=0x7ff6a29d4700) at pthread_create.c:308
00:58:40.336 #6 0x00007ff6ad009ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
00:58:40.336 #7 0x0000000000000000 in ?? ()
00:58:40.336
00:58:40.336 Thread 2 (Thread 0x7ff6a31d5700 (LWP 380)):
00:58:40.336 #0 0x00007ff6ae349644 in ?? () from /lib/x86_64-linux-gnu/libaio.so.1
00:58:40.336 #1 0x0000000000c14808 in os_aio_linux_collect (array=0x2da7b90, segment=0, seg_size=256) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0file.cc:5027
00:58:40.336 #2 0x0000000000c14bd8 in os_aio_linux_handle (global_seg=2, message1=0x7ff6a31d4e48, message2=0x7ff6a31d4e50, type=0x7ff6a31d4e58, space_id=0x7ff6a31d4e60) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/os/os0file.cc:5172
00:58:40.336 #3 0x0000000000dd2144 in fil_aio_wait (segment=2) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/fil/fil0fil.cc:5453
00:58:40.336 #4 0x0000000000cdeead in io_handler_thread (arg=0x186de90) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/innobase/srv/srv0start.cc:479
00:58:40.336 #5 0x00007ff6adaeee9a in start_thread (arg=0x7ff6a31d5700) at pthread_create.c:308
00:58:40.336 #6 0x00007ff6ad009ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
00:58:40.336 #7 0x0000000000000000 in ?? ()
00:58:40.336
00:58:40.336 Thread 1 (Thread 0x7ff68ffff700 (LWP 434)):
00:58:40.336 #0 __pthread_kill (threadid=<optimized out>, signo=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:63
00:58:40.336 #1 0x0000000000aa8c2c in my_write_core (sig=6) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/mysys/stacktrace.c:422
00:58:40.336 #2 0x00000000007285b9 in handle_fatal_signal (sig=6) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/sql/signal_handler.cc:251
00:58:40.336 #3 <signal handler called>
00:58:40.336 #4 0x00007ff6acf4c425 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
00:58:40.336 #5 0x00007ff6acf4fb8b in __GI_abort () at abort.c:91
00:58:40.336 #6 0x0000000000aad715 in safe_mutex_destroy (mp=0x2f77ca0, file=0xf1b180 "/mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/sql/sql_class.cc", line=1773) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/mysys/thr_mutex.c:318
00:58:40.336 #7 0x0000000000788442 in inline_mysql_mutex_destroy (that=0x2f77ca0, src_file=0xf1b180 "/mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/sql/sql_class.cc", src_line=1773) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/include/mysql/psi/mysql_thread.h:641
00:58:40.336 #8 0x000000000078c90b in THD::~THD (this=0x2f76c80, __in_chrg=<optimized out>) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/sql/sql_class.cc:1773
00:58:40.336 #9 0x000000000078cd5a in THD::~THD (this=0x2f76c80, __in_chrg=<optimized out>) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/sql/sql_class.cc:1804
00:58:40.336 #10 0x0000000000620226 in one_thread_per_connection_end (thd=0x2f76c80, block_pthread=true) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/sql/mysqld.cc:2743
00:58:40.336 #11 0x000000000079b9a5 in do_handle_one_connection (thd_arg=0x2f76c80) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/sql/sql_connect.cc:1626
00:58:40.336 #12 0x000000000079b2f3 in handle_one_connection (arg=0x2f76c80) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/sql/sql_connect.cc:1528
00:58:40.336 #13 0x0000000000b02e5c in pfs_spawn_thread (arg=0x2eed5d0) at /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/storage/perfschema/pfs.cc:1853
00:58:40.336 #14 0x00007ff6adaeee9a in start_thread (arg=0x7ff68ffff700) at pthread_create.c:308
00:58:40.336 #15 0x00007ff6ad009ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
00:58:40.336 #16 0x0000000000000000 in ?? ()
00:58:40.336
00:58:42.376 Compressed file /mnt/workspace/percona-server-5.6-param/BUILD_TYPE/debug/Host/ubuntu-precise-64bit/Percona-Server/build/mysql-test/var/log/innodb.percona_innodb_kill_idle_trx/mysqld.1/data/core

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

The mutex is being destroyed at THD::~THD():

THD::~THD()
{
  mysql_mutex_assert_not_owner(&LOCK_thread_count);
  ...
  mysql_mutex_destroy(&LOCK_thd_data);
  ...

The mutex is being held at thd_kill():

extern "C"
void thd_kill(ulong id)
{
  THD *tmp= NULL;
  mysql_mutex_lock(&LOCK_thread_count);
  Thread_iterator it= global_thread_list_begin();
  Thread_iterator it_end= global_thread_list_end();
  while (it != it_end)
  {
    tmp= *it;
    if (tmp->get_command() == COM_DAEMON)
      continue;
    if (tmp->thread_id == id)
    {
      mysql_mutex_lock(&tmp->LOCK_thd_data);
      mysql_mutex_unlock(&LOCK_thread_count);
      tmp->awake(THD::KILL_CONNECTION);
      mysql_mutex_unlock(&tmp->LOCK_thd_data);
      break;
    }
    it++;
  }
  if (it == it_end)
  {
    mysql_mutex_unlock(&LOCK_thread_count);
  }
}

tags: added: ci
Revision history for this message
Alexey Kopytov (akopytov) wrote :

I think the fix would be to replicate changes to kill_one_thread() in thd_kill() from http://bazaar.launchpad.net/~mysql/mysql-server/5.5/revision/4046, i.e. only kill a thread if is not already undergoing a cleanup procedure.

Removing the ci tag, since it is not just a test case issue. It is a double cleanup issue manifesting itself as an assertion failure in debug builds.

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

Alexey -

Thanks for your analysis. For the record I did not add the "ci" tag due to this being a test case issue - which it obviously isn't - but rather to indicate that this is something that needs fixing for clean Jenkins run. But, High priority should be enough anyway instead.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :
tags: added: kill-idle-trx
Revision history for this message
Roel Van de Paar (roel11) wrote :

Even though this is 5.1/5.5 affecting as well, is this an issue which needs further work for 5.6? If so, please add 56qual tag. Not setting it for the moment since it's present in previous releases.

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

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.