Closed Bug 797515 Opened 12 years ago Closed 12 years ago

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

Categories

(Core :: IPC, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: justin.lebar+bug, Unassigned)

References

Details

Attachments

(1 file)

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.
Attached 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: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: