Bug 15268 – possible deadlock for Thread.getAll/Thread.opApply w/ GC.collect
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2015-10-30T20:26:00Z
Last change time
2016-01-03T14:10:08Z
Keywords
pull
Assigned to
nobody
Creator
code
Comments
Comment #0 by code — 2015-10-30T20:26:20Z
This is a classical lock inversion deadlock.
GC.collect -> gclock -> thread_suspendAll -> slock
Thread.getAll -> slock -> GC.malloc -> gclock
Anyone holding slock must not use the GC.