Closed Bug 13724 Opened 25 years ago Closed 25 years ago

AutoProxification causes deadlock

Categories

(Core :: XPCOM, defect, P3)

x86
Windows NT
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: dougt, Assigned: dougt)

References

Details

Here's my current example (simplified for brevity): interface nsIImapMessageSink : nsISupports { void SetupMsgWriteStream(in nsIFileSpec aFileSpec, in boolean appendDummyEnvelope); } Now from thread A which happens to be an imap connection thread, I call setupMsgWriteStream nsCOMPtr<nsIFileSpec> fileSpec; PRBool addDummyEnvelope = PR_TRUE; rv = msgurl->GetMessageFile(getter_AddRefs(fileSpec)); if (NS_FAILED(rv)) return rv; m_imapMessageSink->SetupMsgWriteStream(fileSpec, addDummyEnvelope); Now, thread A is blocked until the message sink call to setupMsgWriteStream is proxied and completed on thread B (which is the UI thread). Thread B makes a call like the following: SetupMsgWriteStream(nsIFileSpec * aFileSpec, PRBool addDummyEnvelope) { *blah* aFileSpec->GetFileSpec(&fileSpec); *blah* } The call to GetFileSpec turns into a auto-proxy call back to thread A. But events aren't getting pumped on thread A because it is blocked waiting for B to return. Hence the dead lock.
Status: NEW → ASSIGNED
Target Milestone: M14
I have disabled this. Re-address after beta
Blocks: 16654
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
I have a nested event loop know which prevents deadlock. All I have to do is remove the #ifdef's which I previously added. I am going to mark this as fixed, but leave the #ifdefs in until I fix 16773 and coclasses are invented.
You need to log in before you can comment on or make changes to this bug.