Open Bug 1482037 Opened 6 years ago Updated 1 year ago

Excessive memory use, memory leak

Categories

(Core :: JavaScript Engine, defect, P3)

61 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: chris, Unassigned)

Details

(Whiteboard: [MemShrink:P2])

Attachments

(14 files)

14.16 KB, text/plain
Details
50.87 KB, application/gzip
Details
204.74 KB, application/gzip
Details
93.50 KB, application/gzip
Details
194.02 KB, application/gzip
Details
181.99 KB, application/gzip
Details
172.93 KB, application/gzip
Details
452.33 KB, image/jpeg
Details
375.12 KB, application/gzip
Details
4.97 MB, application/pdf
Details
82.55 KB, application/pdf
Details
8.88 MB, application/zip
Details
9.62 MB, application/zip
Details
3.44 MB, application/zip
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20180621064021

Steps to reproduce:

Computer 1:
Running Firefox 61.0.2 64-bit (auto-updated) on 5-year-old computer (8GB memory) running Windows 7 Professional SP1 64-bit.  Opened Firefox, opened page "https://www.msn.com" (which redirects to "https://www.msn.com"), and then remained idle.

Computer 2:
Installed Firefox 61.0.2 64-bit on a virtual machine (4GB memory) running a fresh install of Windows 7 Professional SP1 64-bit.  Opened Firefox, opened page "https://www.msn.com" (which redirects to "https://www.msn.com"), and then remained idle.

I was alerted to this problem by someone else (owner of computer 1), so I do not know if this issue affected previous versions of Firefox.


Actual results:

On both computers, once the "https://www.msn.com" page is loaded, the Firefox.exe processes allocate memory non-stop (usually with 15-35% CPU usage) until all memory is used, eventually crashing the computer.


Expected results:

Firefox should have loaded the page and kept running with minimal memory usage.

Firefox should be able to load a single web page and sit idle without eating all memory and crashing the computer (even if that web page has dynamically-updated content).
I forgot to mention that in those earlier tests, when Firefox memory usage was increasing endlessly, I used Firefox's Inspector to view a snapshot of the memory for the "www.msn.com" tab.  This was the only tab (and only window) open, and it was using a newly-created Firefox profile with no add-ons installed other than the defaults.  Task Manager showed Firefox using 1.4 GB memory (and steadily climbing), but Firefox's Inspector memory snapshot showed the tab using only 77.32 MB memory.

I just performed these same tests again right now, and at the moment, Firefox memory usage remains steady (not endlessly increasing) when visiting "www.msn.com".  There seems to be no consistency with regard to when this endless memory consumption will occur.
Hi Chris,

I tried to reproduce this issue on Firefox 61.0.2 and Nightly 63.0a1 (2018-08-14) but didn't manage to.

Can you please try to create a performance profile and attach it to this issue if you can reproduce it again? You can find help in this link: https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Reporting_a_Performance_Problem
Flags: needinfo?(chris)
I just tested it three times, with Gecko Profiler active, and it exhibited the endless memory consumption problem each time.

Here's what I did:

1.  Created a new Firefox profile.
2.  Installed Gecko Profiler extension.  Please note I kept Firefox 61.0.2; did not update to Nightly.
3.  Closed, then re-opened Firefox.
4.  Opened page "www.msn.com".
5.  Opened Task Manager and verified firefox.exe processes were endlessly consuming memory (4 firefox.exe processes with a combined Private Working Set memory usage of 1.7 GB within one minute, and still climbing).
6.  Captured profile with Gecko Profiler and uploaded (permalink URL "https://perfht.ml/2OHNDqe").

7.  Closed Firefox.
8.  Verified firefox.exe processes had terminated.
9.  Opened Firefox.
10.  Opened page "www.msn.com".
11.  Verified firefox.exe processes were endlessly consuming memory.
12.  Captured profile with Gecko Profiler and uploaded (permalink "https://perfht.ml/2OHeSB0").

13.  Changed Gecko Profiler buffer from 90 MB to 270 MB (in case 90 MB wasn't big enough to capture the issue, since I don't know how to read the data Gecko Profiler produces).

14.  Closed Firefox.
15.  Verified firefox.exe processes had terminated.
16.  Opened Firefox.
17.  Started Gecko Profiler while still on Firefox default home page (blank tab with suggested sites).
18.  Opened page "www.msn.com".
19.  Verified firefox.exe processes were endlessly consuming memory.
20.  Changed page to home page.
21.  Verified firefox.exe processes were no longer consuming additional memory.
22.  Captured profile with Gecko Profiler and uploaded (permalink "https://perfht.ml/2MT0gOx").

The purpose of that last capture is so you can see that the memory consumption stops once page "www.msn.com" is no longer loaded.

Let me know if you need any additional information or if you want me to try this with the Nightly build.
Flags: needinfo?(chris)
Mike, can you please take a look at the reports from Comment 3?
Flags: needinfo?(mconley)
Hi Chris,

Can I ask you to perform the experiment again, but this time, once one of the machines has started to consume a large amount of memory, to generate a report from about:memory and post it?

As it is, perf.html profiles are more useful for determining why the browser is being unresponsive, and less useful for understanding why it's consuming so much memory. An about:memory report will hopefully get us closer to understanding.
Flags: needinfo?(mconley) → needinfo?(chris)
Whiteboard: [MemShrink]
Attached file Baseline memory report
I updated Firefox (to version 62.0 64-bit), deleted the Firefox profile and created a new one, re-ran the test, saved the memory report, and uploaded the following four files.

1.  Raw data from about:support, in case that information is helpful.

2.  Baseline memory report -- This memory report was saved immediately after opening Firefox, before opening any web page.  Task Manager showed Firefox memory usage was 169 MB.

3.  Memory report with www.msn.com page open -- This memory report was saved approximately 1.5 to 2 minutes after opening page "https://www.msn.com".  Task Manager showed Firefox memory usage was 1.6 GB.

4.  Memory report after closing www.msn.com page -- This memory report was saved approximately 30 seconds after closing page "https://www.msn.com" (leaving "about:memory" as the only visible tab open).  Task Manager showed Firefox memory usage was 543 MB.
Flags: needinfo?(chris)
When I load your msn.com link in my own browser (which is Nightly Firefox), it is only using about 50MB of memory. In your about:memory report, it is using about 1GB, split between a detached window and a regular window. I'm not sure what the difference is. Are you logged in to anything related to MSN? The detached window makes it seem like MSN could be leaking an iframe, but that doesn't explain all of the other memory usage.
I'll try to repro on my Win10 machine. One thing I noticed is you have one of our experiments, TAAR v3 enabled. Is it possible to test again with that extension disabled?
Flags: needinfo?(erahm)
I set up another VM with Firefox Nightly (Win64 build 2018-09-05 14:37) instead of Firefox 62.0, and ran the test again, with the same outcome.  I uploaded only the memory report with the MSN page open.  I can upload the baseline and after-page-close memory reports if needed.

Immediately after opening Firefox Nightly, with a newly-created Firefox profile, Task Manager showed Firefox memory usage was 165 MB.

After opening page "https://www.msn.com", Firefox memory usage started increasing.  At the time the memory report was saved (about 1.5 to 2 minutes after opening the page), Task Manager showed Firefox memory usage was 1.7 GB.

After closing page "https://www.msn.com", Task Manager showed Firefox memory usage was 376 MB.

I forgot to mention this before, but while the MSN page is loaded, Task Manager shows Firefox using a significant amount of CPU time (fluctuating from 10 to 40% CPU time, on a 4-core HyperThreaded Intel Core i7-3770K).  Firefox continues using CPU time like this until the MSN page is closed.

Firefox Nightly does not have the TAAR extension installed, so I assume testing version 62.0 with TAAR disabled will no longer be helpful, but let me know if you still want me to perform the test that way.
I performed the test using Firefox 62.0 in Safe Mode (so TAAR and all other extensions were disabled), and the outcome was the same.  The memory report has been attached.
I performed the test using Firefox Nightly (2018-09-05) in Safe Mode, and the outcome was the same.  The memory report has been attached.
Jon, we're seeing a ton of memory in a js realm for a detached window. Can you help take a look at this?

> 1,582.39 MB (100.0%) -- explicit
> ├──1,272.72 MB (80.43%) -- window-objects
> │  ├────691.32 MB (43.69%) -- top(none)/detached
> │  │    ├──643.59 MB (40.67%) -- window(https://www.msn.com/)
> │  │    │  ├──634.09 MB (40.07%) -- js-realm(https://www.msn.com/, about:blank)
> │  │    │  │  ├──270.67 MB (17.11%) -- baseline
> │  │    │  │  │  ├──212.41 MB (13.42%) ── fallback-stubs [357]
> │  │    │  │  │  └───58.26 MB (03.68%) ── data [353]
> │  │    │  │  ├──224.91 MB (14.21%) -- classes
> │  │    │  │  │  ├──148.31 MB (09.37%) -- class(Function)/objects
> │  │    │  │  │  │  ├──144.30 MB (09.12%) ── gc-heap [453]
> │  │    │  │  │  │  └────4.01 MB (00.25%) ── malloc-heap/slots [453]
> │  │    │  │  │  ├───39.24 MB (02.48%) ++ (5 tiny)
> │  │    │  │  │  └───37.37 MB (02.36%) -- class(Object)/objects
> │  │    │  │  │      ├──25.44 MB (01.61%) ── gc-heap [259]
> │  │    │  │  │      └──11.93 MB (00.75%) ++ malloc-heap
> │  │    │  │  ├───59.47 MB (03.76%) -- type-inference
> │  │    │  │  │   ├──53.95 MB (03.41%) ── type-scripts [361]
> │  │    │  │  │   └───5.52 MB (00.35%) ── allocation-site-tables [314]
> │  │    │  │  ├───54.56 MB (03.45%) -- scripts
> │  │    │  │  │   ├──36.34 MB (02.30%) ── gc-heap [341]
> │  │    │  │  │   └──18.22 MB (01.15%) ── malloc-heap/data [327]
> │  │    │  │  └───24.49 MB (01.55%) ++ (5 tiny)
> │  │    │  └────9.50 MB (00.60%) ++ (5 tiny)
Flags: needinfo?(erahm) → needinfo?(jcoppeard)
Whiteboard: [MemShrink] → [MemShrink:P2]
Do we have a good enough idea of a startup component where this issue might belong based on the current investigation, in order to move it out of untriaged? (Core :: Javascript Engine ?)
Flags: needinfo?(mconley)
Flags: needinfo?(erahm)
Lets go with JS engine for now.
Component: Untriaged → JavaScript Engine
Flags: needinfo?(mconley)
Flags: needinfo?(erahm)
Product: Firefox → Core

Reporter, Does this still reproduce using a current version?

Flags: needinfo?(chris)

This is still an issue in 2021 with the latest 64-bit browser, firefox process alone (not counting plugin-container processes) uses 2.4GB of memory and growing.

I'm not seeing this high memory use (or high CPU use) on current versions of Firefox.

Flags: needinfo?(jcoppeard)

Chris, do you still have crashes?

Whiteboard: [MemShrink:P2] → [closeme 2021-12-01][MemShrink:P2]

(In reply to Wayne Mery (:wsmwk) from comment #23)

Chris, do you still have crashes?

I haven't had any crashes lately, but Firefox does still use an extremely excessive amount of memory. I routine have Firefox using over 12 GB of memory (according to Windows' Task Manager) when Firefox's Task Manager shows memory usage less than 1 GB. It is obvious that that 1) Firefox's Task Manager doesn't show everything, and 2) there are massive memory leaks in Firefox and/or Firefox does not always release memory when a tab or window is closed.

If there are any troubleshooting steps I can take to provide more information, let me know because I'd really like to see this issue resolved.

Flags: needinfo?(chris)

(In reply to Chris Cloutier from comment #0)

...
Actual results:

On both computers, once the "https://www.msn.com" page is loaded, the
Firefox.exe processes allocate memory non-stop (usually with 15-35% CPU
usage) until all memory is used, eventually crashing the computer.

Expected results:

Firefox should have loaded the page and kept running with minimal memory
usage.

I am not able to reproduce using msn on Windows 10, Firefox 94. ditto Macbook Air.

Are you still able to reproduce with just this baseline URL? Or is the problem using that specific example long gone?

(In reply to Chris Cloutier from comment #24)

(In reply to Wayne Mery (:wsmwk) from comment #23)

Chris, do you still have crashes?

I haven't had any crashes lately, but Firefox does still use an extremely excessive amount of memory. I routine have Firefox using over 12 GB of memory (according to Windows' Task Manager) when Firefox's Task Manager shows memory usage less than 1 GB. It is obvious that that 1) Firefox's Task Manager doesn't show everything, and 2) there are massive memory leaks in Firefox and/or Firefox does not always release memory when a tab or window is closed.

Do you mean about:performance?
Is this without addons?
How many tabs concurrent?
How many tabs opened and closed in a day? 50? 100?
With which AV software(s) running on Windows?

If there are any troubleshooting steps I can take to provide more information, let me know because I'd really like to see this issue resolved.

I have systems with 240 tabs using 1.5gb (windows 8gb), 500 tabs (macbook air 8gb) and 2000 tabs (macbook pro 16gb), with browser running many days, and don't see the issue you describe. Once in a great while, one tab might go rogue.

Flags: needinfo?(chris)
Summary: Excessive memory use, memory leak, crash → Excessive memory use, memory leak
Whiteboard: [closeme 2021-12-01][MemShrink:P2] → [MemShrink:P2]

(In reply to Wayne Mery (:wsmwk) from comment #25)

Using msn.com as my example was really a fluke; I visited that website only when setting up Firefox on new systems. The only websites I visit on a daily basis are the following (I may visit other sites occasionally, but not frequently):

www.gog.com
www.greenmangaming.com
www.humblebundle.com
store.steampowered.com
steamdb.info
isthereanydeal.com
www.fanatical.com
www.bandcamp.com
groupees.com
www.youtube.com

Regarding Firefox's Task Manager, yes, it is the about:performance page. I didn't know about "about:performance" until you asked; I access it via Firefox's "More tools" menu.

I currently have the following add-ons installed, but have experienced this issue for a long time, before most of these were installed:

Adblocker Ultimate
Don't Accept image/webp
Easy Youtube Video Downloader Express
Fanatical Assistant
Printable - The Print Doctor
Purchase alternatives in Steam Store
SteamChecker
SteamDB
Tab Mover
Video DownloadHelper

In a typical day, I open and close probably 50 or fewer tabs.

For antivirus, I use Avast (free version).

One thing I should mention is that there are times when I leave Firefox open for several days. Usually in those cases, there are between 1 and 6 tabs open overnight. I should also say that the problem seems to get worse the longer Firefox is kept open (especially open for multiple days), which is why I suspect a memory leak.

I should also note that a few months ago, I created a new Firefox profile, imported the bookmarks from my original profile, and installed the above add-ons. I did that to see if it was something in my profile that was causing the issue, but it made no difference.

I'll do some testing over the next few days and see if I can replicate the issue on a new VM with a fresh Firefox install with no add-ons.

Flags: needinfo?(chris)
Severity: normal → S3
Priority: -- → P3

I haven't had as much time as I'd like to do testing, so I haven't been able to test/replicate the obscenely-excessive memory issue (using over 12 GB), but I have been able to replicate what I consider to be excessive memory consumption as well as the massive difference between the memory actually used (reported by the Windows Task Manager) and the memory Firefox reports on its Task Manager ("about:performance" page).

-- Setup --
New VMware Player virtual machine
4 virtual processors
8 GB memory
100 GB HDD
Windows 10 Pro 64-bit, 21H1, all Windows Updates installed
Windows Defender is the only antivirus/antimalware installed
Firefox 94.0.1 64-bit with no add-ons
Firefox was closed and re-opened before the start of each test

-- Column Definitions --
In the tests below, column "WTM (MB)" is the memory amount, in MB, reported by Windows Task Manager (the "Processes" tab's "Memory" value for the Firefox process).
In the tests below, column "FFTM (MB)" is the sum, in MB, of the memory amounts reported by Firefox's Task Manager (Menu > More tools > Task Manager, as well as URL "about:performance").

-- Test 1 --
Open Firefox, open the Task Manager tab, and then open 240 new tabs. No home page is set, so the new tab page is the default Firefox page (suggested sites).

WTM (MB) __ FFTM (MB) __ Description
260.3 MB __ 15.8 MB __ Memory reported after opening the Task Manager tab
639.7 MB __ 187.2 MB __ Memory reported after opening 40 tabs
952.2 MB __ 196.4 MB __ Memory reported after opening 40 more tabs (80 total)
1256.8 MB __ 254.2 MB __ Memory reported after opening 40 more tabs (120 total)
1536.2 MB __ 321.3 MB __ Memory reported after opening 40 more tabs (160 total)
1860.4 MB __ 1229.1 MB __ Memory reported after opening 40 more tabs (200 total)
2205.2 MB __ 444.5 MB __ Memory reported after opening 40 more tabs (240 total)

NOTE: FFTM (MB) value 1229.1 MB after opening 200 total tabs is NOT a typographical error. I have no idea why Firefox's Task Manager reported 321.3 MB used after loading 160 tabs, then 1229.1 MB used after loading 200 tabs, and then down to 444.5 MB used after loading 240 tabs, but that's what it showed.

-- Test 2 --
Open Firefox, open the Task Manager tab, and then open 240 new tabs to URL "https://www.inhcomputers.com/". That URL is a blank page containing only the html, body, /body, and /html tags.

WTM (MB) __ FFTM (MB) __ Description
241.9 MB __ 16.7 MB __ Memory reported after opening the Task Manager tab
392.2 MB __ 23.6 MB __ Memory reported after opening 40 tabs
483.3 MB __ 33.2 MB __ Memory reported after opening 40 more tabs (80 total)
541.3 MB __ 51.8 MB __ Memory reported after opening 40 more tabs (120 total)
572.0 MB __ 53.3 MB __ Memory reported after opening 40 more tabs (160 total)
594.2 MB __ 56.6 MB __ Memory reported after opening 40 more tabs (200 total)
621.6 MB __ 56.6 MB __ Memory reported after opening 40 more tabs (240 total)

-- Test 3 --
Open Firefox, open the Task Manager tab, open a new tab to URL "https://store.steampowered.com/search/?sort_by=Released_DESC&specials=1", scroll to the end of the page, and then open the first 100 listed games in new tabs.

NOTE 1: The Steam search page is dynamic, loading additional results once the "end" of the page is reached, so the page grows as you scroll down.

NOTE 2: The number of games on sale will vary, especially during heavy sale times like Black Friday, so the memory used when scrolling to the end of the page is expected to change.

WTM (MB) __ FFTM (MB) __ Description
254.5 MB __ 16.9 MB __ Memory reported after opening the Task Manager tab
318.9 MB __ 26.0 MB __ Memory reported after opening the "/search" URL
637.1 MB __ 181.5 MB __ Memory reported after scrolling to the end of the page
1314.5 MB __ 378.5 MB __ Memory reported after opening the first 20 games on the page
2145.5 MB __ 743.8 MB __ Memory reported after opening the next 20 games (40 total)
2903.0 MB __ 1659.9 MB __ Memory reported after opening the next 20 games (60 total)
3543.1 MB __ 2299.3 MB __ Memory reported after opening the next 20 games (80 total)
4069.1 MB __ 2868.1 MB __ Memory reported after opening the next 20 games (100 total)

-- Test 4 --
Open Firefox, open the Task Manager tab, open a new tab to URL "https://www.youtube.com/watch?v=094y1Z2wpJg", and then scroll down through the comments.

NOTE: Youtube pages are dynamic, loading additional comments once the "end" of the page is reached, so the page grows as you scroll down.

WTM (MB) __ FFTM (MB) __ Description
261.9 MB __ 15.8 MB __ Memory reported after opening the Task Manager tab
453.6 MB __ 53.0 MB __ Memory reported after opening a new tab to the specified URL
534.6 MB __ 86.1 MB __ Memory reported after pressing [PGDN] 10 times to scroll through 10 pages of comments
613.5 MB __ 107.2 MB __ Memory reported after pressing [PGDN] 10 more times (20 pages of comments total)
696.1 MB __ 121.0 MB __ Memory reported after pressing [PGDN] 10 more times (30 pages of comments total)
716.3 MB __ 134.4 MB __ Memory reported after pressing [PGDN] 10 more times (40 pages of comments total)
766.5 MB __ 148.1 MB __ Memory reported after pressing [PGDN] 10 more times (50 pages of comments total)
849.9 MB __ 161.4 MB __ Memory reported after pressing [PGDN] 10 more times (60 pages of comments total)
865.5 MB __ 174.9 MB __ Memory reported after pressing [PGDN] 10 more times (70 pages of comments total)
928.3 MB __ 192.1 MB __ Memory reported after pressing [PGDN] 10 more times (80 pages of comments total)
1014.7 MB __ 205.3 MB __ Memory reported after pressing [PGDN] 10 more times (90 pages of comments total)
1043.7 MB __ 223.1 MB __ Memory reported after pressing [PGDN] 10 more times (100 pages of comments total)

-- Test 5 --
Open Firefox, open the Task Manager tab, and then open 10 new tabs, one to each of the URLs listed below. The videos were not played and the pages were not scrolled.

New tab 1: https://www.youtube.com/watch?v=81Zq0dw-6RE&list=PLn0J50xT9_253AfOpmpzG6jUqSEokQBBS
New tab 2: https://www.youtube.com/watch?v=XkI8rLhYfzk&list=OLAK5uy_kE4Gx9wjF8-kborvkclYRVO_YRZkqOp5Q
New tab 3: https://www.youtube.com/watch?v=VPiaZ_y_2TU&list=OLAK5uy_mmVIDpJG_Qz3VSh1tlXZRzIOoNdlt_qRU
New tab 4: https://www.youtube.com/watch?v=wb5rPMgKLhA&list=PLxyPT8_piocqjM9juHjilogaeatMNCB7Y
New tab 5: https://www.youtube.com/watch?v=5Y_8kGjZcRo&list=OLAK5uy_nvyM4nAhmjnuhUfCzsJ5G_9L--YEaaxxI
New tab 6: https://www.youtube.com/watch?v=YoLQ7j5cVvQ
New tab 7: https://www.youtube.com/watch?v=kfo1G8EjqB8
New tab 8: https://www.youtube.com/watch?v=8nCodRyCLIA
New tab 9: https://www.youtube.com/watch?v=aEjZswYhBLw
New tab 10: https://www.youtube.com/watch?v=5J4JIqZ9mRs

WTM (MB) __ FFTM (MB) __ Description
260.1 MB __ 15.8 MB __ Memory reported after opening the Task Manager tab
426.1 MB __ 46.8 MB __ Memory reported after opening new tab 1 to the specified URL
545.7 MB __ 84.4 MB __ Memory reported after opening new tab 2 to the specified URL
682.9 MB __ 118.2 MB __ Memory reported after opening new tab 3 to the specified URL
787.5 MB __ 156.9 MB __ Memory reported after opening new tab 4 to the specified URL
919.3 MB __ 191.5 MB __ Memory reported after opening new tab 5 to the specified URL
1099.5 MB __ 233.7 MB __ Memory reported after opening new tab 6 to the specified URL
1208.9 MB __ 272.1 MB __ Memory reported after opening new tab 7 to the specified URL
1329.5 MB __ 308.2 MB __ Memory reported after opening new tab 8 to the specified URL
1233.7 MB __ 355.4 MB __ Memory reported after opening new tab 9 to the specified URL
1324.3 MB __ 402.4 MB __ Memory reported after opening new tab 10 to the specified URL

-- Conclusion --
As you can see in these results, there appears to be excessive memory usage whenever there is dynamically-loaded content which increases the page size as well as excessive memory usage on Youtube pages in general. As mentioned above, this is by no means an exhaustive test; it is only what I could perform with the time I had available.

On my live system (the one which routinely experiences excessive memory issues), Firefox is currently using 4.5 GB to 5 GB (depending on which measurement you use) to display only one tab -- the Firefox Task Manager. I have had Firefox open for several days, with about 10 Youtube pages open, 6-10 Unity Asset Store pages open, and one Steam search page open. Throughout each of those days, I have also opened and closed 10-15 Youtube pages (closed after watching the videos), one or two Steam search pages, about 50 Steam product pages, and probably 30 various other pages.

To try to reclaim the memory Firefox had been using, I opened the Firefox Task Manager and then closed all other windows and tabs so the only tab open was the Task Manager. I then opened Windows Task Manager and took a screenshot (attachment "2021-11-23 Live - Screenshot of memory usage.jpg"), in which Firefox shows the memory usage as only 276.78 MB, but Windows Task Manager shows the memory usage as 4.5 GB to 5 GB.

I then opened URL "about:memory" (re-using the Task Manager tab), measured and saved the memory report (attachment "2021-11-23 Live - Memory-report.json.gz"), and then measured and printed the memory report (attachment "2021-11-23 Live - Memory report.pdf").

If I'm reading that memory report correctly, it appears that one of the extensions (URL "moz-extension://3bfd410c-ab3f-4210-a3c0-55465ee1b9c6", extension "Video DownloadHelper") has 1,691.17 MB allocated in the "extension" process (pid 353428), so there's clearly something wrong with that extension. However, there's also clearly something wrong with Firefox itself since the Main Process (pid 340740) has 1,715.67 MB allocated when the only tab open is "about:memory". Similarly, to my layman mind, 547.61 MB seems like a lot to be allocated to the GPU process (pid 359528).

(In reply to Chris Cloutier from comment #28)
Thank you for testing and posting this information.

If I'm reading that memory report correctly, it appears that one of the extensions (URL "moz-extension://3bfd410c-ab3f-4210-a3c0-55465ee1b9c6", extension "Video DownloadHelper") has 1,691.17 MB allocated in the "extension" process (pid 353428)

It does seem this extension has a bug and is leaking memory. It is possible for something like that to cause leaks in other parts of the browser too. Can you test with all add-ons disabled?

To confirm the extension was part of the problem, I disabled all add-ons. Once I did that, the overall memory usage decreased. However, the Main Process is still using 1,706.97 MB and the GPU process is still using 525.27 MB (according to the about:memory page) while the Firefox Task Manager (about:performance page) still shows the memory used is only 276 MB total.

I can do without the Video DownloadHelper add-on (the one which was part of the problem), but I can't disable all of them, especially right now as we're approaching a big time for sales and holiday shopping here in the U.S. and the add-ons make things a lot easier.

I just got a notification that an update is available for Firefox, so I'll re-enable my add-ons except for Video DownloadHelper and then update and restart Firefox. It usually takes a few days before I start to notice the issue, so I'll use it normally and report back in a few days.

Having said that, I want to point out that my tests in comment 27 were not from this computer; they were from a virtual machine I created specifically to test this issue. I'll do additional testing with that VM as well and report my findings in a few days.

(In reply to Chris Cloutier from comment #33)
Great, thanks for the update. Do post the about:memory reports for your tests if you can as that really helps to narrow down the issue.

I did some testing this week using base Firefox 94.0.2 64-bit (no add-ons) on my test VM. It wasn't anything too intensive, but it was a sample of my real-world activity which most likely would have resulted in at least some memory leak on my production computer. In these tests, I did not notice any memory leak, but I do still consider the memory usage to be somewhat excessive. Additionally, you can see in the results that the memory usage reported by Firefox's Task Manager ("about:performance" page) is vastly different than the amount reported by Windows Task Manager and the amount reported by Firefox's about:memory page.

Attachment file "Firefox memory usage testing 2021-11-23 - Outline" is a PDF outlining the setup, the tests performed, and the memory usage reported by Windows Task Manager and Firefox's Task Manager. Attachment files "Firefox memory usage testing 2021-11-23 - Tests 1-20", "Firefox memory usage testing 2021-11-23 - Tests 31-40", and "Firefox memory usage testing 2021-11-23 - Tests 41-60" are ZIP files containing the results of the tests. For each test, there is a PDF copy of the Firefox Task Manager page and a .json.gz measurement file from the about:memory page.

You can see in tests 1 through 11 that simply opening 10 Youtube pages (without playing the videos) causes Firefox to consume about 1318 MB, which seems to be quite excessive.

You can see in tests 17 through 30 that opening 20 Steam store pages consumes about 1200 MB and then opening another 20 Steam store pages consumes an additional 450 MB.

You can see in tests 31 through 43 that scrolling down the Steam search page to scroll through 500 pages/screens of results consumes 566 MB.

Lastly, you can see in tests 44 through 60 that scrolling down a Youtube video page to scroll through 300 pages/screens of comments consumes 1304 MB.

I'd also like to point out that on the Steam search page and on the Youtube page, after you have been scrolling for a while, Firefox takes considerably longer time and considerably more CPU power (up to 30% CPU usage or more) to retrieve and display the next group of results.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: