News for hackers. Stuff that matters.
Re:I've now disabled systemd-oomd on my Fedora desktops by josephcsible on Wednesday December 07, 2022 @11:55AM (#33896758)
I'm a sysadmin for a medium-sized fleet of servers, and systemd definitely isn't great for me.
Re:I've now disabled systemd-oomd on my Fedora desktops by aliqot on Wednesday December 07, 2022 @11:56AM (#33896791)
In what way?
Re:I've now disabled systemd-oomd on my Fedora desktops by josephcsible on Wednesday December 07, 2022 @12:02PM (#33896880)
It makes changes that break things (like suddenly kill -9'ing all of user's nohup and screen processes when they exited their SSH sessions, completely defeating the purpose of the tools) and replaces old simple ways of doing things with new complicated ways, without benefits of the new ways to justify the changes.
Re:I've now disabled systemd-oomd on my Fedora desktops by aliqot on Wednesday December 07, 2022 @12:11PM (#33896999)
> like suddenly kill -9'ing all of user's nohup and screen processes when they exited their SSH sessions

This was surprising, I was unable to replicate it though. Did you set systemd to automatically clean up sessions?

From the man page of logind.conf,

    KillUserProcesses= Takes a boolean argument. Configures whether the processes of a user should be killed when the user logs out. If true, the scope unit corresponding to the session and all processes inside that scope will be terminated.
Re:I've now disabled systemd-oomd on my Fedora desktops by josephcsible on Wednesday December 07, 2022 @12:21PM (#33897150)
That is what was doing it, but I didn't set it to do that. It was on by default when it was first released. Since then, the world realized how insane that was and major distros now turn it off for you.
Re:I've now disabled systemd-oomd on my Fedora desktops by kevin_b_er on Wednesday December 07, 2022 @08:18PM (#33902839)
The default is 'yes'. For awhile Fedora overrode it no, but then abandoned that: https://fedoraproject.org/wiki/Changes/KillUserProcesses_by_...
Re:I've now disabled systemd-oomd on my Fedora desktops by kaba0 on Wednesday December 07, 2022 @05:26PM (#33901233)
They gave both a compile time and runtime configuration option to set the default behavior, package maintainers didn’t read the docs and shipped it incorrectly. I doubt systemd people are at fault here.

Plus, on a theoretical level that is the correct behavior, you don’t want to leave running processes gobbling up resources under a logged out user without explicitly allowing it.

Re:I've now disabled systemd-oomd on my Fedora desktops by jimrandomh on Thursday December 08, 2022 @06:19AM (#33906705)
Speaking as one of many who has lost work to the systemd-kills-your-processes issue: No, it's 100% systemd's fault. They shipped a change that broke nohup, screen, tmux, and a dozen other things. All of the feedback they've gotten about the process-killing feature has been negative, but their response has been to shut their ears and blame the problem on distros for not overriding their insane design decision.
Re:I've now disabled systemd-oomd on my Fedora desktops by josephcsible on Wednesday December 07, 2022 @05:59PM (#33901608)
The point of a default is that it's what a setting should be if you don't go out of your way to change it. The default was on, and you're faulting the distro maintainers for not changing it to off, when it should have just defaulted to off all along. (Or are you saying that it did default to off, and that the distro maintainers originally went out of their way to turn it back on? If so, that would surprise me, but I'd concede the point.)

Correct behavior is that a demonized process doesn't ever get killed just because another process in its original family tree dies.

Re:I've now disabled systemd-oomd on my Fedora desktops by kaba0 on Wednesday December 07, 2022 @06:06PM (#33901683)
> Correct behavior is that a demonized process doesn't ever get killed just because another process in its original family tree dies

Who decides what is a demonized process, vs one that just froze and won’t respond to some random UNIX convention, that can’t even reliably signal its state (what is tmux when it is frozen?)

So the solution is to explicitly specify that a given process wishes to live outside of the seat’s lifetime (either by specifying it as a service, which your earlier example ssh is on basically any distro, or by executing it as with systemd-run)

Re:I've now disabled systemd-oomd on my Fedora desktops by josephcsible on Wednesday December 07, 2022 @06:18PM (#33901793)
> explicitly specify that a given process wishes to live outside of the seat’s lifetime

Okay, so it does that now. But now how do you tell if it's frozen?

Re:I've now disabled systemd-oomd on my Fedora desktops by kaba0 on Wednesday December 07, 2022 @07:28PM (#33902438)
That’s not really the point, but there are of course plenty of ways for that (output, watchdogs, etc).

The point is that the OS does actually know “statically” that a given process is a daemon or not.

Re:I've now disabled systemd-oomd on my Fedora desktops by josephcsible on Wednesday December 07, 2022 @09:56PM (#33903556)
How is this random systemd convention better than a random UNIX convention though?
Re:I've now disabled systemd-oomd on my Fedora desktops by kaba0 on Thursday December 08, 2022 @01:27AM (#33904860)
One is decidable the other can have false positives.
Re:I've now disabled systemd-oomd on my Fedora desktops by traverseda on Wednesday December 07, 2022 @03:05PM (#33899496)
Very little locality of behavior. A service can appear in something like 8 different folders, can depend on stuff that is who knows where. It is just a not very elegant system, it's baroque and confusing where it doesn't need to be.

The solution of course is more systemd. Instead of using generic Linux tools like grep, learn and remember a bunch of weird systemd-journald specific commands. Unfortunately I'm also a programmer, and only really have room in my head for one grep command, so it introduces frission and I have to look up the commands every time.

Also just a lot of random breakage over the years.

Re:I've now disabled systemd-oomd on my Fedora desktops by kaba0 on Wednesday December 07, 2022 @05:23PM (#33901204)
It’s almost like service management is a hard problem, and that shitty bash one-liner won’t solve anything correctly. It is basically a dependency manager, yet you are not replacing apt/pacman whatever with unix tools piped together, do you?
Re:I've now disabled systemd-oomd on my Fedora desktops by traverseda on Thursday December 08, 2022 @02:31PM (#33912120)
It's a bit of a false choice to say the options are systemd or write everything in bash. Personally I do like OpenRC.

Service management is a hard problem when you start adding things like socket activation, home directory management, DNS resolving, container management, log management, and whatever else they want to throw in.

Now you might say "well DNS resolving isn't actually part of systemd, it's a seperate daemon", well they've been more and more tightly coupling all these different components together. Yes you can disable systemd's DNS resolver, but probably something else will break. They're all pretty tightly coupled together and they mostly seem to do that in a dumb way.