[Soc-coordination] Weekly report (9th week) - Debian GNU/Hurd Debianish initialization
4winter at informatik.uni-hamburg.de
4winter at informatik.uni-hamburg.de
Fri Aug 16 20:22:50 UTC 2013
.. link:
.. description:
.. tags: gsoc, debian, hurd
.. date: 2013/08/16 17:07:22
.. title: All the important bits are there - please test and review :)
.. slug: all-the-important-bits-are-there-please-test-and-review
Finally, more bootlog-pr0n::
start ext2fs: Hurd server bootstrap: ext2fs[device:hd0s1] exec init proc auth
INIT: version 2.88 booting
Using makefile-style concurrent boot in runlevel S.
Activating swap...done.
Checking root file system...fsck from util-linux 2.20.1
hd2 : tray open or drive not ready
hd2 : tray open or drive not ready
hd2 : tray open or drive not ready
hd2 : tray open or drive not ready
end_request: I/O error, dev 02:00, sector 0
/dev/hd0s1: clean, 44680/181056 files, 292234/723200 blocks
done.
Activating lvm and md swap...(default pager): Already paging to partition hd0s5!
done.
Checking file systems...fsck from util-linux 2.20.1
hd2 : tray open or drive not ready
hd2 : tray open or drive not ready
end_request: I/O error, dev 02:00, sector 0
done.
Cleaning up temporary files... /tmp.
Mounting local filesystems...done.
Activating swapfile swap...(default pager): Already paging to partition hd0s5!
done.
df: Warning: cannot read table of mounted file systems: No such file or directory
Cleaning up temporary files....
Configuring network interfaces...inetutils-ifconfig: invalid arguments
ifup: failed to open pid file /run/network/ifup-/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
DHCPDISCOVER on /dev/eth0 to 255.255.255.255 port 67 interval 8
DHCPREQUEST on /dev/eth0 to 255.255.255.255 port 67
DHCPOFFER from 10.0.2.2
DHCPACK from 10.0.2.2
can't create /var/lib/dhcp/dhclient./dev/eth0.leases: No such file or directory
bound to 10.0.2.15 -- renewal in 34744 seconds.
done.
Cleaning up temporary files....
Setting up X socket directories... /tmp/.X11-unix /tmp/.ICE-unix.
INIT: Entering runlevel: 2
Using makefile-style concurrent boot in runlevel 2.
Starting enhanced syslogd: rsyslogd.
Starting deferred execution scheduler: atd.
Starting periodic command scheduler: cron.
Starting system message bus: dbusFailed to set socket option"/var/run/dbus/system_bus_socket": Protocol not available.
Starting OpenBSD Secure Shell server: sshd.
unexpected ACK from keyboard
GNU 0.3 (debian) (console)
login: root
root at debian:~# shutdown -h now
Broadcast message from root at debian (console) (Fri Aug 16 20:02:47 2013):
The system is going down for system halt NOW!
INIT: Switching to runlevel: 0root at debian:~#
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.
task c10f72a8 deallocating an invalid port 2098928, most probably a bug.
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.
Unmounting weak filesystems...umount: /etc/mtab: Warning: duplicate entry for device /dev/hd0s1 (/dev/cons)
umount: could not find entry for: /dev/cons
done.
Unmounting local filesystems...done.
mount: cannot remount /: Device or resource busy
Will now halt.
init: notifying pfinet of shutdown...init: notifying tmpfs swap of shutdown...init: notifying tmpfs swap of shutdown...init: notifying tmpfs swap of shutdown...init: notifying ext2fs device:hd0s1 of shutdown...init: halting Mach (flags 0x8)...
In tight loop: hit ctl-alt-del to reboot
(You might note that df complains about not being able to read the
mtab file. That is because it has been built with `_PATH_MOUNTED`
being `/var/run/mtab`. This will correct itself when the `coreutils`
package is being rebuilt against a patched libc.)
I spent my last two weeks with polishing my patch series, that meant a
lot of package rebuilds and that means a lot of waiting (even more so
on the Hurd, short version: fakeroot-hurd could be fast but is not yet
working properly, fakeroot-tcp `is slow
<http://www.gnu.org/software/hurd/open_issues/pfinet_timers.html>`_)
and thus some frustration ;)
Also I had to pay special attention so that the upgraded packages
could be installed without accidentally breaking anything in the
process. Making sysvinit pid 1 is surprisingly tricky in this regard
since it breaks the ABI and requires a libc fix that also worked with
the current Hurd servers.
Here are the patches:
* The mtab translator (v4) provides `/proc/mounts`:
http://lists.gnu.org/archive/html/bug-hurd/2013-07/msg00259.html
* When I wrote `umount` I thought I implemented all the flags used by
the `initscripts` package. Turns out I forgot `-d`. umount.patch
(v2):
http://lists.gnu.org/archive/html/bug-hurd/2013-08/msg00018.html
* Make sysvinit pid 1 (sysvinit kinda requires that), fix killall5
(that was freezing the system before) (v2):
http://lists.gnu.org/archive/html/bug-hurd/2013-08/msg00020.html
* Making sysvinit pid 1 breaks the ABI, since the glibc assumes
`/hurd/init` to have pid 1:
http://lists.gnu.org/archive/html/bug-hurd/2013-08/msg00046.html
http://sourceware.org/ml/libc-alpha/2013-08/msg00205.html
* So now killall5 is not freezing the system anymore (actually it
froze all processes but most importantly the procfs translator
providing `/proc` and it then tried to walk over `/proc` which
obviously blocked killall5 itself). Cool. But then it looks into
`/proc/*/stat` for the fields `start_code` and `end_code`. So I dug
into the exec server where the ELF decoding happens and handed this
to the proc server, but the procfs translator has to make use of
this:
http://lists.gnu.org/archive/html/bug-hurd/2013-08/msg00017.html
* Patch series for the sysvinit package (v2). This contains a
`runsystem.sysv` that can be enabled using
`update-alternatives --config runsystem` and several small fixes:
http://lists.gnu.org/archive/html/bug-hurd/2013-08/msg00038.html
So I had some spare time on my hand while waiting for numerous package
rebuilds and I took this as an opportunity to read papers about Mach
and to familiarize myself with mig, the *Mach Interface
Generator*. While I have used it in the past, I had not yet looked at
its implementation. And I had to patch the exec server, and there was
both code implementing a questionable feature (on-demand unzipping of
binaries) and code that was not even compiled (courtesy of the
preprocessor) and had probably bit-rot by now. So I figured I could
spend my time doing some cleanups:
* Cleanups for the exec server:
http://lists.gnu.org/archive/html/bug-hurd/2013-08/msg00049.html
* Cleanups for mig:
http://lists.gnu.org/archive/html/bug-hurd/2013-08/msg00055.html
I have rebuild all the necessary packages and uploaded them into an
apt repository::
deb http://teythoon.cryptobitch.de/gsoc/heap/debian unstable main
Please use unstable for now. Also make sure that you have a recovery
plan for your Debian/Hurd installation if anything goes wrong. For
your convenience there's a seed tarball containing packages with the
appropriate sources.list.d snippets and the repository key:
https://teythoon.cryptobitch.de/gsoc/heap/debian/seed.tar
If you want to switch to the new `runsystem.sysv`, do::
# update-alternatives --config runsystem
Whenever you switch runsystems, please use `reboot-hurd` to reboot the
system. This is the most robust way.
Known issues:
* procfs hardcodes the default kernel pid to 2. This breaks
`/proc/uptime` and any program relying on it, most notably top and
friends. Until this is properly fixed, you can do::
# settrans -apfg /proc /hurd/procfs -c -k 3
* The mtab translator should probably try to filter out non-filesystem
translators. `df` complains loudly about `/dev/cons` for example.
Next week I will address the `network related issues
</gsoc/#networkrelatedissues>`_. By now they are the source of most of
the error messages in the bootlog.
More information about the Soc-coordination
mailing list