#1012870 defaults should include dbus-daemon

Package:
earlyoom
Source:
earlyoom
Description:
Early OOM Daemon
Submitter:
chrysn
Date:
2023-02-05 19:39:07 UTC
Severity:
wishlist
#1012870#5
Date:
2022-06-15 18:35:14 UTC
From:
To:
The default settings, even when applying the suggestions, can easily
cause everything in a desktop session to be killed indirectly: I've
repeatedly seen dbus-daemon falling victim to earlyoom, which does
succeed in freeing a lot of memory, but has the side effect of taking
firefox, xfce4-terminal and a bunch of other processes down with it.

I suggest that dbus-daemon be included in the --avoid list offered in
/etc/default/earlyoom, and possibly even be enabled by default.

#1012870#10
Date:
2022-06-18 14:42:19 UTC
From:
To:
earlyoom author here.

I have never seen dbus-daemon use more memory than firefox.
Is there an unfixed memory leak in the Debian version of dbus-deamon?

#1012870#15
Date:
2022-09-16 07:33:58 UTC
From:
To:
Package: earlyoom
Version: 1.7-1
Followup-For: Bug #1012870

None that I'm aware of -- but I've just had a similar situation (this
time with killing the systemd user process, which cascades into systemd
going on to a killing spree on the rest of the system), and maybe the
current log can shed some light here (see below). There, I've been
running earlyoom with `-EARLYOOM_ARGS="-r 3600 --avoid
'(^|/)(dbus-daemon)$' --prefer 'contentproc'`.

My I don't have logs of which process has used which amount of memory,
but my guess is that something outside earlyoom's reach has been growing
faster than the small game which earlyoom reached, and so it kept
killing process after process until it found systemd.

Does that help clear up things?

BR
chrysn

PS. When asking for additional information on the bts, consider
group-replying or replying to 1012870-submitter@bugs.debian.org, for
otherwise the mail will only reach users subscribed to the issue or
package, which does not include the original submitter by default.


    Sep 16 08:31:30 hephaistos earlyoom[1694]: mem avail:  4073 of 15899 MiB (25.62%), swap free:    9 of 16279 MiB ( 0.06%)
    [... nothing earlyoom or memory related ... ]
    Sep 16 08:56:08 hephaistos earlyoom[1694]: mem avail:  1554 of 15899 MiB ( 9.78%), swap free:  401 of 16279 MiB ( 2.47%)
    Sep 16 08:56:08 hephaistos earlyoom[1694]: low memory! at or below SIGTERM limits: mem 10.00%, swap 10.00%
    Sep 16 08:56:08 hephaistos earlyoom[1694]: sending SIGTERM to process 3874485 uid 1000 "goa-daemon": badness 800, VmRSS 8 MiB
    Sep 16 08:56:08 hephaistos earlyoom[1694]: process exited after 0.1 seconds
    Sep 16 08:56:08 hephaistos earlyoom[1694]: mem avail:  1568 of 15899 MiB ( 9.87%), swap free:  407 of 16279 MiB ( 2.50%)
    Sep 16 08:56:08 hephaistos earlyoom[1694]: low memory! at or below SIGTERM limits: mem 10.00%, swap 10.00%
    Sep 16 08:56:08 hephaistos earlyoom[1694]: sending SIGTERM to process 3892597 uid 1000 "gvfsd-metadata": badness 800, VmRSS 7 MiB
    Sep 16 08:56:09 hephaistos earlyoom[1694]: process exited after 0.1 seconds
    Sep 16 08:56:09 hephaistos earlyoom[1694]: mem avail:  1569 of 15899 MiB ( 9.87%), swap free:  410 of 16279 MiB ( 2.52%)
    Sep 16 08:56:09 hephaistos earlyoom[1694]: low memory! at or below SIGTERM limits: mem 10.00%, swap 10.00%
    Sep 16 08:56:09 hephaistos earlyoom[1694]: sending SIGTERM to process 3874498 uid 1000 "goa-identity-se": badness 800, VmRSS 7 MiB
    Sep 16 08:56:09 hephaistos earlyoom[1694]: process exited after 0.1 seconds
    Sep 16 08:56:09 hephaistos earlyoom[1694]: mem avail:  1559 of 15899 MiB ( 9.81%), swap free:  412 of 16279 MiB ( 2.53%)
    Sep 16 08:56:09 hephaistos earlyoom[1694]: low memory! at or below SIGTERM limits: mem 10.00%, swap 10.00%
    Sep 16 08:56:09 hephaistos earlyoom[1694]: sending SIGTERM to process 3873747 uid 1000 "dconf-service": badness 800, VmRSS 5 MiB
    Sep 16 08:56:09 hephaistos earlyoom[1694]: process exited after 0.1 seconds
    Sep 16 08:56:09 hephaistos earlyoom[1694]: mem avail:  1556 of 15899 MiB ( 9.79%), swap free:  412 of 16279 MiB ( 2.53%)
    Sep 16 08:56:09 hephaistos earlyoom[1694]: low memory! at or below SIGTERM limits: mem 10.00%, swap 10.00%
    Sep 16 08:56:09 hephaistos earlyoom[1694]: memory situation has recovered while selecting victim
    Sep 16 08:56:29 hephaistos earlyoom[1694]: mem avail:  1586 of 15899 MiB ( 9.98%), swap free:  412 of 16279 MiB ( 2.53%)
    Sep 16 08:56:29 hephaistos earlyoom[1694]: low memory! at or below SIGTERM limits: mem 10.00%, swap 10.00%
    Sep 16 08:56:29 hephaistos earlyoom[1694]: sending SIGTERM to process 3874500 uid 1000 "gvfs-afc-volume": badness 800, VmRSS 5 MiB
    Sep 16 08:56:29 hephaistos systemd[2015]: gvfs-afc-volume-monitor.service: Consumed 3.200s CPU time.
    Sep 16 08:56:29 hephaistos earlyoom[1694]: process exited after 0.1 seconds
    Sep 16 08:56:29 hephaistos earlyoom[1694]: mem avail:  1495 of 15899 MiB ( 9.41%), swap free:  392 of 16279 MiB ( 2.41%)
    Sep 16 08:56:29 hephaistos earlyoom[1694]: low memory! at or below SIGTERM limits: mem 10.00%, swap 10.00%
    Sep 16 08:56:29 hephaistos earlyoom[1694]: sending SIGTERM to process 3874468 uid 1000 "gvfs-udisks2-vo": badness 800, VmRSS 5 MiB
    Sep 16 08:56:29 hephaistos earlyoom[1694]: process exited after 0.1 seconds
    Sep 16 08:56:29 hephaistos earlyoom[1694]: mem avail:  1527 of 15899 MiB ( 9.60%), swap free:  371 of 16279 MiB ( 2.28%)
    Sep 16 08:56:29 hephaistos earlyoom[1694]: low memory! at or below SIGTERM limits: mem 10.00%, swap 10.00%
    Sep 16 08:56:29 hephaistos earlyoom[1694]: sending SIGTERM to process 3892622 uid 1000 "gnome-keyring-d": badness 800, VmRSS 5 MiB
    Sep 16 08:56:29 hephaistos org.freedesktop.secrets[3892621]: discover_other_daemon: 1
    Sep 16 08:56:29 hephaistos earlyoom[1694]: process exited after 0.1 seconds
    Sep 16 08:56:30 hephaistos earlyoom[1694]: mem avail:  1511 of 15899 MiB ( 9.51%), swap free:  371 of 16279 MiB ( 2.28%)
    Sep 16 08:56:30 hephaistos earlyoom[1694]: low memory! at or below SIGTERM limits: mem 10.00%, swap 10.00%
    Sep 16 08:56:30 hephaistos earlyoom[1694]: sending SIGTERM to process 3874504 uid 1000 "gvfsd-network": badness 800, VmRSS 5 MiB
    Sep 16 08:56:30 hephaistos earlyoom[1694]: process exited after 0.1 seconds
    Sep 16 08:56:30 hephaistos earlyoom[1694]: mem avail:  1509 of 15899 MiB ( 9.50%), swap free:  372 of 16279 MiB ( 2.29%)
    Sep 16 08:56:30 hephaistos earlyoom[1694]: low memory! at or below SIGTERM limits: mem 10.00%, swap 10.00%
    Sep 16 08:56:30 hephaistos earlyoom[1694]: memory situation has recovered while selecting victim
    Sep 16 08:56:30 hephaistos earlyoom[1694]: mem avail:  1587 of 15899 MiB ( 9.99%), swap free:  372 of 16279 MiB ( 2.29%)
    Sep 16 08:56:30 hephaistos earlyoom[1694]: low memory! at or below SIGTERM limits: mem 10.00%, swap 10.00%
    Sep 16 08:56:30 hephaistos earlyoom[1694]: sending SIGTERM to process 3874543 uid 1000 "gvfsd-dnssd": badness 800, VmRSS 5 MiB
    Sep 16 08:56:30 hephaistos earlyoom[1694]: process exited after 0.1 seconds
    Sep 16 08:56:30 hephaistos earlyoom[1694]: mem avail:  1586 of 15899 MiB ( 9.98%), swap free:  373 of 16279 MiB ( 2.29%)
    Sep 16 08:56:30 hephaistos earlyoom[1694]: low memory! at or below SIGTERM limits: mem 10.00%, swap 10.00%
    Sep 16 08:56:30 hephaistos earlyoom[1694]: sending SIGTERM to process 3873643 uid 1000 "at-spi-bus-laun": badness 800, VmRSS 5 MiB
    Sep 16 08:56:30 hephaistos systemd[2015]: at-spi-dbus-bus.service: Consumed 4.003s CPU time.
    Sep 16 08:56:30 hephaistos earlyoom[1694]: process exited after 0.1 seconds
    Sep 16 08:56:30 hephaistos earlyoom[1694]: mem avail:  1577 of 15899 MiB ( 9.92%), swap free:  375 of 16279 MiB ( 2.30%)
    Sep 16 08:56:30 hephaistos earlyoom[1694]: low memory! at or below SIGTERM limits: mem 10.00%, swap 10.00%
    Sep 16 08:56:30 hephaistos earlyoom[1694]: sending SIGTERM to process 3874514 uid 1000 "gvfsd-trash": badness 800, VmRSS 4 MiB
    Sep 16 08:56:31 hephaistos earlyoom[1694]: process exited after 0.1 seconds
    Sep 16 08:56:31 hephaistos earlyoom[1694]: mem avail:  1575 of 15899 MiB ( 9.91%), swap free:  375 of 16279 MiB ( 2.31%)
    Sep 16 08:56:31 hephaistos earlyoom[1694]: low memory! at or below SIGTERM limits: mem 10.00%, swap 10.00%
    Sep 16 08:56:31 hephaistos earlyoom[1694]: sending SIGTERM to process 3874481 uid 1000 "gvfs-goa-volume": badness 800, VmRSS 4 MiB
    Sep 16 08:56:31 hephaistos earlyoom[1694]: process exited after 0.1 seconds
    Sep 16 08:56:31 hephaistos earlyoom[1694]: mem avail:  1572 of 15899 MiB ( 9.89%), swap free:  375 of 16279 MiB ( 2.31%)
    Sep 16 08:56:31 hephaistos earlyoom[1694]: low memory! at or below SIGTERM limits: mem 10.00%, swap 10.00%
    Sep 16 08:56:31 hephaistos earlyoom[1694]: sending SIGTERM to process 3873631 uid 1000 "gvfsd": badness 800, VmRSS 4 MiB
    Sep 16 08:56:31 hephaistos systemd[1]: run-user-1000-gvfs.mount: Deactivated successfully.
    Sep 16 08:56:31 hephaistos earlyoom[1694]: process exited after 0.1 seconds
    Sep 16 08:56:31 hephaistos earlyoom[1694]: mem avail:  1587 of 15899 MiB ( 9.98%), swap free:  376 of 16279 MiB ( 2.32%)
    Sep 16 08:56:31 hephaistos earlyoom[1694]: low memory! at or below SIGTERM limits: mem 10.00%, swap 10.00%
    Sep 16 08:56:31 hephaistos earlyoom[1694]: sending SIGTERM to process 3874473 uid 1000 "gvfs-mtp-volume": badness 800, VmRSS 3 MiB
    Sep 16 08:56:31 hephaistos earlyoom[1694]: process exited after 0.1 seconds
    Sep 16 08:57:16 hephaistos earlyoom[1694]: mem avail:  1586 of 15899 MiB ( 9.98%), swap free:  376 of 16279 MiB ( 2.32%)
    Sep 16 08:57:16 hephaistos earlyoom[1694]: low memory! at or below SIGTERM limits: mem 10.00%, swap 10.00%
    Sep 16 08:57:16 hephaistos earlyoom[1694]: sending SIGTERM to process 3874477 uid 1000 "gvfs-gphoto2-vo": badness 800, VmRSS 3 MiB
    Sep 16 08:57:16 hephaistos earlyoom[1694]: process exited after 0.1 seconds
    Sep 16 08:57:16 hephaistos earlyoom[1694]: mem avail:  1582 of 15899 MiB ( 9.95%), swap free:  377 of 16279 MiB ( 2.32%)
    Sep 16 08:57:16 hephaistos earlyoom[1694]: low memory! at or below SIGTERM limits: mem 10.00%, swap 10.00%
    Sep 16 08:57:16 hephaistos earlyoom[1694]: sending SIGTERM to process 2015 uid 1000 "systemd": badness 733, VmRSS 6 MiB
    Sep 16 08:57:16 hephaistos systemd[2015]: Failed to enqueue replace-irreversibly job for exit.target: Unit systemd-exit.service is masked.
    Sep 16 08:57:26 hephaistos earlyoom[1694]: kill failed: Timer expired

    followed by

    Sep 16 09:02:26 hephaistos systemd[1]: user@1000.service: Main process exited, code=killed, status=9/KILL
    Sep 16 09:02:26 hephaistos systemd[1]: user@1000.service: Killing process 2738 (dbus-daemon) with signal SIGKILL.
    Sep 16 09:02:26 hephaistos systemd[1]: user@1000.service: Killing process 5563 (sh) with signal SIGKILL.
    Sep 16 09:02:26 hephaistos systemd[1]: user@1000.service: Killing process 5565 (tmux: client) with signal SIGKILL.
    Sep 16 09:02:26 hephaistos systemd[1]: user@1000.service: Killing process 2840 (tmux: server) with signal SIGKILL.
    Sep 16 09:02:26 hephaistos systemd[1]: user@1000.service: Killing process 2933 (gpg-agent) with signal SIGKILL.
    Sep 16 09:02:26 hephaistos systemd[1]: user@1000.service: Killing process 3160 (zsh) with signal SIGKILL.
    Sep 16 09:02:26 hephaistos systemd[1]: user@1000.service: Killing process 3175 (sh) with signal SIGKILL.
    Sep 16 09:02:26 hephaistos systemd[1]: user@1000.service: Killing process 3179 (zsh) with signal SIGKILL.
    Sep 16 09:02:26 hephaistos systemd[1]: user@1000.service: Killing process 3182 (zsh) with signal SIGKILL.
    Sep 16 09:02:26 hephaistos systemd[1]: user@1000.service: Killing process 3185 (zsh) with signal SIGKILL.

#1012870#20
Date:
2022-10-22 21:07:23 UTC
From:
To:
Hi Chrysn, thanks for the details!

The behavior we see here from earlyoom is clearly pathologic,
but I think `--avoid` will not save the day.
This would just delay dbus-daemon from being targeted, but it
will not prevent it.

Now what I don't understand is what consumes all the memory
and how it can be outside the reach of earlyoom.

Some ideas:

* a tmpfs filling up?
* the balloon driver in a virtual machine (is this a virtual machine?)
* processes running in another container (does earlyoom itself run in a
container?)

#1012870#23
Date:
2022-10-22 21:07:23 UTC
From:
To:
Hi Chrysn, thanks for the details!

The behavior we see here from earlyoom is clearly pathologic,
but I think `--avoid` will not save the day.
This would just delay dbus-daemon from being targeted, but it
will not prevent it.

Now what I don't understand is what consumes all the memory
and how it can be outside the reach of earlyoom.

Some ideas:

* a tmpfs filling up?
* the balloon driver in a virtual machine (is this a virtual machine?)
* processes running in another container (does earlyoom itself run in a
container?)

#1012870#28
Date:
2023-02-05 19:36:37 UTC
From:
To:
I believe I have fixed the pathological "tmpfs filling up" case via
https://github.com/rfjakob/earlyoom/commit/459d76296d3d0a0b59ee1e2e48ad2271429de916
.

#1012870#31
Date:
2023-02-05 19:36:37 UTC
From:
To:
I believe I have fixed the pathological "tmpfs filling up" case via
https://github.com/rfjakob/earlyoom/commit/459d76296d3d0a0b59ee1e2e48ad2271429de916
.