Debian fell over

With systemd 230, released a couple of days ago, the developers changed a default setting, that eliminates one of the few annoyances I experienced with systemd. Many a forum thread all over the net tried to solve the problem. This annoyance resulted in a message during reboot or shutdown, that the system is waiting for a process to shut down. This could take up to 90 seconds, if you did not set the level lower manually. These were stray background processes, that belonged to one or more users on the system and should have been shut down, when the owning user gets logged out.

The systemd developers with systemd 230 set the option KillUserProcesses in /etc/systemd/logind.conf to yes. That means that 95 percent of desktop users will not see these delays anymore, because all processes of a user will be closed when the user gets logged out. On the other hand, users of tools like screen, tmux and some others will find their processes also killed server-side, even though these were meant to be long-running background jobs. That being said, the devs did explain in the release note for systemd 230 under the third bullet, what users of such tools need to do to keep KillUserProcesses on yes and still have their long-running jobs stay alive. The problem at hand was being layed out in detail in a bugreport and it’s follow-up discussion already in April.

In Debian and Fedora this new behaviour led to long discussions (and the usual systemd laments of course). The bug report for Debian on this matter now led to the new standard setting being reverted in Debian with systemd 230-2 as of today. So, if you like your processes being stopped when your user logs out, you need to manualy revert the setting in /etc/systemd/logind.conf to yes again after updating to systemd 230-2. We decided months ago to have this set to yes as default for siduction. This will take effect with our next release. But if you want to set this to yes now, you need to do so yourself.

Should you be one of the users of screen, tmux, mosh and maybe a few other affected tools, there is ways to keep the setting at yes and still keep long running processes alive when logging out. You need two things to do this: first you set enable-linger [USER1 USER2...] for your respective users, as shown in the manpage to loginctl. PAM has been adapted to allow this as normal user. Then you can follow the manpage of systemd-run to start e.g. screen with the command systemd-run --scope --user screen in it’s own scope. This will keep the job running after logout, even though other user processes are stopped.

We admired Debian for deciding pro systemd, but we think, reverting this new default is the wrong decision in the face of desktop users.

Leave a Reply

Your email address will not be published. Required fields are marked *