Closed Bug 1308398 Opened 8 years ago Closed 8 years ago

Fix shutdown leaks in the GPU process

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: dvander, Assigned: dvander)

References

Details

Attachments

(3 files)

These are all pretty consistent on TBPL.
nsThreadManager::Init (from XPCOM initialization) was racing with the link thread trying to post a connected message. The result was, NS_DispatchToMainThread sometimes didn't see a main thread, and leaked the runnable.

This patch uses the same fix as ContentChild: just initialize nsThreadManager manually before calling Open() on the top-level actor.
Attachment #8798748 - Flags: review?(wmccloskey)
Two bugs here. First, VsyncBridgeParent was never assigned to anything so the shutdown call would never happen. Second, the shutdown implementation could access CompositorThreadHolder after it was shut down. This refactors the Shutdown function so that can't happen.
Attachment #8798750 - Flags: review?(matt.woodrow)
Attached patch part 3, move XPCOM shutdown (deleted) — Splinter Review
nsAppShell expects XPCOM to still exist when we finally return out of the event loop, otherwise it leaks stuff. This moves XPCOM shutdown to GPUParent::CleanUp, which mirrors what ContentChild does.
Attachment #8798751 - Flags: review?(wmccloskey)
Summary: Fix leaks in the GPU process → Fix shutdown leaks in the GPU process
Attachment #8798750 - Flags: review?(matt.woodrow) → review+
Attachment #8798748 - Flags: review?(wmccloskey) → review+
Attachment #8798751 - Flags: review?(wmccloskey) → review+
Pushed by danderson@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f781d8fa1cf3
Ensure nsThreadManager is started before IPC in the GPU process. (bug 1308398 part 1, r=billm)
https://hg.mozilla.org/integration/mozilla-inbound/rev/7030c3219a1e
Fix VsyncBridgeParent leaking on GPU process shutdown. (bug 1308398 part 2, r=mattwoodrow)
https://hg.mozilla.org/integration/mozilla-inbound/rev/b4b3c7e78cfd
Move GPU process XPCOM shutdown to ProcessChild::CleanUp. (bug 1308398 part 3, r=billm)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: