Closed Bug 1636196 Opened 4 years ago Closed 4 years ago

memory leak when opening about:preferences

Categories

(Firefox :: Settings UI, defect, P1)

77 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 1642415
Tracking Status
firefox76 --- wontfix
firefox77 --- wontfix
firefox78 --- wontfix

People

(Reporter: raphael-kriegl, Unassigned)

Details

Attachments

(3 files)

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

Steps to reproduce:

Open the about:preferences page.

Actual results:

Firefox loads the search bar and side bar of the page but not the content.
Firefox immediately starts allocating memory at about 400MB/s until RAM is full while becoming increasingly unresponsive to user input. Closing the offending tab does not stop this.

Then computer starts swapping with 100% drive usage and locks it up completely.

When RAM is full, the working set of the process goes down to ~700MB but the private bytes don't.

Firefox needs to be stopped in task manager and restarted in safe mode to close the page again.

Expected results:

Opening the page should just display the settings and nothing else.

I ran the profiler: https://perfht.ml/3c8TXTE
I can't run an about:memory report, because Firefox becomes unresponsive

What I tried:
Start Firefox in safe mode: Fixes issue
Disable all Add-ons: does not fix issue
Delete prefs.js: does not fix issue
Delete cookies, history etc: does not fix
Start with new profile: does fix issue

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Preferences

Can you attach a copy of your about:support information?

Do you know if this problem started recently, ie with a specific beta/devedition update?

Severity: normal → S1
Flags: needinfo?(raphael-kriegl)
Priority: -- → P1
See Also: → 1636067

It either began after the beta 77.0 update or after I changed the number of content processes from -1 to 8. (Changing it back did not fix the problem)
Both happened shortly before I noticed the issue

Flags: needinfo?(raphael-kriegl)

When about:preferences is loaded, if you open the DevTools Console (ctrl-shift-k) or browser console (ctrl-shift-j), do you see any warnings mentioning [fluent] ? Can you copy and paste them here if you have any?

(In reply to Francesco Lodolo [:flod] from comment #7)

When about:preferences is loaded, if you open the DevTools Console (ctrl-shift-k) or browser console (ctrl-shift-j), do you see any warnings mentioning [fluent] ? Can you copy and paste them here if you have any?

I can't open the console, browser freezes immediately after opening the tab

So the safe mode vs disabling all add-ons thing is strange, and I wonder if it's related to something in the JS engine. If you flip all of the following prefs to false in about:config, and restart, does the problem still happen:

javascript.options.native_regexp
javascript.options.blinterp
javascript.options.baselinejit
javascript.options.ion
javascript.options.jit_trustedprincipals

If disabling all of those does not make the problem go away, can you try gathering another profile with those settings, so we get better stack information?

If it does help, can you try re-enabling them one by one (starting from the top of the list), and restarting after each pref change, and seeing which of them triggers the problem?

Flags: needinfo?(raphael-kriegl)
   javascript.options.jit_trustedprincipals

Note that this option will need to be created (as a boolean pref, with value false initially; you can remove it afterwards)

Ok, so I set all those settings to false and it kind of slowed the memory allocation but did not fix the freezing.
What also happened: when I start FF after a leak test, the startup takes longer than usual. while showing a white canvas and only a single window, FF allocates memory and has a CPU usage of ~30%, after some time, the startup finishes, my session restores and the allocated memory drops by about 2GB.
With these settings modified, this startup takes ~30s, because apparently it allocates a certain amount of memory (2.7GB), which now takes longer, before launching completely.
I tried to use the profiles, but this does not happen when i start the process with startup profiling from the CMD.

Also could you elaborate on this:

If disabling all of those does not make the problem go away, can you try gathering another profile with those settings, so we get better stack information?

Do you mean to start a fresh profile and then applying my current settings, add-ons, etc. , to try and reproduce the issue?

Flags: needinfo?(raphael-kriegl)

(In reply to Raphael from comment #11)

If disabling all of those does not make the problem go away, can you try gathering another profile with those settings, so we get better stack information?

Do you mean to start a fresh profile and then applying my current settings, add-ons, etc. , to try and reproduce the issue?

No, I meant that you created a performance profile in comment #1; if you created one with the JIT disabled, it would be easier to read. But it sounds like that's not feasible.

We're a little lost as to what's causing this - see also the discussion in the related bug, bug 1636067. So far none of us are able to reproduce, but at least one other user has the same problem - so clearly we are missing something that is tripping this issue, it's just not clear what that would be...

Do you recall how you set up your Firefox install? Did you download a British English one and install a German language pack, or the other way around, or something else still?

Flags: needinfo?(raphael-kriegl)

I think I downloaded the German version from mozilla.org a long time ago, then I switched the update channel to beta at version 40 something.
I installed the english language pack afterwards.

I tried running the profiler again, but i cannot finish the capture bc the browser hangs, the shutdown capture option also does not work, bc its not shutting down properly.

Flags: needinfo?(raphael-kriegl)

I had some time, so I ran some more profiles:
Startup with jit enabled: https://perfht.ml/3buCwvF
about:preferences and Shutdown with jit disabled: https://perfht.ml/3bxRYqM
about:preferences and Shutdown with jit enabled: https://perfht.ml/2LoeV5k

Maybe this is nothing, but in the about:support it lists Amazon, Bing and eBay as activated extensions, even though i removed those search engines in the about:preferences tab and they're not showing under about:addons either

I just noticed, that the issue also occurs when leaving the fullscreen mode of a (youtube) video

See Also: → 1635753

S1 or S2 bugs needs an assignee - could you find someone for this bug?

Flags: needinfo?(jaws)

Gijs, is this still accurately marked as an S1?

Flags: needinfo?(gijskruitbosch+bugs)

Uh, I lost track that we have another one of these bugs.

I was finally able to replicate the memory issue/browser lock in bug 1642415. From what I understand, this happens when the user has outdated/incompatible language packs, which should be an edge case (but we don't have telemetry for…).

@raphael
Are you still on the beta channel, i.e. 79? Can you attach here your about:support raw data again? We added add-ons information in 79, and that covers language packs.

If you're on 78, can you check the version of the language packs you have installed in about:addons, Languages pane?

Flags: needinfo?(raphael-kriegl)

I think S1 is accurate, but we might dupe this over to 1642415 if we can confirm it's the same issue.

Flags: needinfo?(jaws)
Flags: needinfo?(gijskruitbosch+bugs)
See Also: → 1642415
Attached file about:support

Note that this is from a profile backup from december 2019, because I already removed those packs in my default profile. I hope this is still helpful.

Flags: needinfo?(raphael-kriegl)

Thanks, it's helpful.

I see 3 language packs:

  • Deutsch (DE) Language Pack
  • English (GB) Language Pack
  • English (US) Language Pack

And they're all correctly disabled, since your version is 79.0b2, and those language packs are for 77.

Is it correct to assume that the profile doesn't have the memory issue at the moment?

Additional notes:

  • The language of the build was de, but there were language packs overriding both the language of the build (de) and the final fallback (en-US).
  • At the time (first about:support), the requested locales were de, then en-GB.

My suspicion is that we encounter issues during the fallback, if the fallback locale is incomplete. But I need someone who actually can debug the code to confirm it.

Is it correct to assume that the profile doesn't have the memory issue at the moment?
Yes.

We finally managed to track this down in bug 1642415 and are considering how to fix this more thoroughly there.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
See Also: 1636067
See Also: 1635753
See Also: 1642415
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: