[Issue 11981] unittest 'host' deadlock
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Feb 8 20:23:13 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=11981
--- Comment #12 from Stanislav Blinov <stanislav.blinov at gmail.com> 2014-02-08 20:23:11 PST ---
So the failing sequence boils down to this:
Main: | t:
|
// t.start(): |
|
slock.lock(); |
m_isRunning = true; |
pthread_create(); |
// at this point, |
// t.isRunning == true |
add(this); |
// at this point, |
// t is subject to |
// thread_suspendAll |
slock.unlock(); |
|
// thread_suspendAll(): |
slock.lock(); |
|
// suspend(t): | // thread_entryPoint():
pthread_kill(); | getStackBottom();
| // or rt.tlsgc.init()
| // or (maybe?) Thread.setThis()
At this point, t *may* be inside malloc(). It catches SIGUSR1,
thread_suspendHandler() is called. Eventually, the handler gets to
Thread.getThis(), which calls malloc() again. If t already was inside malloc(),
it locks.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list