As Michael sugested it is probably better to track bugs with the bugtracker.
When shutting down my system stops with a Segfault right after the message "stopping remount-rootfs.service".
This always happens if I have an entry in the fstab with the option comment=systemd.automount. At least for me it only happens with that option and never happened without.
Unmount everything cleanly and shutdown/restart.
Version of Systemd:
git commit 9bee76ee44a
Details and Context:
With Gentoo I had a nasty segfault on shutdown/reboot. I have not been able to track down the bug reasonably enough because while recompiling stuff with newer libs and Debug info I totally broke my system :(.
So I reinstalled it all by migrating from Gentoo to Exherbo.
Shutdown and Reboot worked quite well until I copied over the fstab from my old system.
I found out that it always crashes with this segfault when I have the option "comment=systemd.automount" on any drive (filesystem doesn't matter tested ntfs and ext4, Philantrop tested nfs). It doesn't matter if the automount was used and the drive is mounted or not and the drive is still unmounted.
I tried to use gdb to produce a backtrace but I'm still struggling with the debug symbols (help appreciated):
#0 0x00007f106a20bedb in raise () from /lib64/libpthread.so.0
#1 0x000000000040865b in crash ()
#2 <signal handler called>
#3 0x0000000000468236 in automount_check_gc ()
#4 0x00000000004606b5 in unit_add_to_gc_queue ()
#5 0x0000000000460851 in unit_free ()
#6 0x000000000040ac48 in manager_clear_jobs_and_units ()
#7 0x0000000000411adb in manager_free ()
#8 0x0000000000408cf4 in main ()
I hope this information is enough to debug that Segfault. With instructions I can provide further information.
Created attachment 40812 [details]
gdb backtrace of /core
Confirming this with systemd-0.15 on x86_64. Backtrace attached.
Well I'm on an 64Bit machine too.
Linux localhost 18.104.22.168 #1 SMP PREEMPT Mon Nov 22 22:27:59 UTC 2010 x86_64 GNU/Linux
despite the gentoo in the kernel string it's not really gentoo... (just the old config).
Another thing I realized: It does not help to deactivate the automount stuff.
I tried to systemctl stop [unit].automount and systemctl stop [unit].mount aswell as removing the fstab entry.having all that stuff done I think there should be almost nothing left. But on halt the segfault occurs.
Another appearance: If I do a systemctl daemon-reexec I had the segfault too.
If my system is booted up with such a line in /etc/fstab (and no corresponding unit), then systemd segfaults on `systemctl poweroff`:
//pc/d /mnt/d cifs noauto,guest,comment=systemd.automount 0 0
If the system is booted up without the 'comment=systemd.automount' fstab option, there are no segfaults.
Didn't see any `systemctl daemon-reexec` crashes.
I can reproduce the bug in the following way:
Put "comment=systemd.automount" in fstab.
Access the directory so the volume is mounted.
Exit the directory and stop the .mount unit.
Do "systemctl daemon-reexec".
The segfault happens in automount_check_gc() when reading "a->mount".
I also see the problem on reboot/poweroff (but not as reproducible, maybe 60% of the time).
Fixed now in git. Please verify!
Brilliant, works here (after many, many boots) :-)
Thanks for fixing this.
Works for me too thanks :)