CPOWs can hang the browser

RESOLVED FIXED in mozilla35

Status

()

Core
IPC
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: billm, Assigned: billm)

Tracking

unspecified
mozilla35
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Created attachment 8493528 [details] [diff] [review]
fix-ipc

I'm filing this bug even though I bug 1049879 should fix the issue. David, if you think you'll finish bug 1049879 in the next few days, then there's no need to review this one. But it's probably interesting to look at anyway :-).

Imagine the callstack is as follows:
  SendAndWait() [suppose we're awaiting a sync reply]
    ProcessPendingUrgentMessage() [suppose an urgent message arrives while waiting]

If a new urgent message arrives during this time (a second one), then OnMessageReceivedFromLink will set shouldWakeUp to true because AwaitingSyncReply() is true. However, when ProcessPendingUrgentRequest() for the first urgent message returns to SendAndWait, we won't try to process the second incoming urgent message. If there's a sync reply waiting for us, we'll just return it. Nothing will cause us to process the urgent message in the future, so the parent will hang waiting for the response.

This is a really rare occurrence. The second urgent message has to be received after the response to the first one was sent, but before SendAndWait returns. I was only able to reproduce the problem by maxing out my CPUs and running a session restore test over and over.

I haven't tested this, but it looks like the patch in bug 1049879 doesn't have this problem.
Attachment #8493528 - Flags: review?(dvander)
Attachment #8493528 - Flags: review?(dvander) → review+
https://hg.mozilla.org/mozilla-central/rev/ee3962e9f1cd
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.