Tuesday, 31 May 2016 09:36

Systemd change has Linux users up in arms

By

A change in the most recent version of systemd, the init system that has been recently adopted by many GNU/Linux distributions, has users up in arms.

The change, announced a few days ago, kills background processes by default when a user logs out, the opposite of the behaviour that was exhibited earlier.

This would cause problems for users, for example, of terminal multiplexers like screen and tmux as they would be unable to return to a process once they have logged out.

If a server admin had a bunch of scripts that logged into a server, then started a process using screen and logged out, the process would be killed. This is a fairly common thing that many admins do.

In another scenario, if a user logs in to another machine, and starts a process, they cannot background the process and then logout and expect it to keep running. The user would have to keep the original session running.

Justifying the change, the main systemd developer, Red Hat's Lennart Poettering, said on a mailing list run by the community distribution, Fedora: "In my view it was actually quite strange of UNIX that it by default let arbitrary user code stay around unrestricted after logout.

"It has been discussed for ages now among many OS people, that this should (be) possible but certainly not be the default, but nobody dared so far to flip the switch to turn it from a default to an option.

"Not cleaning up user sessions after logout is not only ugly and somewhat hackish but also a security problem. systemd 230 now finally flipped the switch and finally by default cleans everything up correctly when the user logs out.

"But we do so in a very conservative way actually: a) there's a compile time switch to turn this off globally (--without-kill-user-processes, not used in Fedora) b) there's a runtime switch to turn this off locally on the system (in logind.conf) c) there's a way to opt-out individually for each user and each task from the cleanup logic, via systemd-run/loginctl linger.

"This operation goes through PK, and thus can be configured in a more strict or more open policy, depending on what the admin prefers. I am pretty sure we should consider it our duty as Fedora developers to improve the Linux platform, and I am pretty sure that properly cleaning up processes on logout is a step towards that, not against it."

Users, however, seem to be far from convinced. On the Debian bug tracking list, Guus Sliepen wrote: "Now you can no longer expect a long running background processes to
continue after logging out. I believe this breaks the expectations of many users. For example, you can no longer start a screen or tmux session, log out, and expect to come back to it.

"For this reason, I think it is a bad decision on the part of the systemd maintainers to enable this feature by default, and it should rather be disabled by default in Debian, either by compiling systemd with --without-kill-user-processes or by setting KillUserProcesses=no in /etc/systemd/logind.conf."

Asked for comment, senior Debian developer Russell Coker said he was supportive of the change.

"I think that this debate is rather silly," he said, referring to the discussion on the Debian bug tracking system. "Systemd has a new configuration option, it can be disabled at compile time but there's an option for configuring it at run-time by a file in /etc. Whenever there is such an option Debian always goes for run-time configuration.

"So the question is what the default configuration should be. There is also apparently a command to ask systemd to launch a process that won't be killed on logout, so even on a system that is configured to kill processes on logout it is possible to run long-lived processes.

Russell said that for desktop systems he believed the best default would be to kill all processes on logout. "That prevents stray processes from interfering with the correct operation of the system and means that people like my parents won't reboot their systems; when they have problems they can just logout and login again.

He said for servers the best default was to not kill processes so screen, tmux, and nohup worked as desired. "Note that screen, tmux, and nohup are regarded as expert tools by today's standards and many people with root access nowadays don't have the skill to use them.

"The people who have the skill to use screen, tmux, and nohup have the skill to change the systemd configuration or use a special systemd command for spawning processes that aren't killed on logout. The typical desktop users don't have the skill to do either.

"Therefore it makes sense to me to have the default be the option that works best for desktop users. But if the Debian developers responsible for this decision choose to make the default configuration not kill processes on logout, it will be easy for me to change the configuration of my parents' system."

Russell said he would backport this version of systemd to Jessie, the current stable version of Debian, if no-one else did it first. "This is a feature that I really want on some of my systems," he said.


Subscribe to ITWIRE UPDATE Newsletter here

GRAND OPENING OF THE ITWIRE SHOP

The much awaited iTWire Shop is now open to our readers.

Visit the iTWire Shop, a leading destination for stylish accessories, gear & gadgets, lifestyle products and everyday portable office essentials, drones, zoom lenses for smartphones, software and online training.

PLUS Big Brands include: Apple, Lenovo, LG, Samsung, Sennheiser and many more.

Products available for any country.

We hope you enjoy and find value in the much anticipated iTWire Shop.

ENTER THE SHOP NOW!

INTRODUCING ITWIRE TV

iTWire TV offers a unique value to the Tech Sector by providing a range of video interviews, news, views and reviews, and also provides the opportunity for vendors to promote your company and your marketing messages.

We work with you to develop the message and conduct the interview or product review in a safe and collaborative way. Unlike other Tech YouTube channels, we create a story around your message and post that on the homepage of ITWire, linking to your message.

In addition, your interview post message can be displayed in up to 7 different post displays on our the iTWire.com site to drive traffic and readers to your video content and downloads. This can be a significant Lead Generation opportunity for your business.

We also provide 3 videos in one recording/sitting if you require so that you have a series of videos to promote to your customers. Your sales team can add your emails to sales collateral and to the footer of their sales and marketing emails.

See the latest in Tech News, Views, Interviews, Reviews, Product Promos and Events. Plus funny videos from our readers and customers.

SEE WHAT'S ON ITWIRE TV NOW!

BACK TO HOME PAGE
Sam Varghese

Sam Varghese has been writing for iTWire since 2006, a year after the site came into existence. For nearly a decade thereafter, he wrote mostly about free and open source software, based on his own use of this genre of software. Since May 2016, he has been writing across many areas of technology. He has been a journalist for nearly 40 years in India (Indian Express and Deccan Herald), the UAE (Khaleej Times) and Australia (Daily Commercial News (now defunct) and The Age). His personal blog is titled Irregular Expression.

Share News tips for the iTWire Journalists? Your tip will be anonymous

WEBINARS ONLINE & ON-DEMAND

GUEST ARTICLES

VENDOR NEWS

Guest Opinion

Guest Interviews

Guest Reviews

Guest Research

Guest Research & Case Studies

Channel News

Comments