[Issue 4890] GC.collect() deadlocks multithreaded program.
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Sep 4 10:15:04 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=4890
--- Comment #14 from Sean Kelly <sean at invisibleduck.org> ---
It's likely as I said. The way GC collections work is different on different
platforms. Both Windows and OSX use a kernel call to suspend threads and
inspect their stacks. On other Unix platforms (like Linux), the suspending is
done via signals, and signal handlers are VERY restrictive in what can safely
be done inside them. And either way, having one thread try to allocate
something from the GC inside this suspend handler is a guaranteed deadlock. If
this is really what's going on I'm amazed that D on Linux works at all. Maybe
it really is something else...
I'm setting up a new Linux VM and so should hopefully be able to repro this
shortly.
--
More information about the Digitalmars-d-bugs
mailing list