Race condition in MOZ_ASSERT in ContentParent::~ContentParent()

RESOLVED FIXED in mozilla18

Status

()

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: justin.lebar+bug, Unassigned)

Tracking

Trunk
mozilla18
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

If !mAppManifestURL.IsEmpty(), ContentParent::~ContentParent() asserts

  MOZ_ASSERT(!gAppContentParents ||
             !gAppContentParents->Get(mAppManifestURL));

At first glance, this assert should pass if we always remove |this| from gAppContentParents before deleting this, and if there's only one process per app manifest.

But I think this is a race because the ContentParent destructor is run asynchronously.  It might be the case that after we committed to destroying this ContentParent, we created another one for the same app.

I think this is what's happening in bug 789392.  Patch in a moment.
Posted patch Patch, v1Splinter Review
Attachment #667623 - Flags: review?(jones.chris.g)
Comment on attachment 667623 [details] [diff] [review]
Patch, v1

Nice!
Attachment #667623 - Flags: review?(jones.chris.g) → review+
Guess that didn't work. Backed out for M2 orange.
https://hg.mozilla.org/integration/mozilla-inbound/rev/16ac5cbc7793

https://tbpl.mozilla.org/php/getParsedLog.php?id=15792667&tree=Mozilla-Inbound

199 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_inproc_CloseApp.html | Should have gotten app frame close by now.
588 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/browser-element/mochitest/test_browserElement_oop_CloseApp.html | Should have gotten app frame close by now.
https://hg.mozilla.org/mozilla-central/rev/f9d8e474c709
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.