|
|
Subscribe / Log in / New account

What breakage does this actually fix?

What breakage does this actually fix?

Posted Jun 8, 2016 5:35 UTC (Wed) by iamsrp (subscriber, #84011)
Parent article: Distributors ponder a systemd change

Is there actually a non-hypothetical and specific problem which this is solving? If so, does solving that problem outweigh the resultant breakage? I've spent half an hour trying to answer the first question here, with not results for my efforts. Perhaps I'm just not very bright this evening,..

srp


to post comments

What breakage does this actually fix?

Posted Jun 8, 2016 5:59 UTC (Wed) by marcH (subscriber, #57642) [Link] (2 responses)

Lennart got tired to (re-)configure his grand-ma and cousin's PC.

The Linux desktop is coming!

What breakage does this actually fix?

Posted Jun 8, 2016 7:25 UTC (Wed) by SimonO (guest, #56318) [Link] (1 responses)

On the (single user) desktop, I don't see much of a problem with this idea.

On servers, cluster nodes in a scientific environment, shared desktops, etc. I'd expect this to be disabled by default. With Linux that is the majority of use-cases, as single user linux-desktop is a small niche of the whole spectrum I guess...

The whole thing appears to be in the hands of distributors. Systemd is a raw tool (like a swiss army knife with a BFG 9000 included ;-) and they need to expose only the safe parts for normal use and include some safety precautions for the BFG.

If all distro's have to put in work to make every new systemd release palatable it should become an upstream problem to reduce the redundant work in all distro's.

What breakage does this actually fix?

Posted Jun 8, 2016 8:34 UTC (Wed) by ovitters (guest, #27950) [Link]

> If all distro's have to put in work to make every new systemd release palatable

It's not that much work to integrate new systemd releases. It often aligns behaviour and reduces differences across distribution, making things easier. It is usually the differences causing the interesting bugs. Theoretically you should be able to modify anything you want, but it does lead to bugs.

What breakage does this actually fix?

Posted Jun 8, 2016 6:36 UTC (Wed) by oldnpastit (subscriber, #95303) [Link] (2 responses)

Somebody who knows a lot more about systemd than I found this reason:

> The commit that made the change:
> https://github.com/systemd/systemd/commit/97e5530cf20
> referenced two bugreports:
>
> https://bugs.freedesktop.org/show_bug.cgi?id=94508
> https://github.com/systemd/systemd/issues/2900

And if you go look at those bugreports, the first of them is complaining that latest dbus leaves processes lying around.

And if you go investigate why dbus is now leaving processes around, it's because gnome leaves special magical gnome per-user processes running after the user's session has terminated. And that in turn is relying on some new systemd features to create a user session which persists (or something, I don't really understand systemd).

What breakage does this actually fix?

Posted Jun 8, 2016 18:56 UTC (Wed) by drag (guest, #31333) [Link]

> (or something, I don't really understand systemd).

Remember how it was common in Gnome 2-land to have a session manager process? So you could go into there and say 'I want FOO started when I log in'?. People would use it for all sorts of fun things. Starting up browsers, launching their terminals, blocking daemons they didn't want launched.

Then along came XDG and the various *.desktop things to make app menus cross-platform. So you could put *.desktop files in ~/.config/autostart/ and have them autostart when you logged into X (provided you used a desktop environment that was compliant).

Systemd wants to do that same sort of thing for your user, but have it be system-wide. That is one of the reasons they want Kdbus.. so you wouldn't have to run all the dbus-launch stuff for each login. You could have a dbus for a user account and have it 'just work'. Thus you have 'user sessions'.

So a lot of the commands you use for managing the init system for your system can be used to manage your user session for your user by using the '--user' option.

So for example I have a ~/.config/systemd/user/synergys.service on my desktop. When I start up my laptop I have a corresponding synergyc service that launches and they try to talk over a ssh session. I can automate the management of all of this through systemd and '--user'.

systemctl enable --user synergys

systemctl start --user synergys

systemctl status --user synergys

journalctl --user -f

etc etc. These things work as expected, but just for your user account.

What breakage does this actually fix?

Posted Jun 9, 2016 16:06 UTC (Thu) by cortana (subscriber, #24596) [Link]

Thanks for highlighting that. The freedesktop bug is really illuminating, and I wish that people would read it, in full, and understand it before they fly off the handle blaming 'GNOME'... sigh!

What breakage does this actually fix?

Posted Jun 8, 2016 8:49 UTC (Wed) by matthias (subscriber, #94967) [Link] (8 responses)

Which breakage? I expect the obvious programs (nohup, screen, tmux) to be fixed (either upstream or downstream) before this hits stable distributions.

I have seen processes consuming 100% CPU just because shutdown did not work (the SIGHUP handler was there but failed to terminate the process). Having the session management kill such processes seems reasonable. Therefore it has to know which processes should survive.

What breakage does this actually fix?

Posted Jun 8, 2016 10:25 UTC (Wed) by NAR (subscriber, #1313) [Link] (7 responses)

In what usecase is it an actual problem? In a single user desktop/laptop setting I presume you shutdown the system after logout (why else would you logout?), so the process gets killed anyway. In a multiuser server setting the system administrator will notice that there's a rogue process using 100% CPU and will kill that process (preferably after contacting the user and ensuring that the process in questions is rogue indeed and something actually making overnight calculation or something like that). The system administrator has to watch out of these kind of processes even if users are logged in anyway. I do think it's the small minority case where this feature could be useful. As far as I understood the article, 3 distributions out of the 3 that made a decision on this feature, disabled the feature, so the default should be the disabling in upstream too.

As to the technical choice that every program who wants to avoid getting killed after logout has to link against libsystemd - throwing out binary compatibility again. They could have provided some kind of wrapper, so screen could be aliased to something like "wrapper screen".

What breakage does this actually fix?

Posted Jun 8, 2016 11:21 UTC (Wed) by matthias (subscriber, #94967) [Link] (1 responses)

I had this problem in university pools. While a user is logged in, there is no problem. When the user notices that the desktop is too slow, the user can kill his own process. The problem occurs, when such a process is left after logout. The behaviour of killing all processes that are not ment to survive seems very reasonable.

And asking that the administrator should do the job of session management seems like a joke to me. It is enough work when the administrator has to react to a user doing malicious things on purpose.

I expect that the usual tools for having background processes are changed before this change hits stable distributions. Before that, disabling the feature is a reasonable choice. tmux and screen could need proper session management (using PAM) anyway (e.g., to avoid that the ssh-agent gets terminated when the user logs out). The current behaviour looks broken even without the systemd change. PAM will do the necessary things to avoid systemd killing the tmux/screen session in this case. I do not see a problem, when a distribution, which uses systemd as PID 1, needs a version of nohup that is linked against libsystemd.

Once theese changes are in place, the distributions can enable the feature again.

What breakage does this actually fix?

Posted Jun 8, 2016 13:18 UTC (Wed) by NAR (subscriber, #1313) [Link]

I thought those kind of pools went out of fashion long time ago, nowadays university students carry computing devices much stronger than those computers at the pools I used to use... The setting makes some sense in this environment, but I don't think this is the default. Anyway, even in this setting I might prefer to shutdown the computer after logout and boot before login in order to save power (systemd is supposed to make it faster). And this setup does need good monitoring tools to avoid the students running servers there.

What breakage does this actually fix?

Posted Jun 8, 2016 21:36 UTC (Wed) by xtifr (guest, #143) [Link] (4 responses)

> In a single user desktop/laptop setting I presume you shutdown the system after logout (why else would you logout?)

Like a lot of programmers (and other technical people), you're ignoring the very common case of the *family* computer! Dad may log out so the kid can work on a school paper. Doesn't mean that dad wants his emacs "daemon" to die. In fact, he may be relying on it not dying!

What breakage does this actually fix?

Posted Jun 8, 2016 23:50 UTC (Wed) by johannbg (guest, #65743) [Link] (3 responses)

I guess that family dad has never heard of "Fast User Switching" [1] which exist to handle exactly that usecase.

1. https://en.wikipedia.org/wiki/Fast_user_switching

What breakage does this actually fix?

Posted Jun 9, 2016 4:26 UTC (Thu) by xtifr (guest, #143) [Link] (2 responses)

Or maybe dad doesn't *want* to leave *all* his processes running and consuming resources. Maybe his machine simply isn't powerful enough to have five (two parents, three kids) complete desktop sessions all running, but is powerful enough to keep a couple of relatively lightweight emacs daemons or screen sessions running. Maybe he tried fast user switching and saw it bring his machine to its knees.

Not everyone has a screaming, top-of-the-line, latest model machine with all the trimmings. Especially those who are trying to feed three or more children! :)

What breakage does this actually fix?

Posted Jun 9, 2016 10:37 UTC (Thu) by NAR (subscriber, #1313) [Link] (1 responses)

Granted, I have used fast user switching only on Windows, but it didn't seem to slow down the system. There might be some swapping at the user switch, but otherwise the left processes shouldn't use much CPU (unless dad was encoding DVD - in that case the process killing would be a even worse solution).

What breakage does this actually fix?

Posted Jun 9, 2016 21:45 UTC (Thu) by mstone_ (subscriber, #66309) [Link]

"some swapping"

^^^ lol, yeah, the machine's unusable for several minutes every time someone "fast" user switches.

What breakage does this actually fix?

Posted Jun 9, 2016 2:51 UTC (Thu) by kokada (guest, #92849) [Link]

This change actually solves a problem that I have with Gnome for quite a long time (since 3.18? if so, it is already one year old): sometimes when I try to shutdown my system, it simple hangs waiting for some process to finish. I thought this was a systemd bug, however after investigating a little I found it was some Gnome hanging up when asked to finish, and systemd was painfully waiting it to finish.

The workaround was to reduce the time that systemd waits for a process to be killed, however this is a more definitive and less hacky solution, at the cost of changing on how you think about *nix logins.

And yeah, this is a problem with Gnome that should be fixed. However it is the kind of problem that is intermitent, does not occur with everyone, and come back after a while (I didn't had this problem in some point update of Gnome 3.18, got back in 3.20). And I remember to had this problem in KDE too, even before systemd existed. So yeah, an old and annoying problem.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds