Bug #16670 Thread alarms cause havoc on cooperative multithreading systems (SCO..)
Submitted: 20 Jan 2006 13:34 Modified: 21 Jan 2006 12:38
Reporter: Domas Mituzas Email Updates:
Status: Unsupported Impact on me:
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.18 OS:Other (SCO OpenServer 5.0.7)
Assigned to: CPU Architecture:Any

[20 Jan 2006 13:34] Domas Mituzas
In cooperative multithreading environments ALRM signal interrupts any syscalls hapenning for whole instance, therefore interrupting proper workflow of clients and server. 

e.g. accept() call for a unix domain socket would immediately deliver EINTR to connect()'ing client. 

Excessive signaling possibly appeared after 5.0.16.

How to repeat:
kill -ALRM server during any syscall, when alarm handler is installed, observe consequences.

Suggested fix:
Replace alarm signals with signal-less notification methods, async calls, spinloops, etc. 
Allow more efficient reconnect on failed connections in libmysqlclient and mysql cli.
[20 Jan 2006 13:58] Domas Mituzas
gdb traps many SIGALRMs.