From 1320fc300948e7c12d16ea8dd4e0fae3fd821d54 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Mar 29 2023 16:17:29 +0000 Subject: oomd: stop monitoring user-*.slice slices ... (rhbz#2177722) Oomd was killing a login session (user-*.slice/session-*.scope). Quoting https://bugzilla.redhat.com/show_bug.cgi?id=2177722#c21: > In F37 and prior the config was killing based on swap and pressure > on user-*.slice/user@.service. In 7665e1796f915dedbf8e014f0a78f4f576d609bb > it was changed to pressure only on system.slice and all slices under > user.slice. The relevant point here is that this change now includes > user-*.slice/session-*.scope which is the critical session bits > you're seeing killed here. > > That session scope should be omitted. The config that I intended > with the initial PR was for all slices under > user.slice/user-*.slice/user@.service to be monitored, not for all > slices under user.slice. With the file removed: $ oomctl | rg Path | sort Path: /system.slice Path: /user.slice/user-1000.slice/user@1000.service/app.slice Path: /user.slice/user-1000.slice/user@1000.service/session.slice --- diff --git a/systemd.spec b/systemd.spec index 70d6d55..b106b2e 100644 --- a/systemd.spec +++ b/systemd.spec @@ -770,7 +770,6 @@ install -D -t %{buildroot}/usr/lib/systemd/ %{SOURCE3} # systemd-oomd default configuration install -Dm0644 -t %{buildroot}%{_prefix}/lib/systemd/oomd.conf.d/ %{SOURCE14} -install -Dm0644 -t %{buildroot}%{system_unit_dir}/user-.slice.d/ %{SOURCE15} install -Dm0644 -t %{buildroot}%{system_unit_dir}/system.slice.d/ %{SOURCE15} install -Dm0644 -t %{buildroot}%{user_unit_dir}/slice.d/ %{SOURCE15} # https://fedoraproject.org/wiki/Changes/Shorter_Shutdown_Timer