Skip to content

earlyoom kills wrong processes first due to oom_score_adj #344

@vinc17fr

Description

@vinc17fr

I'm using earlyoom under Debian/unstable (upcoming Debian 13), mainly due to a bug in Firefox on YouTube, with the consequence that the associated firefox process suddenly takes more and more memory until OOM. This has happened again, where this process took more than 3 GB VmRSS memory. But earlyoom first killed other processes instead, in particular the important pipewire-pulse process:

Aug 04 23:41:26 qaa earlyoom[1308]: mem avail:  2051 of 20537 MiB ( 9.99%), swap free:    0 of  975 MiB ( 0.01%)
Aug 04 23:41:26 qaa earlyoom[1308]: low memory! at or below SIGTERM limits: mem 10.00%, swap 10.00%
Aug 04 23:41:26 qaa earlyoom[1308]: sending SIGTERM to process 1024668 uid 1000 "Web Content": oom_score 823, VmRSS 79 MiB, cmdline "/usr/lib/firefox/firefox -contentproc -isForBrowser -prefsHandle 0:44331 -prefMapHandle 1:283567 -jsInitHandle 2:242012 -parentBuildID 20250717180000 -sandboxReporter 3 -ipcHandle 4 -initialChannelId {af7f00c7-3771-49ed-8ae7-972b131e8b32} -parentPid 46 -"
Aug 04 23:41:26 qaa earlyoom[1308]: kill_release: pid=1024668: process_mrelease pidfd=4 success
Aug 04 23:41:26 qaa earlyoom[1308]: process 1024668 exited after 0.100 seconds
Aug 04 23:41:28 qaa earlyoom[1308]: mem avail:  2054 of 20543 MiB (10.00%), swap free:    0 of  975 MiB ( 0.01%)
Aug 04 23:41:28 qaa earlyoom[1308]: low memory! at or below SIGTERM limits: mem 10.00%, swap 10.00%
Aug 04 23:41:28 qaa earlyoom[1308]: sending SIGTERM to process 1026163 uid 1000 "Web Content": oom_score 823, VmRSS 79 MiB, cmdline "/usr/lib/firefox/firefox -contentproc -isForBrowser -prefsHandle 0:44331 -prefMapHandle 1:283567 -jsInitHandle 2:242012 -parentBuildID 20250717180000 -sandboxReporter 3 -ipcHandle 4 -initialChannelId {6c109649-b80d-4abc-8d7c-54085db3ad4e} -parentPid 46 -"
Aug 04 23:41:28 qaa earlyoom[1308]: kill_release: pid=1026163: process_mrelease pidfd=4 success
Aug 04 23:41:28 qaa earlyoom[1308]: process 1026163 exited after 0.100 seconds
Aug 04 23:41:28 qaa earlyoom[1308]: mem avail:  2034 of 20540 MiB ( 9.91%), swap free:    0 of  975 MiB ( 0.01%)
Aug 04 23:41:28 qaa earlyoom[1308]: low memory! at or below SIGTERM limits: mem 10.00%, swap 10.00%
Aug 04 23:41:28 qaa earlyoom[1308]: sending SIGTERM to process 1025338 uid 1000 "Web Content": oom_score 823, VmRSS 78 MiB, cmdline "/usr/lib/firefox/firefox -contentproc -isForBrowser -prefsHandle 0:44331 -prefMapHandle 1:283567 -jsInitHandle 2:242012 -parentBuildID 20250717180000 -sandboxReporter 3 -ipcHandle 4 -initialChannelId {95143ef1-8f9d-4a88-8da6-ee03ca80d612} -parentPid 46 -"
Aug 04 23:41:28 qaa earlyoom[1308]: kill_release: pid=1025338: process_mrelease pidfd=4 success
Aug 04 23:41:28 qaa earlyoom[1308]: process 1025338 exited after 0.100 seconds
Aug 04 23:41:28 qaa earlyoom[1308]: mem avail:  2036 of 20537 MiB ( 9.92%), swap free:    0 of  975 MiB ( 0.01%)
Aug 04 23:41:28 qaa earlyoom[1308]: low memory! at or below SIGTERM limits: mem 10.00%, swap 10.00%
Aug 04 23:41:28 qaa earlyoom[1308]: sending SIGTERM to process 2002 uid 1000 "pipewire-pulse": oom_score 800, VmRSS 40 MiB, cmdline "/usr/bin/pipewire-pulse"
Aug 04 23:41:28 qaa earlyoom[1308]: kill_release: pid=2002: process_mrelease pidfd=4 failed: Invalid argument
Aug 04 23:41:28 qaa systemd[1981]: pipewire-pulse.service: Consumed 17min 43.690s CPU time, 54.2M memory peak, 100K memory swap peak.
Aug 04 23:41:28 qaa earlyoom[1308]: process 2002 exited after 0.100 seconds
Aug 04 23:41:35 qaa earlyoom[1308]: mem avail:  2050 of 20519 MiB ( 9.99%), swap free:    0 of  975 MiB ( 0.02%)
Aug 04 23:41:35 qaa earlyoom[1308]: low memory! at or below SIGTERM limits: mem 10.00%, swap 10.00%
Aug 04 23:41:35 qaa earlyoom[1308]: sending SIGTERM to process 5446 uid 1000 "Isolated Web Co": oom_score 800, VmRSS 3257 MiB, cmdline "/usr/lib/firefox/firefox -contentproc -isForBrowser -prefsHandle 0:34285 -prefMapHandle 1:283567 -jsInitHandle 2:242012 -parentBuildID 20250717180000 -sandboxReporter 3 -ipcHandle 4 -initialChannelId {4ac59450-5248-4a8c-83ff-bced872d4463} -parentPid 46 -"
Aug 04 23:41:35 qaa earlyoom[1308]: kill_release: pid=5446: process_mrelease pidfd=4 success
Aug 04 23:41:35 qaa earlyoom[1308]: process 5446 exited after 0.100 seconds

Note: I'm using Debian's default options for the earlyoom process, which is

UID          PID    PPID  C STIME TTY          TIME CMD
earlyoom    1308       1  0 Jul28 ?        00:01:01 /usr/bin/earlyoom -r 3600

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug outside earlyoomhttps://en.wikipedia.org/wiki/Somebody_else%27s_problem

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions