From b522d2dc3917ff2afe1be8c9e2e7c1abb2e585be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 29 Mar 2023 18:09:36 +0200 Subject: [PATCH] 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 (cherry picked from commit 1320fc300948e7c12d16ea8dd4e0fae3fd821d54) --- systemd.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/systemd.spec b/systemd.spec index 5d61add..dbd1f46 100644 --- a/systemd.spec +++ b/systemd.spec @@ -689,7 +689,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}