Closed
Bug 1359935
Opened 7 years ago
Closed 7 years ago
Removing GC call in nsXREDirProvider::DoShutdown() leaks while running dom/presentation chrome mochitests
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla55
People
(Reporter: mccr8, Assigned: mccr8)
References
Details
Attachments
(1 file)
No description provided.
Assignee | ||
Comment 1•7 years ago
|
||
Four .jsms leak: chrome://specialpowers/content/SpecialPowersObserver.jsm file:///home/amccreight/mc/obj-dbg.noindex/dist/bin/components/multiprocessShims.js resource://gre/modules/RemoteAddonsParent.jsm resource://gre/modules/XPCOMUtils.jsm
Assignee | ||
Comment 2•7 years ago
|
||
The leak occurs specifically with the test test_presentation_sender_startWithDevice.html
Assignee | ||
Comment 3•7 years ago
|
||
This seems to be a bug with registerOriginalFactory in PresentationSessionChromeScript.js. This class sets up a number of mock factories for testing purposes, but it only unregisters those that are replacing an existing factory. Changing this so we unregister all of the factories (but only re-register when there was an existing factory) seems to fix the leak.
Assignee | ||
Comment 4•7 years ago
|
||
My guess would be that this doesn't leak when the JS_GC is present because something very late in shutdown shakes out the factories, and then this final GC is somehow enough to cause the jsms to go away.
Assignee | ||
Comment 5•7 years ago
|
||
Never mind, my patch does not actually fix anything. Need to investigate more.
Assignee | ||
Comment 6•7 years ago
|
||
I think I have an actual fix now: for some reason, mockedSessionTransport.close() gets called after the special powers stuff has been torn down, and somehow calling sendAsyncMessage then causes a leak. I avoid this by not doing anything in close() if callback_ is null, which indicates that tearDown has been called already.
Assignee | ||
Comment 7•7 years ago
|
||
try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=686633edd3a68ac6eeb8e10dc0e4e3532a0bbce1
Comment hidden (mozreview-request) |
Comment 9•7 years ago
|
||
mozreview-review |
Comment on attachment 8863059 [details] Bug 1359935 - Don't call sendAsyncMessage in mockedSessionTransport.close() after tearDown. https://reviewboard.mozilla.org/r/134896/#review138256 Looks good. Thanks.
Attachment #8863059 -
Flags: review?(kechang) → review+
Comment 10•7 years ago
|
||
Pushed by amccreight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/758e3a7da9bd Don't call sendAsyncMessage in mockedSessionTransport.close() after tearDown. r=kershaw
Comment 11•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/758e3a7da9bd
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Assignee | ||
Updated•7 years ago
|
status-firefox53:
--- → wontfix
status-firefox54:
--- → affected
status-firefox-esr45:
--- → wontfix
status-firefox-esr52:
--- → wontfix
Assignee | ||
Comment 12•7 years ago
|
||
This is a test-only change that will be needed on beta if we are going to eventually uplift bug 833143 to beta to improve a shutdown hang.
Keywords: checkin-needed
Whiteboard: [checkin-needed Beta]
Comment 13•7 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/b6126c6706d0
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•