News for hackers. Stuff that matters.
Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by SwellJoe on Monday July 10, 2017 @01:19AM (#14733553)
There are a couple of inits in common usage on Linux; systemd is now the most popular and ships standard on the most popular distributions. I can't imagine Linus would be feeling grouchy toward a nearly defunct init (that had been in use mostly unchanged since the 90s), so we're left with systemd. Unless you've got a better idea about what he means?

It is not a secret that kernel devs have a love-hate relationship with systemd, and have for years. That's why Linus said, "You all presumably know why." He was speaking with context that everyone on the LKML already knows.

First result when I google it (but it's been a thing for a long time and on many fronts with many interesting bugs and arguments): http://www.phoronix.com/scan.php?page=news_item&px=MTY1MzA

I don't really subscribe to the "systemd is terrible and is the worst thing that ever happened to Linux" theory, and I'm not trying to be one of those folks that takes every opportunity to make a thread about how much systemd sucks. I like systemd. I mean it when I say that. But, in this case, it seems obvious it is about systemd. I have a hard time coming up with another plausible theory.

Edit: Also, now that I'm thinking about Linus and Poettering butting heads...well, that's hilarious. A couple of brilliant assholes arguing is funny to me. I dunno how much it's actually happened (and how much happened through proxies), but still. Funny.

Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by petre on Monday July 10, 2017 @02:44AM (#14733856)
Maybe eventually Linus will become so fed up with systemd, that he would write an init system of his own, which would become a major success just like git did. Then conversations like this one will be pointless, because everyone and their dog with the possible exception of RedHat would have long switched to Linus' init.

Systemd and the whole controversy around it is anything but funny. It's upsetting and it already divided the community.

Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by mdekkers on Monday July 10, 2017 @04:46AM (#14734282)
Maybe eventually Linus will become so fed up with systemd, that he would write an init system of his own

Can't. Fucking. Wait. Seriously, that day cannot come soon enough. systemd might have some useful ideas, but their implementation is crap, and the overall intrusion on how to get stuff done is significant.

Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by SwellJoe on Monday July 10, 2017 @03:50AM (#14734085)
It's a little funny.

systemd has some great stuff in it. I have my nits to pick with it but, on the whole, it's better than what we had before. And, don't we all just want things to be a little better every day?

I think it's all gonna work out fine in the end (and if not, we'll all be dead someday, anyway).

Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by MereInterest on Monday July 10, 2017 @06:47AM (#14734791)
I use tmux and emacs --daemon constantly. My experience with systemd is that I need to check whether KillUserProcesses is enabled, or else systemd will kill my processes. My experience with init was nonexistent, because it never came up as an issue.
Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by SwellJoe on Monday July 10, 2017 @07:04AM (#14734854)
Most distros have set KillUserProcesss to no for the short-term. Fedora plans to make all of the obvious user programs aware of the change (and able to create a new systemd unit for the process) and turn it back on for Fedora 26.

https://fedoraproject.org/wiki/Changes/KillUserProcesses_by_...

Their reasoning is pretty good, IMHO. It provides more control at low cost, and it's a one-line configuration change if you want the old behavior. But, everything I need it for (pretty much just screen and tmux) will already be aware and will handle setting up the new systemd unit automatically.

Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by MereInterest on Monday July 10, 2017 @08:02AM (#14735145)
It is a one-line configuration change IF you know that it exists, and you have administrator privileges on the machine. If either of those conditions fail, systemd has broken your setup.

Not only that, but there was an existing mechanism for this. On a disconnect, SIGHUP would be sent to all processes. A background process can explicitly ignore SIGHUP in order to remain running on disconnect. I would be fine if systemd were sending SIGHUP to processes, because that would fit with the existing method of opting out. Sending SIGKILL, and having to use systemd's API to opt out of being killed is ridiculous.

This adds more complexity for no added benefit. My standard .bashrc now needs to have a line checking whether KillUserProcesses is enabled, so that I can bug the admin to disable that idiocy if it is.

Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by MertsA on Monday July 10, 2017 @10:46AM (#14736391)
>A background process can explicitly ignore SIGHUP

The problem with SIGHUP is that a background process can't explicitly ignore SIGHUP, it can only implicitly ignore it. If you send SIGHUP to a process and it doesn't exit you have no idea if it didn't exit because it wants to hang around or if it didn't exit because the process is hung.

Part of the motivation for fixing that is to eliminate things like gnome-keyring-daemon hanging around after the user logs out.

Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by MereInterest on Monday July 10, 2017 @12:06PM (#14737161)
Correct me if I am wrong, but I would call signal(SIGHUP, mysignalhandler) to be an explicit ignoring of SIGHUP. I have taken a non-default action in order to have a non-default behavior.

Since gnome is the one that requires behavior and integration with systemd beyond what can be done with signals, a reasonable workaround would be to have the extra logic in systemd apply only to gnome. As it is, they are changing to a default that is entirely unreasonable outside of a desktop environment, and requiring others to work with the new system.

Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by MertsA on Monday July 10, 2017 @03:33PM (#14738933)
>I would call signal(SIGHUP, mysignalhandler) to be an explicit ignoring of SIGHUP. But that doesn't explicitly ignore SIGHUP. You're explicitly handling it but from an outside perspective we don't know if your SIGHUP handler is supposed to be a no op, output some progress information, terminate the program in some special way or what. All the system knows is that it signaled your program and your program is still around 10 seconds later. In terms of your program, it hasn't taken any external action, hence not being explicit.

As for the Gnome project though, that's just an example. I'm talking about cases where the application should terminate upon receipt of SIGHUP but doesn't. That default isn't changing, the method to avoid the default action is. Back when SIGHUP was created all software that wanted to ignore it needed to make a handler to avoid the new default behavior. If you want to be able to kill misbehaving processes that were supposed to terminate on SIGHUP then the design needs to change. There's no way to fix this without making some breaking change.

As to requiring others to work with it, your distribution is the one that's making you do that. systemd upstream has had killuserprocesses for a while now. It's just a configure option when building systemd. It's not like your distro is having someone else build packages for them, setting appropriate config options is entirely on them. Some distros are building systemd with that on by default, and some aren't.

Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by MereInterest on Monday July 10, 2017 @06:46PM (#14740317)
So, if I understand correctly, a misbehaved program that incorrectly ignores SIGHUP will be replaced by a misbehaved program that starts a new user scope with systemd. In both cases, there is no way to tell whether the program has hung, or whether it is working as intended. The end result is the same. So, we've switched to a new API, broken all existing daemons, for no end benefit?

I'm fine with having KillUserProcesses exist as a concept. There are some odd machines, like public terminals, where you would want to forbid any long-lived processes. I'm not okay with it being the default option. Yes, the distributions can change their default, but systemd's default in an endorsement that shouldn't be there.

Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by MertsA on Tuesday July 11, 2017 @04:11AM (#14742397)
No, that's not the concern here. KillUserProcesses is intended to reap children that were never intended to persist outside of the user session. My ssh-agent is never going to move itself into a new scope, but it very well could have a bug that causes it to hang around after I log out.

The only things that will ever create a new scope are things like tmux, screen, and maybe some variant of nohup.

Here's the kinds of problems that misbehaving processes actually cause.

https://bugs.freedesktop.org/show_bug.cgi?id=94508#c10

And yes, KillUserProcesses reliably fixes crap like "hp-systray" from hanging your whole session in a way that isn't obvious to the user. If there's a deadlock when trying to log out, somethings gotta give otherwise your session will just persist forever.

Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by JdeBP on Tuesday July 11, 2017 @11:10AM (#14744797)
> Back when SIGHUP was created all software that wanted to ignore it needed to make a handler

False. People ran such softwares via the nohup command. No program modifications were needed. They still aren't.

Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by MertsA on Thursday July 13, 2017 @07:35AM (#14760436)
Yeah but that's exactly the same situation we're in right now with distros turning on KillUserProcesses. I can start whatever processes I want to in another scope without having to modify those processes.
Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by JdeBP on Thursday July 13, 2017 @01:45PM (#14763415)
... but not with general-purpose tools that use the standard semantics that have been around since 7th Edition. Only with Linux-specific and systemd-specific tools. Which is why it of course is not the same situation at all.
Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by CJefferson on Monday July 10, 2017 @07:33AM (#14734979)
But, it breaks a standard Unix behaviour going back years, and it can't be configured by a non root user.
Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by stuaxo on Monday July 10, 2017 @04:32AM (#14734235)
I would say the same with pulseaudio; before this, there were a mess of audio servers (esd / ksd or none) - now things are definitely better.
Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by digi_owl on Monday July 10, 2017 @01:33PM (#14738012)
I have not required a audio server in years, and i have not adopted PA. What i did was enable dmix, that comes with Alsa.

A behavior that is even default Alsa these days if it detect that you use sound hardware without mixing.

The one "issue" that PA "fixed" was that of temporary audio devices (bluetooth, USB). But then i find the whole notion of USB headphones (a pair of headphones soldered to a minimal USB sound card) a massive abomination. and i fail to see why paired Bluetooth audio devices are exposed directly into the /dev tree rather than behind the Bluetooth dongle device.

Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by toyg on Monday July 10, 2017 @02:48AM (#14733873)
> a couple of brilliant assholes

Define brilliant. One changed the computing landscape by starting (and running for decades) the biggest opensource copyleft project in the history of mankind; the other is a bog-standard corporate engineer who simply leverages his parent company status to piss off most people and get away with it. Placing them on the same level is an insult to Linus, who might occasionally be an asshole but is still the most effective leader the opensource community has ever seen.

Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by digi_owl on Monday July 10, 2017 @01:40PM (#14738073)
The funny thing is that Torvalds is not much of an asshole unless you violate the trust he have placed in you.

He will gladly chastise himself for errors etc, and is quite humble in public.

Poettering on the other hand have a history of hubris and assholeness.

Consider for example that he not only heckled a presenter at a conference. But when the presenter bowed out early he climbed the stage, beer bottle in hand, to grab the microphone.

It would not surprise me of Poettering have never met hardship during his school years (apparently the signing scheme used in journald was based on his brother's doctoral thesis no less) until he hit the net with his projects, and simply do not know how the handle negative feedback.

Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by mmjaa on Monday July 10, 2017 @04:14AM (#14734178)
Assholes can be effective leaders of community.
Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by mijoharas on Monday July 10, 2017 @07:45AM (#14735043)
I think the only problem that the parent comment had with the quote was about the brilliant part being assigned to Poettering.

EDIT/NOTE: I don't have opinions on either Linus or Lennart. I use both of their software daily.

Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by digi_owl on Monday July 10, 2017 @01:27PM (#14737954)
Poettering is perhaps an asshole, but Torvalds reputation for being so is overhyped to put it mildly.

Never mind that they have faced off (sort of) on camera at least once, with Poettering basically missing the point again and again that not just Torvalds but also other long term kernel devs on the stage was raising.

Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by microcolonel on Monday July 10, 2017 @01:32AM (#14733614)
But you said specifically "...and systemd has broken userspace a lot."

What did you mean by this? It seems like a complete nonsense statement in the context of user space breakage of the form the kernel is responsible for.

The main clash between the kernel maintainers and the systemd maintainers was over systemd reading the kernel argv in an error prone way to trigger debug information. Other than that the interactions seem completely minimal. Linus Torvalds uses systemd at work and at home.

Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by SwellJoe on Monday July 10, 2017 @01:44AM (#14733657)
"What did you mean by this? It seems like a complete nonsense statement in the context of user space breakage of the form the kernel is responsible for."

Does it? systemd is the init, the service manager, the interface to D-bus (and kernel devs had a bit of a tussle with the systemd devs about kdbus), the logging interface of most services (possibly including kernel logs), etc. systemd interacts with both the kernel directly (as the system init, as one interface to cgroups and namespaces, etc.) and with users (as everything else it does). I like it, but I understand the Borg accusations.

"The main clash between the kernel maintainers and the systemd maintainers was over systemd reading the kernel argv in an error prone way to trigger debug information."

Searching the LKML for systemd seems to indicate otherwise. It seems like there have been a few scuffles over the years. I don't subscribe to the LKML or read it religiously and haven't for many years, so I'm mostly guessing based on context, but the context seems clear to me.

Again, I ask, if not systemd, then which init is Linus talking about?

Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by cthalupa on Monday July 10, 2017 @02:04AM (#14733714)
(Disclaimer: I hate systemd)

The issue isn't him not knowing what systemd is, or not knowing that that is the init system Linus is talking about. He is aware of both.

His issue is with your claim that systemd has broken userspace. You haven't seemed to provide any evidence of this being the case.

Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by SwellJoe on Monday July 10, 2017 @02:21AM (#14733778)
We may simply be using different terminology. systemd has had bugs (a lot of them), many of which impacted the system at a high level (being the init and everything else), sometimes due to ineractions with the kernel, sometimes due to interactions with other parts of the system. Perhaps others wouldn't call that "userspace", I dunno. I figure if it affects users trying to run software it's "userspace".

But, I'm happy to take the "broke userspace" assertion back if you don't like the term. Let's just say systemd has had a lot of bugs, sometimes stupid ones, and sometimes stubbornly held on to despite kernel devs or other devs asking for changes. I would hope we're not arguing about whether systemd has had an exciting number of bugs and compatibility issues (I think we can all agree on that, even if we like systemd).

I inferred a bunch from my recollection of how the LKML has talked about systemd in the past. I assumed Linus was talking about systemd and that when he says he doesn't trust it, it was about systemd being sloppy and stubborn about compatibility and fixing bugs. I could be wrong about that.

Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by cthalupa on Monday July 10, 2017 @02:35AM (#14733825)
Linus is generally very specific when he talks about things breaking userspace - changes to the kernel should not make things that work in userspace stop working.

systemd doesn't really have the power to completely break userspace in the manner Linus refers to, though it certainly has the power to break a system.

(One of my favorites was when a systemd update shut down dhclient but did not restart it, so once dhcp leases expired, servers lost connectivity. It was fun seeing several thousand machines go offline all at once. "Fun.")

Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by SwellJoe on Monday July 10, 2017 @05:09AM (#14734373)
You're right. I should be more careful about language. When talking about kernel developers, they do usually mean the ABI.
Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by vidarh on Monday July 10, 2017 @04:48AM (#14734292)
But Linus wasn't the one who wrote about breaking userspace here, so Linus' use of that term is irrelevant.
Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by otterley on Monday July 10, 2017 @11:07AM (#14736560)
It's a term of art -- one defined by Linus and the kernel team over the past 25+ years. People who have been involved in one way or another with kernel development know what it means, and it makes little sense to redefine it here.
Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by vidarh on Tuesday July 11, 2017 @02:58AM (#14742117)
English is defined by usage, and whether or not it make "little sense" to you, if people use it differently and makes it clear they mean it differently, it makes even less sense to try to belabour the point based on a different definition.
Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by otterley on Tuesday July 11, 2017 @11:13AM (#14744836)
Your point is taken that English is indeed an evolving language, but there's a strong benefit to consistency that is illustrated here.

If definitions are inconsistent in the minds of people participating in a conversation, it can muddy an issue and make people needlessly argue because they aren't communicating effectively about what they mean. It also makes it more difficult for a reader to understand the debate.

Specifically, in this discussion, when I said "breaks userspace," I and others were referring to the term of art as developed over the past 25 years, and I expected (this being HN) that others would also understand it as such and discuss accordingly. Instead, this thread has turned into a morass of misunderstanding and confusion, because still others believe the term means something else, and are arguing a tangential point as a result.

Re:Linus: “I no longer feel like I can trust ‘init’ to do th... by hueving on Monday July 10, 2017 @02:13AM (#14733747)
Userspace programs that others frequently depend on the behavior of can easily break userspace. Look how many things break when you change ps or ls out with another tool.