Repository navigation
Closed
Description
systemd version the issue has been seen with
latest main
Used distribution
Fedora Rawhide
Linux kernel version used
No response
CPU architectures issue was seen on
None
Component
No response
Expected behaviour you didn't see
No response
Unexpected behaviour you saw
This was originally reported by @bluca in Ubuntu CI, but I can reliably reproduce it locally.
When systemd-oomd.socket is active, one of the conditions for systemd-oomd.service is not met, and a new user session appears, systemd-oomd seems to "feed on itself" until it hits a trigger activation limit:
# systemctl stop systemd-oomd.service systemd-oomd.socket
# mount -t tmpfs tmpfs /proc/pressure/
# systemctl start systemd-oomd.socket
# systemctl start [email protected]
# systemctl status systemd-oomd.socket
× systemd-oomd.socket - Userspace Out-Of-Memory (OOM) Killer Socket
Loaded: loaded (/usr/lib/systemd/system/systemd-oomd.socket; disabled; preset: disabled)
Active: failed (Result: trigger-limit-hit) since Thu 2023-05-18 15:24:48 EDT; 38s ago
Duration: 49.471s
Triggers: ● systemd-oomd.service
Docs: man:systemd-oomd.service(8)
Listen: /run/systemd/oom/io.system.ManagedOOM (Stream)
May 18 15:23:58 ci-vm-10-0-137-233 systemd[1]: Listening on systemd-oomd.socket - Userspace Out-Of-Memory (OOM) Killer Socket.
May 18 15:24:48 ci-vm-10-0-137-233 systemd[1]: systemd-oomd.socket: Trigger limit hit, refusing further activation.
May 18 15:24:48 ci-vm-10-0-137-233 systemd[1]: systemd-oomd.socket: Failed with result 'trigger-limit-hit'.
# journalctl -e --no-hostname -o short-monotonic
...
[18580.100431] systemd[1]: Starting [email protected] - User Manager for UID 1000...
[18580.117841] (systemd)[1709]: pam_unix(systemd-user:session): session opened for user fedora(uid=1000) by (uid=0)
[18580.171014] systemd[1]: systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[18580.171160] systemd[1]: systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[18580.171190] systemd[1]: systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[18580.171211] systemd[1]: systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[18580.173027] systemd[1]: systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[18580.173089] systemd[1]: systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[18580.173121] systemd[1]: systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[18580.174033] systemd[1]: systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[18580.175602] systemd[1]: systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[18580.177095] systemd[1]: systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[18580.177871] systemd[1]: systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[18580.179427] systemd[1]: systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[18580.180153] systemd[1]: systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[18580.181671] systemd[1]: systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[18580.183228] systemd[1]: systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[18580.183976] systemd[1]: systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[18580.189555] systemd[1]: systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[18580.189605] systemd[1]: systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[18580.189631] systemd[1]: systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[18580.190635] systemd[1]: systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[18580.190677] systemd[1]: systemd-oomd.socket: Trigger limit hit, refusing further activation.
[18580.190709] systemd[1]: systemd-oomd.socket: Failed with result 'trigger-limit-hit'.
Some relevant debug logs:
...
[18755.198964] systemd[1]: systemd-oomd.service: ConditionPathExists=/proc/pressure/memory failed.
[18755.198980] systemd[1]: systemd-oomd.service: Starting requested but condition failed. Not starting unit.
[18755.198995] systemd[1]: systemd-oomd.service: Job 2932 systemd-oomd.service/start finished, result=done
[18755.199084] systemd[1]: systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[18755.199202] systemd[1]: systemd-oomd.socket: Changed running -> listening
[18755.199340] systemd[1]: systemd-oomd.socket: Incoming traffic
[18755.199355] systemd[1]: systemd-oomd.service: Trying to enqueue job systemd-oomd.service/start/replace
[18755.199370] systemd[1]: systemd-oomd.service: Installed new job systemd-oomd.service/start as 2940
[18755.199386] systemd[1]: systemd-oomd.service: Enqueued job systemd-oomd.service/start as 2940
[18755.199404] systemd[1]: systemd-oomd.socket: Changed listening -> running
[18755.199587] systemd[1]: systemd-oomd.service: ConditionPathExists=/proc/pressure/memory failed.
[18755.199602] systemd[1]: systemd-oomd.service: Starting requested but condition failed. Not starting unit.
[18755.199617] systemd[1]: systemd-oomd.service: Job 2940 systemd-oomd.service/start finished, result=done
[18755.199633] systemd[1]: systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[18755.199745] systemd[1]: systemd-oomd.socket: Changed running -> listening
[18755.199891] systemd[1]: systemd-oomd.socket: Incoming traffic
[18755.199906] systemd[1]: systemd-oomd.service: Trying to enqueue job systemd-oomd.service/start/replace
[18755.199922] systemd[1]: systemd-oomd.service: Installed new job systemd-oomd.service/start as 2948
[18755.199937] systemd[1]: systemd-oomd.service: Enqueued job systemd-oomd.service/start as 2948
[18755.199955] systemd[1]: systemd-oomd.socket: Changed listening -> running
[18755.203130] audit[1746]: USER_ACCT pid=1746 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='op=PAM:accounting grantors=pam_unix acct="fedora" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=s>
[18755.203181] audit[1746]: CRED_ACQ pid=1746 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='op=PAM:setcred grantors=? acct="fedora" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
[18755.203206] audit[1746]: USER_ROLE_CHANGE pid=1746 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='pam: default-context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 selected-context=unconfined_u:unc>
[18755.203228] audit[1746]: USER_START pid=1746 uid=0 auid=1000 ses=9 subj=system_u:system_r:init_t:s0 msg='op=PAM:session_open grantors=pam_selinux,pam_selinux,pam_loginuid,pam_keyinit,pam_namespace,pam_systemd_home,pam_keyinit,pam_limi>
[18755.203255] (systemd)[1746]: pam_unix(systemd-user:session): session opened for user fedora(uid=1000) by (uid=0)
[18755.203414] systemd[1]: systemd-oomd.service: ConditionPathExists=/proc/pressure/memory failed.
[18755.203431] systemd[1]: systemd-oomd.service: Starting requested but condition failed. Not starting unit.
[18755.203447] systemd[1]: systemd-oomd.service: Job 2948 systemd-oomd.service/start finished, result=done
[18755.203467] systemd[1]: systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
[18755.203596] systemd[1]: systemd-oomd.socket: Changed running -> listening
[18755.203785] systemd[1]: systemd-oomd.socket: Incoming traffic
[18755.203802] systemd[1]: systemd-oomd.service: Trying to enqueue job systemd-oomd.service/start/replace
[18755.203818] systemd[1]: systemd-oomd.service: Installed new job systemd-oomd.service/start as 2956
[18755.203835] systemd[1]: systemd-oomd.service: Enqueued job systemd-oomd.service/start as 2956
[18755.203852] systemd[1]: systemd-oomd.socket: Changed listening -> running
[18755.205118] systemd[1]: systemd-oomd.service: ConditionPathExists=/proc/pressure/memory failed.
[18755.205138] systemd[1]: systemd-oomd.service: Starting requested but condition failed. Not starting unit.
[18755.205157] systemd[1]: systemd-oomd.service: Job 2956 systemd-oomd.service/start finished, result=done
[18755.205177] systemd[1]: systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer was skipped because of an unmet condition check (ConditionPathExists=/proc/pressure/memory).
...
(@bluca I still don't know how systemd-oomd got pulled in in the first place in the Ubuntu CI job, since it didn't happen in my runs, but after starting it manually it fails in the same way)
Steps to reproduce the problem
No response
Additional program output to the terminal or log subsystem illustrating the issue
No response
Activity
unit: add conditions and deps to make oomd.socket and .service consis…
unit: add conditions and deps to make oomd.socket and .service consis…
unit: add conditions and deps to make oomd.socket and .service consis…
unit: add conditions and deps to make oomd.socket and .service consis…
unit: add conditions and deps to make oomd.socket and .service consis…