Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mate-desktop missing cgroups support, dangerous if systemd-oomd is used #519

Open
adatum opened this issue Apr 24, 2022 · 5 comments
Open

Comments

@adatum
Copy link

adatum commented Apr 24, 2022

Expected behaviour

The whole X-session should not be killed when systemd-oomd kills processes when running low on memory.

Actual behaviour

From RH2078108: "Using systemd-oomd is dangerous for mate-desktop because it can kill the whole X-session because of missing cgroups support.
When system runs out of memory X-session will be kiiled by systemd-oomd, reported by a users in reports."

Workaround:
From RH2078108: "Mate desktop [in Fedora] will step back to original earlyoom memory management implementation, which was used before f34 in fedora.

So removing systemd-oomd-defaults will simply disable systemd-oomd unit, and earlyoom service will be installed by the update and is enabled by default."

Steps to reproduce the behaviour

Trigger systemd-oomd out of memory killer while using a desktop environment or window manager without cgroups support

MATE general version

1.26

Package version

mate-desktop-1.26.0-2.fc35

Linux Distribution

Fedora 35

Link to bugreport of your Distribution (requirement)

https://bugzilla.redhat.com/show_bug.cgi?id=2078108

Additional references:
https://bugzilla.redhat.com/show_bug.cgi?id=2068699

https://fedoraproject.org/wiki/Changes/EnableSystemdOomd#Should_spins_that_don.27t_put_processes_in_separate_cgroups_be_excluded_from_this_change.3F

https://bugzilla.redhat.com/show_bug.cgi?id=1933494

@raveit65
Copy link
Member

raveit65 commented Apr 30, 2022

I can confirm that missing cgroups support is an issue in fedora.
Since f34 systemd-oomd is the default out-of-memory-killer. Without cgroup support systemd-oomd can kill the whole X session on systems with low memory.
It was hard action for me to switch back actual 3 fedora releases to earlyoom out-of-memory-killer.
And i want clearly state that this is a workaround and not a real solution.
Real solution is to support cgroups.
Well, it's only a question of time when systemd-oomd will arrive in ubuntu, debian or other distros.
Docs: https://fedoraproject.org/wiki/Changes/EnableSystemdOomd
User pain: https://bugzilla.redhat.com/show_bug.cgi?id=2068699

@lukefromdc
Copy link
Member

lukefromdc commented May 7, 2022

As of now, wiithout something like systemd-oomd, instead of automatically losing even my entire X session, if I use up the RAM on something like my laptop, I have to act very fast to kill a big process or even the X session itself, or I risk having to power cycle the entire machine to get out of an unresponsive condition. Even auto-killing the X session beats a freeze and having to power cycle. I don't know much about cgroups, but being able to kill just the offending (possibly memorly leaking) process can be a big deal on laptops that never seem to have enough RAM

@lillolollo
Copy link

lillolollo commented Sep 5, 2022

Actually systemd-oomd is already in ubuntu 22.04 with problems.. systemd/systemd#19007

@jhgit
Copy link

jhgit commented Nov 26, 2023

Has there been any progress regarding enabling cgroup support for MATE? Patches / pull requests to try?

@lukefromdc
Copy link
Member

I don't know enough about cgroups to even start with that right now. Maybe some of the others here do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants