Bug #42558 maria: race condition in deadlock detector
Submitted: 2 Feb 2009 20:58 Modified: 26 Feb 2009 17:33
Reporter: Sergei Golubchik Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Maria storage engine Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Sergei Golubchik CPU Architecture:Any

[2 Feb 2009 20:58] Sergei Golubchik
Description:
there is a possible race condition in deadlock detector when there's a custom killing strategy (not LATEST, that is). deadlock() can signal a victim when the latter isn't waiting on pthread_cond_timedwait() and wakeup signal will be lost.

How to repeat:
.
[26 Feb 2009 17:33] Sergei Golubchik
No, it's actually safe. The caller has mutexes that prevent blockers to disappear unexpectedly, they are held over the wt_* function calls and will prevent signals from being lost (exactly like a mutex over pthread_cond_wait does).