Earlier quoted context omitted.
Same thing with Lennart's previous project PulseAudio which also has no real stable releases and basically relies on distros to try and take the beta-quality upstream releases and turn them into something that actually works reliably. (My favorite was the PulseAudio release that shipped with a change that was literally incomplete, changing the interal resampling API without changing all the resamplers affected. Crash…
I agree with the rest of your post but I can assure you it's not the policy of Red Hat to release unstable upstream software. I am a Red Hat employee and I'm as annoyed as anyone that systemd doesn't have separate upstream development and stable releases. Also what's with the stupid versioning of systemd/udev? Having a single version number is simply a dumb idea.
Linux greybeards release beta of systemd-free Debian fork
171–180 of 189 posts
Re: Linux greybeards release beta of systemd-free Debian fork
#172Earlier quoted context omitted.
1. If the only thing you needed from init was to reap reparented zombie processes and manage to not die, why have init at all? Why not tell the kernel to skip reparenting processes (and just reap them internally if their parent is dead) and not treat pid 1 as special, allowing it to exit? That's less userspace code and less kernel code. 2. Speaking of kernel code, have you looked at how much stuff is going on in the…
For point 2, I think you can use: ps -eLf | grep '\[' I put in a grep root for good measure: ps -eLf | grep '\[' | grep root Incidentally, why would a zombie process need to be reparented? Surely it has just not been removed from the process table and all that needs to occur is to remove it fully... I can understand reparenting an orphan process, but a zombie process?
The point I'm making is not so much that I'm curious (although I am), but that the kernel is exempt from the scrutiny that systemd gets, and the kernel has a ton of fragile crap running at full privilege. If systemd even shipped three XFS-specific binaries, people would be upset, but the kernel can run three persistent kernel threads and nobody cares.
Re: Linux greybeards release beta of systemd-free Debian fork
#173Earlier quoted context omitted.
The "Unix philosophy" of text streams hasn't worked, and arguably never worked. BSD sockets aren't quite text streams. Terminals aren't quite text streams. Shellshock existed because someone decided that serializing functions via text streams was a good idea. And if you look at the things you care about when running a daemon process -- sessions, controlling terminals, reliable restarts (without killing the wrong proc…
that's funny since mountcritremote and friends have been around sine, at least, 2000.
It's also documented far more poorly than just about anything in systemd.
Re: Linux greybeards release beta of systemd-free Debian fork
#174Earlier quoted context omitted.
Wasn't it? Multics was the modular system, Unix was the one where they said "That's silly, let's stick everything in a single kernel and not bother with all the flexibility because we don't need it." People seem to ignore the kernel for some reason, but it is literally one giant program to rule them all, and it works very well. There have been many efforts to modularize it and move most of the complexity into indepen…
Modules worked. Fuse worked. DRI worked. In kernel space, the global lock is gone, there is a central API that everybody else uses with code that mostly don't touch each other. Linux is very modular. It is just not a microkernel, and that is probably more due to historical performance bottlenecks than to architectural concerns.
Linux is pretty modular as an engineering project, in that there are ways for developers of one part of the code not to need to care about all the rest of it. But in the sense that systemd gets criticized for not being modular, Linux is also not modular. It is technically possible to implement either systemd's or Linux's APIs faithfully enough for things written to those APIs to work with your alternative implementation. systemd gets criticized because doing this is difficult in practice; it's far more difficult with Linux.
Re: Linux greybeards release beta of systemd-free Debian fork
#175Earlier quoted context omitted.
> The larger problem is that init is only a tiny part of systemd. That's because you can't reasonably fix the many problems with sysvinit (or OpenRC) without also providing a proper process manager, and dependency system that does far more than just trigger scripts in the right order. The biggest problem with init is that it's just init. > Do you enjoy depending on a moving target that changes at the whim of the syst…
> The biggest problem with init is that it's just init. Why does init have to service supervision? What's wrong with having init just launch the service supervision process and afterwards just reap dead processes (which allows init to be a very simple program indeed [1]). As for the requirements to the init+rc system.. mine look a bit different: it should be reliable and predictable first.. performance not so much. O…
daemontools
A series of scripts that run the supervise program. It initially runs svscanboot [1], which enables logging and uses svscan [2] to look through a service directory in order to execute the supervise executable for each service. [3] Supervise loads the run command, and unlike runit (which was inspired by daemontools) when run ends, it waits a second and executes run again. As with runit, if it can read a down file, then it does not start the service. [3]
To control the service, you run svc [command] services, which writes to a the named pipe control. This pipe is being managed by supervise, which uses it to send a signal to the process depending on the control value it reads. [4]
When this uses System V init, you must add svscanboot to the inittab as a respawn process.
---
runit
Executes /etc/runit/2 and if this fails, restarts it. /etc/runit/2 generally runs runsvdir on a particular directory (normally /etc/service) [5] and once every 5 seconds checks if the time of last modification, the inode, or the device has changed, in which case it starts a new runsv process on the new directory.
runsv switches to the directory of the service and if the file down doesn't exist it executes the run script. Once the script exits, if there is a finish script it executes this. If there is no finish script, then runsv executes the run script again. [6]
To handle abnormal failure, you must write a script that handles it. When the run command exits, runsv passes the exit code (-1 if abnormal exit) and least significant byte of the exit status as determined by waitpid - useful if a signal is sent. [6]
You start and stop a service by using the sv program. The mechanism used in to create a pipe named control in the service directory, which runsv reads and when a control character is written to the pipe it first checks to see if there is a custom command it needs to run, if so then it runs it. runsv will send a signal to the process it is monitoring depending on what control character is written to the pipe, or unless the custom command returns 0 in which case no signal is sent. [6]
runit is meant to replace init, and run under PID 1. [7] However, it can still use it with the existing init on your system. [8] You can configure it to replace the logging facility via the /log/run script - runit just redirects the services standard output to it as standard input and you just send that input to the logger.
---
OpenRC
Not a replacement for init, but instead is invoked by init. /sbin/openrc reads /etc/runlevels, builds a dependency graph and then starts the run scripts for each of the services in the correct order. Then executable ends. [9]
---
s6
Basically inspired by runit, except the guy who makes it feels that dependency management is important and should be run by PID1. [14]
To do this, he has created a minimal shell language called execline [10] which he has run as the first process by his program execlineb [11], creates a tmpfs filesystem and copies a base image prepared by s6-linux-init into it [12], has the process reload its environment variables then forks and blocks a child process. Next, it executes as PID 1 into the service dependency tool s6-svscan, which scans a service directory and loads some initial minimal services (the logger and an optional getty, etc).
Once this is done the child process unblocks and executes s6-rc-init, which requires a compiled service database and a services directory for it to scan. After this is done, the system will be in a fully operational state.
To shutdown, PID 1 is sent a s6-svscanctl command and a shutdown script is issued.
---
In Summary
Here's the thing I see. With the exception of s6, which makes sense but seems overly complicated to me, all of these init systems have issues. daemontools polls to see if services need to be loaded, and has no dependency order. Runit has the same issue, but as pointed out by the s6 creator, if the runsv process dies then the pipe between the logger and the process means that you can lose the log. [15] s6 also does dependency by forking early, then blocking that child process till the system is usable enough for normal services to start correctly. To do this requires considerable effort, which may not be a big problem but I don't know if it's a big enough concern to be concerned about.
Runit and daemontools run shell scripts, but not in the system V way - they have run scripts you can customize. s6 has something similar, but allows for dependency tracking through listening and waiting for the status of services. You can combine Runit with OpenRC.
systemd uses socket activation for it's dependency tracking. The biggest criticism of it is that it runs in PID 1, and if it crashes it will take out your system. Whilst there are ways around this (as shown by the s6 system), I think in reality it's unlikely to occur. YMMV. But systemd provides unit files and a bunch of configurability, and I personally think it makes everyone's life easier.
The ancilliary utilities are not running in PID 1 though. And as with other systems, you use a utility to start and stop services - which some object to, but when you objectively look at it I really think you'd be hard pressed to be terribly worried about it.
So systemd does do a lot, but I think most of the arguments I've seen so far don't really show how it is a failed system in any way.
1. http://cr.yp.to/daemontools/svscanboot.html
2. http://cr.yp.to/daemontools/svscan.html
3. http://cr.yp.to/daemontools/supervise.html
4. http://cr.yp.to/daemontools/svc.html
5. http://smarden.org/runit/debian/2
6. http://smarden.org/runit/runsv.8.html
7. http://smarden.org/runit/replaceinit.html
8. http://smarden.org/runit/useinit.html
9. https://github.com/OpenRC/openrc/blob/master/guide.md
10. http://skarnet.org/software/execline/
11. http://skarnet.org/software/execline/execlineb.html
12. http://skarnet.org/software/s6-linux-init/s6-linux-init-make...
13. http://skarnet.org/software/s6-rc/s6-rc-init.html
Re: Linux greybeards release beta of systemd-free Debian fork
#176Earlier quoted context omitted.
Funny how nobody can answer this question!
You already answered the question and acted like it wasn't an answer: "Aside from the, uh, binaries that run systemd, systemd services, and systemd utilities," - yeah, those binary blobs (inherently unstable blobs of logic). http://linoxide.com/linux-how-to/linux-systemd/
The only true competitor to systemd is s6, and you should see the amount of "binary" he has had to develop to get his service manager to run outside of PID 1!
However... it's all a moot point, because that isn't the definition of a "binary blob". In the context of Linux, or "free and open-source software, a binary blob is a closed-source binary-only piece of software without publicly available source code." [1]
Re: Linux greybeards release beta of systemd-free Debian fork
#177Earlier quoted context omitted.
> Have a look at Devuan, I think you'll find that they use the same udev as Ubuntu and Debian. Yes, in amongst all of this systemd discussion, please do look at the notional actual topic of this page. And discover vdev. It's explicitly mentioned in the release notes. * https://github.com/jcnelson/vdev * http://judecnelson.blogspot.co.uk/2015/01/introducing-vdev.h... * http://www.linuxquestions.org/questions/debian-26…
Ah! Thanks - I didn't see this! Appreciate the info :-)
Re: Linux greybeards release beta of systemd-free Debian fork
#178Earlier quoted context omitted.
I actually came from FreeBSD to Debian 8 years ago and the funny thing is that I don't remember editing rc scripts anywhere near as often as I edited sysvinit scripts on Debian. But that could easily be explained by the average complexity of services increasing along with my career path into Linux and Devops. I don't remember any clear differences between sysvinit and rc, the scripting is still left up to the user wh…
> scripting is still left up to This is commonly provided by the port maintainer - I haven't conducted a survey but I'm pretty confident that service scripts in FreeBSD ports rarely make it into rc.d without a deliberate freebsdization.
Re: Linux greybeards release beta of systemd-free Debian fork
#179Earlier quoted context omitted.
I actually came from FreeBSD to Debian 8 years ago and the funny thing is that I don't remember editing rc scripts anywhere near as often as I edited sysvinit scripts on Debian. But that could easily be explained by the average complexity of services increasing along with my career path into Linux and Devops. I don't remember any clear differences between sysvinit and rc, the scripting is still left up to the user wh…
> I don't remember any clear differences between sysvinit and rc van Smoorenburg rc and Mewburn rc are noticably different. * https://news.ycombinator.com/item?id=11550802 They are both rc, by the way. Don't conflate init and rc. > If you want to add more complexity you can write a start script for the service but that should not be the norm. In some fields, it appears that it is. * http://homepage.ntlworld.com./jona…
The biggest problem with java is knowing when the service is started. And that's actually a problem with other clustered services like wsrep in mariadb for example. You need to get an OK from the service, by checking logs or APIs, before you know that the restart worked.
So services like that will always require an added layer of abstraction. But that's not the norm, far from it.
Re: Linux greybeards release beta of systemd-free Debian fork
#180Earlier quoted context omitted.
For point 2, I think you can use: ps -eLf | grep '\[' I put in a grep root for good measure: ps -eLf | grep '\[' | grep root Incidentally, why would a zombie process need to be reparented? Surely it has just not been removed from the process table and all that needs to occur is to remove it fully... I can understand reparenting an orphan process, but a zombie process?
A ps roughly like that is how I got the number. That doesn't explain what they do. I'm sure I could dig into kernel sources, but... for instance, why am I running "xfsalloc", "xfs_mru_cache", and "xfslogd" when I have no XFS file systems? The point I'm making is not so much that I'm curious (although I am), but that the kernel is exempt from the scrutiny that systemd gets, and the kernel has a ton of fragile crap run…
I just tested this out:
chris@libreoffice-ia64:~$ ps -eLf | grep '\[' | grep xfs
chris@libreoffice-ia64:~$ sudo modprobe xfs
[sudo] password for chris:
chris@libreoffice-ia64:~$ ps -eLf | grep '\[' | grep xfs
root 6731 2 6731 0 1 16:53 ? 00:00:00 [xfsalloc]
root 6736 2 6736 0 1 16:53 ? 00:00:00 [xfs_mru_cache]
chris@libreoffice-ia64:~$
chris@libreoffice-ia64:~$ sudo rmmod xfs
chris@libreoffice-ia64:~$ ps -eLf | grep '\[' | grep xfs
chris@libreoffice-ia64:~$