Deadlock in mscom::Interceptor::~Interceptor

RESOLVED FIXED in Firefox 55

Status

()

Core
Disability Access APIs
RESOLVED FIXED
4 months ago
4 months ago

People

(Reporter: aklotz, Assigned: aklotz)

Tracking

Trunk
mozilla55
Unspecified
Windows
Points:
---

Firefox Tracking Flags

(firefox55 fixed)

Details

Attachments

(1 attachment, 3 obsolete attachments)

This happens when GetInitialInterceptorForIID has to fallback and call GetInterceptorForIID(). The latter function needs to run some stuff on the main thread, so we should release the live set lock before doing that.
Created attachment 8875811 [details] [diff] [review]
Release live set lock before posting work to main thread
Attachment #8875811 - Flags: review?(jmathies)
Created attachment 8875812 [details] [diff] [review]
Release live set lock before posting work to main thread (r2)

Some minor cleanup, basically the same patch
Attachment #8875811 - Attachment is obsolete: true
Attachment #8875811 - Flags: review?(jmathies)
Attachment #8875812 - Flags: review?(jmathies)
Created attachment 8875890 [details] [diff] [review]
Release live set lock before posting work to main thread (r3)

Pretty silly of me to write an AutoLock class that doesn't... umm... lock! ;-)
Attachment #8875812 - Attachment is obsolete: true
Attachment #8875812 - Flags: review?(jmathies)
Attachment #8875890 - Flags: review?(jmathies)
Created attachment 8875909 [details] [diff] [review]
Release live set lock before posting work to main thread (r4)

I missed another location where main thread activity could occur. I had to add a new function to weak reference support so that I could separate locking a strong ref from doing a subsequent QI on that strong ref.
Attachment #8875890 - Attachment is obsolete: true
Attachment #8875890 - Flags: review?(jmathies)
Attachment #8875909 - Flags: review?(jmathies)

Comment 5

4 months ago
Comment on attachment 8875909 [details] [diff] [review]
Release live set lock before posting work to main thread (r4)

Review of attachment 8875909 [details] [diff] [review]:
-----------------------------------------------------------------

been testing with this, lock up appears fixed.
Attachment #8875909 - Flags: review?(jmathies) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/acbfbde0a7d20e741a347e121c0a34aa938a474a
Bug 1371345: Fix deadlock caused by holding mscom Interceptor live set lock while posting work to the main thread; r=jimm
https://treeherder.mozilla.org/#/jobs?repo=try&revision=a6214f85b69caf3a9885ab21c764302f38e0c785

Comment 8

4 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/acbfbde0a7d2
Status: ASSIGNED → RESOLVED
Last Resolved: 4 months ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.