|Summary:||r179576 introduce a deadlock potential during GC thread suspension|
|Product:||WebKit||Reporter:||Mark Lam <mark.lam>|
|Severity:||Normal||CC:||fpizlo, ggaren, gyuyoung.kim, mmirman, msaboff, oliver|
|Version:||528+ (Nightly build)|
Description Mark Lam 2015-02-04 15:24:35 PST
http://trac.webkit.org/r179576 introduced a potential for deadlocking. In the GC thread suspension loop, we currently delete MachineThreads::Thread that we detect to be invalid. This is unsafe because we may have already suspended some threads, and one of those suspended threads may still be holding the heap lock. An attempt to do a deletion there may therefore result in a deadlock. The fix is to put to the invalid threads in a separate toBeDeleted list, and delete them only after GC has resumed all threads.
Comment 1 Mark Lam 2015-02-04 15:26:08 PST
This is also being tracked in <rdar://problem/17979784> as a follow up fix.
Comment 3 Michael Saboff 2015-02-04 16:14:32 PST
Comment 4 Mark Lam 2015-02-04 16:34:01 PST
Thanks for the review. I've simplified the comments and fixed the typo. Landed in r179648: <http://trac.webkit.org/r179648>.