Firefox is consuming 22 GB of Ram while using Dev Tools
Categories
(DevTools :: General, defect, P2)
Tracking
(Not tracked)
People
(Reporter: cristiancehi, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
application/octet-stream
|
Details |
Updated•7 years ago
|
Comment 1•6 years ago
|
||
Updated•6 years ago
|
Comment 2•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Reporter | ||
Comment 4•6 years ago
|
||
Hi! I'm sorry I didn't update about this before. I didn't know how to do it.
But today I reproduced the bug because one year has passed and this wasn't reported by anyone. So I restored all my settings to default and the process deleted all my extensions. I proceeded to open one tab with the react app I'm doing for my job and kept reloading it (through changes in the code and webpack reload) and after 100+ iterations I ended having like 6+ GB in the Main Process and 6+ GB in a FirefoxCP Web Content Process.
This file I'm attaching I hope it's complete and useful.
I got the CC and GC logs too, but i'm reserving those to upload if they're really needed.
PS. I notice that in my laptop computer I use in my workplace (Ubuntu) there is also a memory leak. I need to restart Firefox or even worse when swap is heavily used because this I need to restart the computer.
Updated•6 years ago
|
Reporter | ||
Comment 5•6 years ago
|
||
Sorry, I forgot to mention. The Web Developer Tools have to be open. I tested the same method I mentioned an hour ago without Web Developer Tools and no memory leak occurred.
Updated•5 years ago
|
Updated•5 years ago
|
Comment 6•4 years ago
|
||
I have this problem too.
The consumed memory never releases after reloading the page. It just releases when the tab completely closed or killed.
Comment 7•4 years ago
|
||
Of course, it just occurs when the Developer Tools is open.
Comment 8•4 years ago
|
||
(In reply to Mostafa Lavaei from comment #6)
I have this problem too.
The consumed memory never releases after reloading the page. It just releases when the tab completely closed or killed.
Do you have more details about what you've been doing and what page were opened?
E.g. where you extensively using the Debugger, running workers or executing a lot of XHRs, etc..?
Any chance to provide a test case?
Honza
Comment 9•4 years ago
|
||
it's obviously a memory leak and does not depend on XHRs or anything else. Yes, if i use a lot of XHRs, the memory will full faster.
I've experienced it in serveral projects and on different machines. But for the test case, you can create a new project using Angular Framework
and just add a <video>
tag (just for making your memory full faster, you can skip it). Then refresh the page manully or change the code and let Dev Server refresh the page for you. During these refreshes your Dev Tools must be open. Of course if you check the Disable Cache
option, your memory will become full faster. You can track the memory usage of "Web Content" process (In the Ubuntu). You will see the memory usage increases after each refresh and firefox never free it after refresh.
Comment 10•4 years ago
|
||
Thanks for quick update!
Any chance you could provide/attach the Angular app, so we can run it and reproduce the issue on our machines?
I don't have much experience with Angular myself, so it would be great help!
Thanks,
Honza
Comment 11•4 years ago
|
||
I share it in the Github.
Please read the README.md
for more details.
Comment 12•4 years ago
|
||
@Mostafa: awesome, thanks for the test app!
I can easily reproduce the problem on my machine (Nightly, Win10) using the app here:
https://github.com/Lavaei/firefox-memory-leak
I am seeing a lot of memory allocated in the content process as well as in the main process.
The main process also reports explicit allocations for strings (seems to be sources), see about:memory
574.01 MB (47.46%) -- string(length=1048576, copies=287, "(window["webpackJsonp"] = ...
143.51 MB (11.87%) -- string(length=144704, copies=287, "(window["webpackJsonp"] = ...
...
You can also see the attached memory report, it shows the same.
Alex, are we leaking sources here?
Honza
Comment 13•4 years ago
|
||
- the page does an actual reload (we do navigate)
- there's no worker on the content page
- I think this only occurs once the debugger is open (opening only the console, I don't see this increase in memory)
- we seems to have a new copy of the source string on each reload (see
copies=287
) - there are source maps on the page, and the source map worker is consuming memory (sometimes there's 2 copies of the sourcemap file), but it doesn't grow
Updated•4 years ago
|
Comment 15•4 years ago
|
||
This seems to highlight the same issues as Bug 1682212: leaked strings, sourcemap worker etc.
Will close as duplicate and mention the test project provided here (thanks for that!) in the other bug.
Description
•