Open Bug 1687173 Opened 4 years ago Updated 4 years ago

browser.tabs.unloadOnLowMemory = true still gets Firefox killed by earlyoom

Categories

(Firefox :: Tabbed Browser, defect)

78 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: kittens, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Steps to reproduce:

  1. Use a 16GiB desktop linux system with earlyoom and use firefox, and leave it running for days (via suspend) with moderate usage, 40-50 idle tabs with 1-2 active ones with Youtube, regular websites, etc.
  2. Set browser.tabs.unloadOnLowMemory to true
  3. Firefox will get shot down by earlyoom, always.

Actual results:

Firefox bloats up until it is killed by earlyoom

Expected results:

Actually unload tabs, otherwise what's the point? It is really not acceptable that on a 16GiB system with otherwise no really demanding programs running, Firefox will reliably die with moderate usage every 2-3 days. It seems like Firefox's memory handling is fundamentally not working.

I was not able to reproduce this issue. I will set components to have a starting point for this. Please feel free to route this ticket to the corresponding team, thanks!

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

earlyoom is very aggressive bu default, I expect unloadOnLowMemory is tuned for regular OOM.

Priority: -- → P3

I see it lives at browser/modules/TabUnloader.jsm although I'm not sure which component it that.

Component: Widget: Gtk → General
Product: Core → Firefox

(It looks like that file belongs to this component, so sending it over…)

Component: General → Tabbed Browser

earlyoom is very aggressive bu default, I expect unloadOnLowMemory is tuned for regular OOM.

Fwiw, that explains what I am seeing. Just as a note, regular OOM kicks in so late that often the entire system is effectively dead for complex desktop systems (that need more "headroom" to remain responsive), encouraging users to just do a hard reset. So I think tuning for that is not a good idea. I think it really should be tuned for something like earlyoom, which I would not describe as "very aggressive" but "working as expected". I have only ever had good experiences with it, other than Firefox apparently not being ready for sane OOM killer behavior.

The product::component has been changed since the backlog priority was decided, so we're resetting it.
For more information, please visit auto_nag documentation.

Priority: P3 → --

This happens to me pretty regularly still. If there is some "continuous ram usage probe" logging mode I could enable so somebody can see where things go over the days until it's killed to figure out the right thresholds, I would be interested in helping out with that. Please note reproducing this involves running Firefox for a few days though, so it shouldn't be something that spills out multiple hundred megabytes of logs per hour.

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