Comment 31 for bug 579858

Revision history for this message
Orticio Jlgtgutisu (jlgutisu3) wrote : RE: [Bug 579858] Re: umount segfault on shutdown when unmounting autofs mountpoint

Por favor, lenguaje en español

> Date: Wed, 26 Jan 2011 16:56:12 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 579858] Re: umount segfault on shutdown when unmounting autofs mountpoint
>
> Both uploaded (maverick will wait in the queue for ubuntu-sru approval),
> thanks Surbhi!
>
> --
> You received this bug notification because you are subscribed to Ubuntu
> ubuntu-10.04.2.
> https://bugs.launchpad.net/bugs/579858
>
> Title:
> umount segfault on shutdown when unmounting autofs mountpoint
>
> Status in “util-linux” package in Ubuntu:
> Fix Released
> Status in “util-linux” source package in Lucid:
> Fix Committed
> Status in “util-linux” source package in Maverick:
> Triaged
> Status in “util-linux” source package in Natty:
> Fix Released
>
> 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.d/umountfs calls umount to unmount filesystems it reads from /proc/mounts. Several Vars are created by the script and unmounted then. I modified the script to get the vars content.
>
> PROTECTED_MOUNTS rootfs / rootfs rw 0 0 none /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0 none /proc proc rw,nosuid,nodev,noexec,relatime 0 0 none /dev devtmpfs rw,relatime,size=1988516k,nr_inodes=497129,mode=755 0 0 none /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0 /dev/mapper/lvm_vg-root / ext4 rw,noatime,errors=remount-ro,barrier=1,data=ordered 0 0
> WEAK_MTPTS /sys/kernel/security /sys/kernel/debug /sys/fs/fuse/connections
> 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)
> ProcVersionSignature: Ubuntu 2.6.32-22.33-generic 2.6.32.11+drm33.2
> 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
>
>