Closed Bug 1786475 Opened 4 years ago Closed 3 years ago

Delay crashing processes on OOM based on the process type

Categories

(Core :: Memory Allocator, task)

Unspecified
Windows
task

Tracking

()

RESOLVED WONTFIX

People

(Reporter: gsvelto, Unassigned)

References

(Blocks 1 open bug)

Details

This is another experiment we'd like to run in order to improve our delaying logic to avoid catastrophic OOMs taking down Firefox' main process or being visible by the user.

There are processes which are not directly visible and which we can relatively safely crash:

  • Preallocated processes - these aren't doing anything and letting them crash would only slow down opening new tabs or navigating to new origins. We already crash them first on Linux when running out of memory (see bug 1771712). The problem with letting them crash when tight on memory is precisely that they're not supposed to do anything, so they're probably not even making memory allocations until they're started. Still worth keeping them in mind since they're the lowest hanging fruit we have.
  • The GPU process: this one is designed to crash and restart. It will flash the screen which is user-visible but it's not a big deal. It's also one of the processes committing most unused memory so reaping it might really help with OOMs (especially if we're dealing with a badly behaved GPU driver which is leaking memory, or just committing too much of it).

Existing telemetry indicates that processes other than main, content, and GPU account for around 0.2% of OOM crashes in total. Not stalling in them would have essentially no effect.

The GPU process is more complicated, but it's worth noting here that we (I?) no longer believe "unused memory" to be a significant source of OOM crashes — the available-memory discrepancy seems to be better explained by Windows having increased the page file's size between crash time and crash-report-creation time. (In the particular case of badly-behaved drivers, it likely would help; that may be worth further investigation.)

Agreed, let's drop this for now. Maybe we can come back to the GPU process when we find the time to figure out exactly where the commit space is going and how Windows is reacting to it (like how often it manages to resize the swap file). We could deploy some telemetry there but for the time being I feel we're fine.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.