News for hackers. Stuff that matters.
Re:Linux greybeards release beta of systemd-free Debian fork by geofft on Saturday April 30, 2016 @11:14AM (#11601992)
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 kernel? Why does pid 1 get this much scrutiny, but the kernel, which definitely can't die, gets a free pass? On my system there are 77 kernel threads. Seventy-seven! What are they all doing??

And there are plenty of alternative kernels you can use. Multiple ones even have Linux binary compatibility.

3. Is the argument for suckless init the same as that for EWONTFIX init (on which it is based)? If so, would a fork of systemd that split it into two processes, PID 1 that reaps reparented zombies and tells PID 2 about it (over a one-way pipe, so PID 1 has no increased attack surface), be an acceptable option?

Re:Linux greybeards release beta of systemd-free Debian fork by chris_wot on Saturday April 30, 2016 @12:54PM (#11602449)
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?
Re:Linux greybeards release beta of systemd-free Debian fork by geofft on Sunday May 01, 2016 @10:40PM (#11608923)
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 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 by chris_wot on Monday May 02, 2016 @02:55AM (#11609584)
You either have the xfs filesystem module loaded or compiled into your kernel.

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:~$
Re:Linux greybeards release beta of systemd-free Debian fork by geofft on Monday May 02, 2016 @09:55AM (#11611338)
I mean, I know exactly why it's there. :-) GRUB's os-prober is trying to mount all filesystems as all possible types, which autoloads xfs.ko.

My point isn't so much what my three kernel threads are doing as why nobody asks these questions, in general, about the kernel. Just about every criticism of systemd applies double to the kernel, but nobody is forking Debian to replace the kernel. (And very few people are contributing to the existing efforts already in Debian to officially support alternative kernels.)

Re:Linux greybeards release beta of systemd-free Debian fork by chris_wot on Monday May 02, 2016 @10:21PM (#11617368)
Ah, I'm following :-) I think perhaps the kernel is more esoteric than systemd, and as a team they have proven themselves over time. I think they get a fair amount of scrutiny from competitors (the BSDs, and Microsoft) and they have a very robust development process so that might explain why it's not as controversial.
Re:Linux greybeards release beta of systemd-free Debian fork by digi_owl on Tuesday May 03, 2016 @03:45AM (#11618688)
The kernel also lives in kernel space, so unless one go micro-kernel, and dumps everything but the bare minimum into user space, a kernel will always be a big blob of code (most of it drivers, btw).