nsThreadPool::Dispatch() calls nsThreadPool::PutEvent() which can create and then possibly immediately shut down a new thread. nsIThread::Shutdown() processes pending events, so deadlock can occur.
Created attachment 767174 [details] [diff] [review] fix
Attachment #767174 - Flags: review?(benjamin)
Comment on attachment 767174 [details] [diff] [review] fix I feel like threadpool has other lock-ordering inconsistencies, but this will at least help short-term. I really don't think threadpool threads need to be XPCOM threads at all, but we can fix that elsewhere.
Attachment #767174 - Flags: review?(benjamin) → review+
tryserver looks good - https://tbpl.mozilla.org/?tree=Try&rev=2826a180bdad
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.