Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

oom_score_adj=-1000 for Xorg is a critical bug #177

Closed
hakavlad opened this issue Nov 30, 2019 · 1 comment
Closed

oom_score_adj=-1000 for Xorg is a critical bug #177

hakavlad opened this issue Nov 30, 2019 · 1 comment

Comments

@hakavlad
Copy link
Contributor

hakavlad commented Nov 30, 2019

Some processes in user session inherits this oom_score_adj value. For example, terminal inherits it.

$ oom-sort | grep -e "-1000"

oom_score oom_score_adj  UID   PID Name            VmRSS   VmSwap   cmdline
--------- ------------- ---- ----- --------------- ------- -------- -------

        0         -1000    0   488 systemd-udevd       5 M      0 M /lib/systemd/systemd-udevd
        0         -1000    0  1410 lightdm             7 M      0 M /usr/sbin/lightdm
        0         -1000    0 21557 Xorg               89 M      0 M /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
        0         -1000    0 21722 lightdm             8 M      0 M lightdm --session-child 13 20
        0         -1000 1000 21763 gnome-keyring-d     8 M      0 M /usr/bin/gnome-keyring-daemon --daemonize --login
        0         -1000 1000 21767 kwalletd5          47 M      0 M /usr/bin/kwalletd5 --pam-login 8 3
        0         -1000 1000 21771 mate-session       24 M      0 M mate-session
        0         -1000 1000 21863 fcitx              45 M      0 M /usr/bin/fcitx -d
        0         -1000 1000 21876 dbus-daemon         4 M      0 M /usr/bin/dbus-daemon --syslog --fork --print-pid 5 --print-address 7 --config-file /usr/share/fcitx/dbus/daemon.conf
        0         -1000 1000 21881 fcitx-dbus-watc     0 M      0 M /usr/bin/fcitx-dbus-watcher unix:abstract=/tmp/dbus-pgxmERo7TT,guid=f38b0f00f140d02e37939c015de2541e 21876
        0         -1000 1000 21977 ssh-agent           0 M      0 M /usr/bin/ssh-agent /usr/bin/im-launch mate-session
        0         -1000 1000 21985 mate-settings-d    39 M      0 M /usr/bin/mate-settings-daemon
        0         -1000 1000 21990 marco              31 M      0 M marco
        0         -1000 1000 22004 mate-panel         39 M      0 M mate-panel
        0         -1000 1000 22009 caja               82 M      0 M caja
        0         -1000 1000 22073 light-locker       23 M      0 M light-locker
        0         -1000 1000 22074 update-notifier    24 M      0 M update-notifier
        0         -1000 1000 22078 applet.py          34 M      0 M /usr/bin/python3 /usr/share/system-config-printer/applet.py
        0         -1000 1000 22084 nm-tray            47 M      0 M nm-tray
        0         -1000 1000 22104 agent               5 M      0 M /usr/lib/geoclue-2.0/demos/agent
        0         -1000 1000 22120 mate-power-mana    27 M      0 M mate-power-manager
        0         -1000 1000 22127 nm-applet          32 M      0 M nm-applet
        0         -1000 1000 22141 mate-maximus       23 M      0 M mate-maximus
        0         -1000 1000 22151 mate-screensave    23 M      0 M mate-screensaver
        0         -1000 1000 22155 polkit-mate-aut    22 M      0 M /usr/lib/x86_64-linux-gnu/polkit-mate/polkit-mate-authentication-agent-1
        0         -1000 1000 22170 blueman-applet     53 M      0 M /usr/bin/python3 /usr/bin/blueman-applet
        0         -1000 1000 22179 mate-optimus       37 M      0 M mate-optimus
        0         -1000 1000 22262 lxterminal         42 M      0 M lxterminal
        0         -1000 1000 22268 bash                5 M      0 M bash
        0         -1000 1000 22278 fcitx-qimpanel     51 M      0 M fcitx-qimpanel
        0         -1000 1000 23155 python3             9 M      0 M python3 /usr/local/bin/oom-sort
        0         -1000 1000 23156 grep                1 M      0 M grep --color=auto -e -1000

Related: rfjakob/earlyoom#140.

I launched ananicy as a service, relogged in, and I ran a command in the terminal: tail /dev/zero. In the end, I had to hard reboot the system: she didn’t even react to any magic sysrq keys.

It is awful behavior and it is unexpected behavior. ananicy should not change oom_score_adj values. Firstly, this is not described in the description: readme claims that ananicy only changes nice and ionice values. Moreover, such low values, which can also be inherited by user session processes. Secondly, a change in the oom_score_adj values of the quantities does not affect the latency.

If you want to better control the choice of the victim when the memory runs out, I would recommend the nohang daemon for you: it is specifically designed to flexibly adjust the behavior of the system at low memory.

nefelim4ag added a commit that referenced this issue Dec 3, 2019
@polarathene
Copy link

This issue can be closed now with the Dec 3, 2019 commit?

@hakavlad hakavlad closed this as completed Jan 8, 2020
raphielscape added a commit to raphielscape/Ananicy that referenced this issue Jan 10, 2020
* https://github.com/Nefelim4ag/Ananicy:
  Create riot.rules
  Create brave.rules
  Disable OOM score for Xorg & lightdm for nefelim4ag#177
  Add firefox-esr in firefox.rules
  Update firefox.rules
  rclone.rules (nefelim4ag#174)
  Make sysctl ignore errors
  Fix autogroup arg description
  Disable linux autogroup on start
  Add autogroup parsers
  Add xonotic game
  added cc1plus and xz
  Implemented rtprio rule property.
  Try fix issue: nefelim4ag#157

Signed-off-by: Raphiel Rollerscaperers <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants