It seems that systemd-oomd is doing what it is supposed to do -- you're running a memory stress test that is exceeding the memory pressure limits set by systemd-oomd, so it is killing the offending cgroup(s). If you want to run the stress tests in a separate cgroup, try making a script called e.g. `stress.sh`, and execute the script with systemd-run:
$ systemd-run --user ./stress.sh Further, you can always make changes to Ubuntu's default systemd-oomd configuration[1] if it better suits your stress testing environment. There are some complaints about the current state of "swap kill" in systemd-oomd, but that has been discussed in [2] and [3]. [1] https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html#ManagedOOMSwap=auto%7Ckill [2] https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1972159 [3] https://lists.ubuntu.com/archives/ubuntu-devel/2022-June/042116.html -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1985887 Title: systemd kills gnome-shell or gnome-terminal if gnome-terminal uses much memory (50% over 20s) Status in OEM Priority Project: Confirmed Status in systemd package in Ubuntu: New Bug description: [Steps to reproduce] 0. Install Jammy image 1. open gnome terminal 2. issue stress_ng or Canonical certification tool checkbox as "checkbox-cli run com.canonical.certification::memory/memory_stress_ng" or "stress-ng --stack 0 --timeout 300" 3. Terminal or Gnome-shell will be killed by systemd-oomd It's because all stressors are under same cgroup belongs to terminal. Both Wayland and Xorg can reproduce. over ssh and in multi-user.target work good. To manage notifications about this bug go to: https://bugs.launchpad.net/oem-priority/+bug/1985887/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp