[dt-leak] DevTools memory leak on page reload even after closing the Toolbox
Categories
(DevTools :: Netmonitor, task)
Tracking
(Not tracked)
People
(Reporter: jdescottes, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
Still needs to be reproduced
The STRs should be:
- open the Multiprocess Browser Toolbox
- close it
- use the browser normally
ER: DevTools should not leak memory
AR: DevTools will leak significant memory
From the report we had from :nika, the browser was simply left open with a few tabs open on websites such as youtube.com, and after one night the memory consumption was 5GB most of it being devtools strings.
We also suspect network / netmonitor to be involved here because a profile highlighted 1.5s hangs in the following method https://searchfox.org/mozilla-central/rev/4648b6ee31c2519b1753023e4f4853b14fdd16e5/devtools/server/actors/network-monitor/network-response-listener.js#331 (which could then be linked to Bug 1688703)
Reporter | ||
Comment 1•3 years ago
|
||
Reporter | ||
Comment 2•3 years ago
|
||
Another snapshot captured a few hours earlier to illustrate the evolution
Reporter | ||
Comment 3•3 years ago
|
||
I tried 2 sessions of 15 minutes, once with fission, once without.
I open the MBT for ~1mn at the beginning. Open a few tabs, navigate, do some back / forward etc...
Then I close devtools, perform a few reloads again etc...
After 15mn I measure the memory.
Both times I get no footprint from DevTools. I'll try to let the browser run longer, but if anyone has better STRs it would be helpful.
Maybe DevTools failed to shutdown properly? (as bad as it is, a 5GB leak is not surprising if the MBT was actually still running somehow)
Reporter | ||
Comment 4•3 years ago
|
||
From :nika on Slack:
I think the repro strategy is to:
- open the browser devtools
- crash a content process (e.g. by navigating a page to about:crashcontent)
- close browser devtools, and wait for a long time
I have fission.autostart and fission.bfcacheInParent enabled.
From gc logs:
via nsXPCWrappedJS::mJSObj :
0xee4b3e26a50 [Object <no private>]
--[conn, _conn]--> 0x1613fc6e8938 [Object <no private>]
--[_extraPools]--> 0x1613fc6135b0 [Array <no private>]
--[objectElements[4752]]--> 0x844cffec468 [Object <no private>]
--[__poolMap]--> 0xf991ba0cf0 [Map 0x7f20d9d08920]
--[value]--> 0x78e2bf98660 [Object <no private>]
--[str]--> 0x336e93ca49a0 [string <external: length 58491 (truncated)> /*\n\n]
0x7f21d3868ec0 [rc=2] nsXPCWrappedJS (nsIObserver)
> 0x7f21d3868ec0 self
> 0xee4b3e26a50 mJSObj
> 0x7f21d3686910 root
0x7f21d3686910 [rc=3] nsXPCWrappedJS (nsIServiceWorkerRegistrationInfoListener)
> 0x7f21d3686910 self
> 0xee4b3e26a50 mJSObj
Reporter | ||
Comment 5•3 years ago
|
||
Comment 6•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'DevTools::Netmonitor' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Description
•