umount segfault on shutdown when unmounting autofs mountpoint
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
util-linux (Ubuntu) |
Fix Released
|
High
|
Surbhi Palande | ||
Lucid |
Fix Released
|
High
|
Surbhi Palande | ||
Maverick |
Fix Released
|
High
|
Unassigned | ||
Natty |
Fix Released
|
High
|
Surbhi Palande |
Bug Description
Binary package hint: autofs5
After I started using autofs5 in lucid I got filesystem checks on every boot up on my seperated /boot and /home partitions. They were not cleanly unmounted.
I tried to research why:
On shutdown /etc/init.
PROTECTED_MOUNTS rootfs / rootfs rw 0 0 none /sys sysfs rw,nosuid,
WEAK_MTPTS /sys/kernel/
REG_MTPTS /home/flo/.gvfs /mnt/autofs /boot /home
TMPFS_MTPTS /tmp
The problematic line is REG_MTPTS. The call to umount finally looks like this:
fstab-decode umount -f -v -r -d $REG_MTPTS
which expands to (in my case)
fstab-decode umount -f -v -r -d /home/flo/.gvfs /mnt/autofs /boot /home
When hiding plymouth screen at shutdown, I got a glimpse on a Segfault message, after the umounting outputs.
The segfault occurs when trying to unmount /mnt/autofs, so /boot and /home never get unmounted and are unclean on next boot. So thats the reason for the symptom.
I further tried to unmount /mnt/autofs with gdb to trace the problem. The segfault happens in strlen and is 100% reproducable. See the output file attached.
When i stop the autofs daemon before trying to unmount /mnt/autofs, everything is fine, since the daemon removes the mountpoint anyways when exiting.
So there may be two problems/solutions:
First: Why does umount segfault?
And: Is autofs not correctly stoped by upstart, and isn't that the real problem/solution? If autofs daemon would be stopped before executing umountfs, it wouldn't try to unmount the autofs mountpoint.
Additional attachments: output of: cat /proc/mounts, auto.* files
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: autofs5 (not installed)
ProcVersionSign
Uname: Linux 2.6.32-22-generic x86_64
Architecture: amd64
Date: Thu May 13 10:40:16 2010
ProcEnviron:
PATH=(custom, user)
LANG=en_US.utf8
SHELL=/bin/bash
SourcePackage: autofs5
affects: | autofs5 (Ubuntu) → sysvinit (Ubuntu) |
tags: | added: glucid |
Changed in sysvinit (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → High |
Changed in sysvinit (Ubuntu Lucid): | |
importance: | Undecided → High |
Changed in sysvinit (Ubuntu Natty): | |
status: | Confirmed → New |
Changed in sysvinit (Ubuntu Lucid): | |
status: | New → Confirmed |
assignee: | nobody → Canonical Foundations Team (canonical-foundations) |
affects: | sysvinit (Ubuntu Lucid) → util-linux (Ubuntu Lucid) |
Changed in util-linux (Ubuntu Lucid): | |
status: | Confirmed → Triaged |
Changed in util-linux (Ubuntu Lucid): | |
status: | Triaged → In Progress |
Changed in util-linux (Ubuntu Lucid): | |
assignee: | Canonical Foundations Team (canonical-foundations) → Surbhi Palande (csurbhi) |
Changed in util-linux (Ubuntu Maverick): | |
importance: | Undecided → High |
status: | New → Triaged |
Changed in util-linux (Ubuntu Maverick): | |
milestone: | none → maverick-updates |
This patch to umountfs initscript (which doesn't belong to autofs5 package, but initscripts!) solves the problem effectively.
It adds autofs to the file system types, that the script doesn't try to unmount.
If we call it a solution or a workaround, I don't know..