Subject: Anyone using mysql replication on -current?
To: None <>
From: Andrew Gillham <>
List: netbsd-users
Date: 06/28/2003 23:12:15
I have a 1.6R i386 machine running mysqld.  I setup a second, 1.6U 
(-current updated in the last 1-2 days) i386 system with mysqld as well.

When I enable replication, it works fine, but I can't shutdown mysqld 
any longer.  The replication thread won't die.  The process is in 
'sigwait' according to top, and I have to use 'kill -9' to stop the 

I rebuilt mysqld with the include mit-pthreads and I don't have this 

So... Since this seems to be an issue with our native pthreads, and I am 
able to reproduce it on demand, how do I go about debugging it?

I have tried the following:

# setenv PTHREAD_ERRORMODE print
# /usr/pkg/etc/rc.d/mysqld start
# debuglog -r > log.txt

Attaching with gdb looks like this:
Switching to Thread 21 ()]
---Type <return> to continue, or q <return> to quit---
0x4823f49f in __sigtimedwait () from /usr/lib/
(gdb) where
#0  0x4823f49f in __sigtimedwait () from /usr/lib/
#1  0x4818cbbf in sigtimedwait () from /usr/lib/
#2  0x482119fb in sigwait () from /usr/lib/
#3  0x807b035 in dladdr ()
#4  0x481922e2 in pthread_create () from /usr/lib/
(gdb) info threads
   4 Thread 0 ()  0x482103d3 in select () from /usr/lib/
* 3 Thread 21 ()  0x4823f49f in __sigtimedwait () from /usr/lib/
   2 Thread 22 ()  0x4821041b in read () from /usr/lib/
   1 Thread 24 ()  0x4818c07b in pthread__locked_switch ()
    from /usr/lib/

With top the mysqld process is in 'sigwait' as Thread 21 is shown.

What else should I collect before using send-pr?