There is no spoon...
Posted: | More posts about gsoc debian hurd |
This is the Hurd shutting down:
root@debian:~# init 0 INIT: Switching to runlevel: 0 INIT: Sending processes the TERM signal INIT: Sending processes the KILL signal Using makefile-style concurrent boot in runlevel 0. Stopping deferred execution scheduler: atd. Asking all remaining processes to terminate...done. All processes ended within 1 seconds...done. Stopping enhanced syslogd: rsyslogd. Deconfiguring network interfaces...ifdown: failed to open pid file /run/network/ifdown-/dev/eth0.pid: No such file or directory Internet Systems Consortium DHCP Client 4.2.2 Copyright 2004-2011 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ can't create /var/lib/dhcp/dhclient./dev/eth0.leases: No such file or directory Listening on Socket//dev/eth0 Sending on Socket//dev/eth0 /bin/sh: 1: ifconfig: not found done. Deactivating swap...swapoff: /dev/hd0s5: 177152k swap space done. mount: cannot remount /: Device or resource busy Will now halt. INIT: no more processes left in this runlevel
The important line is the one saying Asking all remaining processes to terminate...done.. What happens there is that /sbin/killall5 is run, actually does its job and the system survives that. What was needed to fix killall5 is to mark some processes (all translators being started as root as well as any essential processes) as important and to exempt them from being frozen and killed by killall5. Furthermore it was necessary to fill in the correct values for the start_code and end_code fields of the /proc/*/stat records (this used to be an issue for Debian/kFreeBSD as well).
I am still in the process of cleaning up the patch series, I will finish that first thing Monday morning. I also spent my time polishing my mtab translator, the patch series is in its fourth revision and I consider it ready for inclusion:
I also had this moment of clarity and enlightenment. For the first time I thought I finally understood what the Hurd really was. It is just a bunch of Mach programs that talk to each other in this really strange language and as a result they behave very much like the equivalent programs would on a different POSIX-like system. This is of course hidden away from the application programmer in our libc. This language is a mere convention, Richard calls this system personality. On some other level I have known this for a long time, but I never grasped the profound implications for users and developers, and for composability and the security of the system as a whole. I will try to show some of the cool stuff that can be done with such a system, stuff that is hard to do on monolithic kernels.
And I had to patch the exec server. You know what they say, once you looked into /hurd/exec, there is no going back.
I am very happy to report that I addressed all three major issues I identified in my second week. Next week I will clean up my initscripts patch series and submit it for inclusion. I will also rebuild the hurd, sysvinit and libc packages with all my patches included for broader testing. And if I ever run out of stuff to do first, I will have to look at the network related issues.