Closed Bug 1663087 Opened 4 years ago Closed 4 years ago

High ram usage that just continues to rise the longer it is open

Categories

(Core :: Performance, defect)

80 Branch
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: per-christian, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: memory-footprint)

Attachments

(4 files)

Attached file memory-report.json.gz (deleted) β€”

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0

Steps to reproduce:

Have tabs open such as twitch and messenger etc

Actual results:

Ram keeps increasing the longer it is open reaching up to 15gb

Expected results:

it should not use 15GB ram with 15 tabs open.

Hi Christian,

It would help us a lot if you could reproduce this issue on our latest Nightly build, it can be downloaded from here: https://nightly.mozilla.org/
Then capture a performance profile using the Cleopatra add-on. You can get more info on how to install and use the Cleopatra add-on (that helps you get the performance profile) by going to:

https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Profiling_with_the_Built-in_Profiler
https://perf-html.io/
Please also note that this add-on works only on FF Nightly, so that means you need to be able to reproduce the issue on Nightly first.

Thanks in advance.
Clara

Flags: needinfo?(per-christian)

(In reply to Clara Guerrero from comment #1)

Hi Christian,

It would help us a lot if you could reproduce this issue on our latest Nightly build, it can be downloaded from here: https://nightly.mozilla.org/
Then capture a performance profile using the Cleopatra add-on. You can get more info on how to install and use the Cleopatra add-on (that helps you get the performance profile) by going to:

https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Profiling_with_the_Built-in_Profiler
https://perf-html.io/
Please also note that this add-on works only on FF Nightly, so that means you need to be able to reproduce the issue on Nightly first.

Thanks in advance.
Clara
Where do i post the link? :) i did publish it but without any of the "additional data that may be identifiable "

Flags: needinfo?(per-christian)

You can post the profile here so that the dev team can get involved.

After how much time do you notice RAM increasing? minutes? hours? Please also include your about:support information and copy it here.

Thanks!
Clara

Flags: needinfo?(per-christian)

I do experience the same issue with v. 80.0.1 x64.
Usually it starts right after booting up my computer and by using firefox for a few minutes.

At first i thought the behaviour was caused by the container addons (facebook container and Firefox multi-account containers). However i disabled them and still had this issue. The browser starts to get sluggish seen to user interactions, such as clicks and loading content. Scrolling already loaded pages works without any issue.

My "use-case" is mass-opening ~20ish tabs by middle-mouse button clicking folders in my favourites. I have been doing this exact same thing for years and never had RAM issues like this. I do understand that opening that many tabs at one time should allocate a lot of RAM but not upwards 15GB.

Is there any logging or similar I could enable to get Firefox to log useful data, that could be submitted to you for further investigation?

Attached file about: Support information (deleted) β€”

https://profiler.firefox.com/public/0p99sf9m485hnmenccdvvnmms2w9nbcgab1c4x8/calltree/?globalTrackOrder=0-1-2&localTrackOrderByPid=23408-1-2-0~13252-0-1~7212-1-0~&thread=2&v=5

The ram increase over hours to way to high.

Been using nightly lately and it is not that bad with Nightly but still uses way to high.. upwards of 6gb with nothing more than 10-20 tabs and reading reddit and watching twitch.

i'm not the best with giving info.

Flags: needinfo?(per-christian)
Attached image Taskmgr_dmKV1RFdSg.png (deleted) β€”

This was september 3rd on normal Firefox

Thanks Christian for the additional information.

Setting a component for this in order to get the dev team involved.
If you feel it's an incorrect one please feel free to change it to a more appropriate one.

Best regards,

Clara

Component: Untriaged → Performance
Product: Firefox → Core

Hi per-christian, the profile is useful, it shows a bunch of GCs in there, however, we need more information.

Can you collect another profile with all threads collected?

Thanks

Flags: needinfo?(per-christian)

(In reply to Sean Feng [:sefeng] from comment #9)

Hi per-christian, the profile is useful, it shows a bunch of GCs in there, however, we need more information.

Can you collect another profile with all threads collected?

Thanks

https://share.firefox.dev/3mRC2GJ

Is this correct? i checked everything that said threads.

i'm sorry if it is wrong.

Flags: needinfo?(per-christian)

Thank you! I should have asked for a memory report along with the new profile, so that we can compare, but this is good for now.

So the profile does indicate that the memory usage is keep increasing for twitch and reddit, but it's not clear why.

I looked the memory report in the description again, the memory usage for the tabs that belong to twitch and reddit seems fine. However the memory usage for web (pid 22844) seems a bit off. There's a 640.12 MB (32.96%) -- ghost/window(https://www.messenger.com/t/1444021632585868), ghost windows are bad IIRC.

Andrew, is my above reading correct? Does ghost window indicate a leak?

Flags: needinfo?(continuation)

Yes, ghost windows indicate a leak. Other than the ghost window, the memory usage in the report doesn't look super high. There are a few hundred MB of strings in that process, which seems like a lot.

Flags: needinfo?(continuation)
Attached file memory-report.json.gz (deleted) β€”

(In reply to Sean Feng [:sefeng] from comment #11)

Thank you! I should have asked for a memory report along with the new profile, so that we can compare, but this is good for now.

https://share.firefox.dev/331GydS

Put up memeory report and a new profile, Hope that helps.. usage was a bit higher now,
and i feel like the ram increase the more i scroll on reddit or watch twitch with chat open.

Thanks!

Post what Andrew said on Matrix for possible next steps

mccr8: ghost windows are basically always a browser bug. It means we closed the tab, but the web page didn't go away.
mccr8: The strings sometimes show up in the about:memory report but not always. That might just be a red herring, however.
mccr8: if somebody can come up with steps to reproduce it, then I can do some logging to try to figure out what is causing the leak.

per-christian, is there any way you could boil down the steps to reproduce to very concrete steps? Something like

  • Load https://a-very-specific-url.com
  • Leave the browser open for 1 hour / Do some very specific thing for 1 hour
  • Notice RAM usage increases throughout, and does not seem to stop

Given that you likely doing many different things while this is occurring for you, it's hard for us to pinpoint something which will let us reproduce this.

Flags: needinfo?(per-christian)

The two basic reasons for a ghost window are either some bad interaction with an addon, or with a specific website. We recently fixed an issue (in Nightly) that affected people who are using the Disconnect addon. I don't see that in the list here but that patch could have fixed the issue, so it would be nice to know if it is still happening with more recent builds.

That leak fix also went into Firefox 81.0.1 which shipped today, so updating to the latest release version should suffice for testing too.

I tested this on 81.01 and can still reproduce the high ram usage.
I'm opening about 30 tabs in a manner of seconds while having about 10 tabs open in another firefox window.
The ram usage slowly grows to about 6GB which should be normal for the amount of tabs, but as I go through them checking for news and closing them 1 by 1 the ram keeps on allocating up to 14GB.

After closing the 30 tabs the RAM usage remains high for a couple of minutes, prior to 81.01 Twitch or Youtube media streams would go unresponsive for a bit but recover without errors. That unresponsiveness doesn't seem to occur anymore.

Also I would like to add that I've been opening the same 30 tabs for the past 4 years on a daily basis and never had this ram issues before recently.

(In reply to Chris from comment #19)

I tested this on 81.01 and can still reproduce the high ram usage.

Could you please file your own issue in Core: Performance and needinfo me on it? It might be the same as this one or it might be different, but mixing the reports from multiple people together can be confusing. Thanks. You'll need to attach your about:support and an about:memory report (with anonymize checked if you want) to the bug for us to have any chance to diagnose what you are seeing.

Flags: needinfo?(m4g027)

Also: the most common cause of growing memory use over time (especially without interacting with the page) is a website bug (by far the most common). Just because you've been doing it for years doesn't mean there isn't a bug now; sites change all the time (and the stuff they pull in, and their ads, etc). Close 1/2 the tabs and see if the leak stops. If not, repeat. If it stops, reopen them and close the other 1/2. Repeat until you find the site that's causing the problem. That's the most important way to find the problem if it's not immediately obvious in a memory report. I've seen sites (scientific american at one point) leak 500MB/minute. A clickfraud vendor was leaking GB on a gazillion sites if you left them open for a day or two. etc.

And: it's quite possible one of these sites has a bug that leaks objects only on firefox.

Thanks!!

per-christian: Can you verify that this issue still exists in the latest nightly build?

(In reply to Kim Moir [:kmoir] ET from comment #22)

per-christian: Can you verify that this issue still exists in the latest nightly build?

Somehow have a weird thing happening now when looking at it in task manager
https://i.imgur.com/XSTy5kp.png
it happens over time.. same as ram used to do. and all of them together have quite the ram usage.
I only have 2 windows open with 15-20 tabs in total.

When i close and start up firefox it only shows as 1 even with many tabs and windows, this happened sometime after this bug report.

somehow the emails from this ended up in spam folder.. so did not see the one from a bit over a week ago.

Flags: needinfo?(per-christian)

per-christian, could you add the Command Line column to your Task Manager view and see what it shows for those firefox processes outside of the main Firefox dropdown? It's a bit surprising to see those there.

Flags: needinfo?(per-christian)

(In reply to Doug Thayer [:dthayer] (he/him) from comment #24)

per-christian, could you add the Command Line column to your Task Manager view and see what it shows for those firefox processes outside of the main Firefox dropdown? It's a bit surprising to see those there.

The issue is more or less resolved in one of the updates after my post, Firefox no longer end up using that much ram over few hours now... even with many tabs such as twitch,
I guess it is fixed for now?
is it possible to close this bug and eventually open it if the issue comes back with a another update?

Flags: needinfo?(per-christian)

Yup - marking as WORKSFORME - feel free to reopen if it comes back!

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
Flags: needinfo?(m4g027)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: