3

Frequent firefox crashes after upgrade to Ubuntu 22.04.

It looks that there is a memory leak. This is what I find in syslog:

May  5 14:08:18 xxx systemd-oomd[685]: Killed /user.slice/user-1000.slice/user@1000.service/app.slice/snap.firefox.firefox.c553b0b1-9931-4c5c-8e94-7f5bb31199a8.scope due to memory used (7727669248) / total (8280240128) and swap used (1934368768) / total (2147479552) being more than 90.00%

Is there a fix ?


Additional info:

$ LANG="en" free -h
               total        used        free      shared  buff/cache   available
Mem:           7.7Gi       4.6Gi       1.3Gi       120Mi       1.9Gi       2.8Gi
Swap:          2.0Gi       1.3Gi       749Mi

EDIT 1: memory usage of the firefox thread is slowly growing even when I'm not using it. It starts at 5.4%MEM and increases above 8% even when I do nothing. And then is "crashes".

EDIT 2: firefox was automatically upgraded to version 100, but the problem persist. Visual Studio Code was also terminated by systemd-oomd. Here are the log lines in syslog about the firefox termination:

May  5 17:44:56 xxx systemd-oomd[685]: Killed /user.slice/user-1000.slice/user@1000.service/app.slice/snap.firefox.firefox.f14473ec-b4cf-4b0f-8533-ef1e41302b4e.scope due to memory used (7814512640) / total (8280240128) and swap used (2032394240) / total (2147479552) being more than 90.00%
May  5 17:44:56 xxx systemd[3093]: snap.firefox.firefox.f14473ec-b4cf-4b0f-8533-ef1e41302b4e.scope: systemd-oomd killed 130 process(es) in this unit.
May  5 17:44:56 xxx systemd[3093]: snap.firefox.firefox.f14473ec-b4cf-4b0f-8533-ef1e41302b4e.scope: Consumed 2min 19.374s CPU time.

EDIT 3: according to this announcement, systemd-oomd requires that there is enough swap space to work properly. It may be that I don't have enough swap space because I upgraded and didn't do a fresh install. Is this the explanation ?

chmike
  • 1,014

1 Answers1

3

I finally added 32GB of RAM to my computer and now have 40GB. There are no more crashes and memory usage seam stable on the long run. On 40GB it uses only 5GB.

Before upgrading the memory I tried disabling systemd-oomd as suggested here and it worked well.

chmike
  • 1,014