Adding a related data point from Ubuntu 24.04.4.

This is a true *global kernel* OOM, complementary to the dbus-killed
scenario in the description.

System:
Ubuntu 24.04.4 LTS
GNOME Shell 46.0
libmutter 46.2-1ubuntu0.24.04.16
gnome-session-bin 46.0-1ubuntu4
systemd 255.4-1ubuntu8.16
X11/Xorg
NVIDIA 580.159.03
32 GB RAM + 8 GB swap.

Under heavy load the machine hit a true global kernel OOM.

gnome-shell's own protection (OOMScoreAdjust=-1000, shipped since GNOME
44) worked.

But, the kernel spared the shell and killed a browser renderer instead.

The whole X11 session still collapsed to the "please log out" screen one
second later:

kernel: systemd-oomd invoked oom-killer: ... oom_score_adj=-900
kernel: oom-kill:constraint=CONSTRAINT_NONE, ... global_oom,
        task_memcg=.../session.slice/[email protected],
        task=brave, pid=1306259, uid=1000
kernel: Out of memory: Killed process 1306259 (brave) ... oom_score_adj:300
systemd[user]: Started gnome-session-failed.service ...   # +1 second

Two points relative to this report:
1. Protecting individual services by score isn't sufficient: here the shell WAS
   protected and a non-critical app was correctly chosen, but the session died
   anyway - so the instability isn't only about which core service gets a bad 
score.
2. The killed app was accounted under 
.../session.slice/[email protected],
   not app.slice - it wasn't isolated into its own scope (cf. gnome-shell#6565).
   That points at cgroup placement, not just OOMScoreAdjust values, as part of 
the
   fix - possibly relevant to enr0n's question about systemd vs. other packages.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2089800

Title:
  Ubuntu desktop is unstable under memory pressure due to undesireable
  OOMScoreAdjust values

To manage notifications about this bug go to:
https://bugs.launchpad.net/lxd/+bug/2089800/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to