deadlock on server shutdown
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL patches by Codership | Status tracked in 5.6 | |||||
5.5 |
Fix Released
|
High
|
Teemu Ollakka | |||
5.6 |
Fix Released
|
High
|
Teemu Ollakka | |||
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC | Status tracked in 5.6 | |||||
5.5 |
Fix Released
|
Undecided
|
Unassigned | |||
5.6 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
While running seesaw test servers started to hang consistently during shutdown. Further investigation showed that in the case of hangs there were two threads waiting for same condition variable:
Thread 2 (Thread 0x7f5fd30ea700 (LWP 5373)):
#0 pthread_
at ../nptl/
#1 0x0000000000526572 in inline_
that=0x10108e0 <COND_thread_
src_
src_line=4785)
at /home/teemu/
#2 wsrep_wait_
at /home/teemu/
#3 0x00000000006571b1 in wsrep_stop_
at /home/teemu/
#4 0x00000000005252ec in kill_server (sig_ptr=0x0)
at /home/teemu/
#5 0x000000000052536e in kill_server_thread (arg=<optimized out>)
at /home/teemu/
#6 0x00007f6004eb2f6e in start_thread (arg=0x7f5fd30e
#7 0x00007f6003f9b9cd in clone () at ../sysdeps/
(gdb) p wsrep_running_
$1 = 0
Code corresponding to thread 2 frame 2:
while (wsrep_
{
mysql_
DBUG_
}
Thread 1 (Thread 0x7f6005b1d740 (LWP 3426)):
#0 pthread_
at ../nptl/
#1 0x0000000000528e76 in inline_
that=0x10108e0 <COND_thread_
src_
src_line=5392)
at /home/teemu/
#2 mysqld_main (argc=54, argv=0x2a982c8)
at /home/teemu/
#3 0x00007f6003ec2de5 in __libc_start_main (main=0x50a520 <main(int, char**)>,
argc=15, ubp_av=
rtld_
#4 0x000000000051c0bd in _start ()
(gdb) p ready_to_exit
$2 = false
Code corresponding to thread 1 frame 2:
mysql_
while (!ready_to_exit)
mysql_
mysql_
Probable reason for this is that start_wsrep_THD() uses mysql_cond_signal() instead of mysql_cond_
description: | updated |
Fix to 5.5 branch committed in: http:// bazaar. launchpad. net/~codership/ codership- mysql/wsrep- 5.5/revision/ 3955