Closed
Bug 824340
Opened 12 years ago
Closed 12 years ago
DMD deadlocks getting a stack trace while another thread is releasing an shlib
Categories
(Core :: DMD, defect)
Tracking
()
RESOLVED
FIXED
mozilla20
People
(Reporter: neil, Assigned: n.nethercote)
References
Details
Attachments
(2 files)
I created a DMD-enabled build and it deadlocked while restoring my session. Thread 1 was doing something with fonts that was causing an shlib to be released. This locks the internal list of loaded libraries, but also calls free, which of course DMD tries to track, and needs to lock its mutex to do so. Thread 4 was trying to allocate memory, so DMD had locked its mutex, and then tried to walk the stack, which internally needs the list of loaded libraries.
Assignee | ||
Comment 1•12 years ago
|
||
Thanks for the clear analysis, Neil. We have some existing windows-only code to protect against this case. Clearly it's needed on other platforms. This patch does that. (trace-malloc has similar deadlock-avoidance code enabled on all platforms, and when transferring it to DMD it got made Windows-only because the comment only mentioned Windows!)
Attachment #695371 -
Flags: review?(justin.lebar+bug)
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → n.nethercote
Assignee | ||
Comment 2•12 years ago
|
||
Comment on attachment 695371 [details] [diff] [review] DMD: fix a deadlock when getting stack traces. Review of attachment 695371 [details] [diff] [review]: ----------------------------------------------------------------- Neil, can you test this patch? Thanks.
Attachment #695371 -
Flags: feedback?(neil)
Reporter | ||
Updated•12 years ago
|
Attachment #695371 -
Flags: feedback?(neil) → feedback+
Comment 3•12 years ago
|
||
Comment on attachment 695371 [details] [diff] [review] DMD: fix a deadlock when getting stack traces. Can't argue with this.
Attachment #695371 -
Flags: review?(justin.lebar+bug) → review+
Assignee | ||
Comment 4•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/eb1a9250d68a
Comment 5•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/eb1a9250d68a
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Assignee | ||
Updated•11 years ago
|
Component: General → DMD
You need to log in
before you can comment on or make changes to this bug.
Description
•