umount segfault on shutdown when unmounting autofs mountpoint

Bug #579858 reported by Florian Achleitner on 2010-05-13
92
This bug affects 14 people
Affects Status Importance Assigned to Milestone
util-linux (Ubuntu)
High
Surbhi Palande
Lucid
High
Surbhi Palande
Maverick
High
Unassigned
Natty
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.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

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..

christoph (fragfutter) wrote :

I have the same issue.

I would say the bug is in unmount (should not segfault). The workaround is fine for now.

Michael Onnen (michael-onnen) wrote :

Yes, this fixes the issue (patch is reversed though)

affects: autofs5 (Ubuntu) → sysvinit (Ubuntu)

Sorry for the reversed patch.

Paul Crawford (psc-sat) wrote :

The fundamental problem stems from line 254 in util-linux-2.17.2/mount/umount.c where, when busy, it has this step:

remnt.mnt_type = remnt.mnt_fsname = NULL;

Then it calls update_mtab(node, &remnt) 4 lines below this when nomtab is zero, leading to the null pointer manipulation that ultimately kills the process.

My question is why are the mnt_type and mnt_fsname being cleared but not set to a sensible value? Neither are mnt_freq or mnt_passno for that matter, suggesting that using memset() to clear the remnt structure would be smarter, followed by assigning the sensible value to the type & name.

Paul Crawford (psc-sat) wrote :

I found what may be the culprit in fstab.c where it would attempt to add to the list the "remounted" autofs mount, but as it was not already mounted (and in /etc/mntab ?) this added to the list the NULL values. This case is also common to mount, and a side effect of this seems to be the eleimination of some odd messages about failing to mount CIFS mounts in fstab (see bug #575293)

Using the package 'mount' (util-linux-2.17.2/mount) and the attached changes to fstab.c seems to work for me.

Paul Crawford (psc-sat) wrote :

No, it seems the messages of bug #575293 as not changed by this, there must be other reasons.

Karel Zak (kzak) wrote :

Fixed in upstream repository -- commit 973d9cf9c6092d94a3e5b54e5b8e7cd4e2d705d7.

Paul Crawford (psc-sat) wrote :

Thanks Karel - do you have any idea when this will make it in to 10.04?

Jeremy Zimmer (jeremyz) on 2010-12-14
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)
Robbie Williamson (robbiew) wrote :

Given there is a patch, I'd like to try and get this into 10.04.2 if possible.

Changed in sysvinit (Ubuntu Lucid):
milestone: none → ubuntu-10.04.2
Robbie Williamson (robbiew) wrote :

FYI, I checked and the fix applied by Karel Zak is in Maverick and Natty.

Changed in sysvinit (Ubuntu Natty):
status: New → Invalid
Colin Watson (cjwatson) on 2011-01-19
affects: sysvinit (Ubuntu Lucid) → util-linux (Ubuntu Lucid)
Changed in util-linux (Ubuntu Lucid):
status: Confirmed → Triaged
Surbhi Palande (csurbhi) on 2011-01-20
Changed in util-linux (Ubuntu Lucid):
status: Triaged → In Progress
Colin Watson (cjwatson) on 2011-01-20
Changed in util-linux (Ubuntu Lucid):
assignee: Canonical Foundations Team (canonical-foundations) → Surbhi Palande (csurbhi)
Surbhi Palande (csurbhi) wrote :

Please do consider this patch for Lucid.

Colin Watson (cjwatson) on 2011-01-20
Changed in util-linux (Ubuntu Maverick):
importance: Undecided → High
status: New → Triaged
Robbie Williamson (robbiew) wrote :

"FYI, I checked and the fix applied by Karel Zak is in Maverick and Natty." That was not correct...there is *A* fix applied by Karel, and there are fixes to mount.c...but nothing for this issue. Corrected the bug.

Changed in util-linux (Ubuntu Natty):
status: Invalid → Triaged
Colin Watson (cjwatson) wrote :

Surbhi: Looks good. I'm just correcting "maverick" to "lucid-proposed" in the changelog.

Would you also prepare updates for maverick and natty, please? It turns out that they're both affected after all, so we should carry the fix forward.

Accepted util-linux into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in util-linux (Ubuntu Lucid):
status: In Progress → Fix Committed
tags: added: verification-needed

I still see the segfault when rebooting.

Pausing the VM I am testing with at just the right time, here is a transcript of what I have on the console when it reboot:

 * Unmounting local filesystems...
umount2: Device or resource busy
umount: /srv busy - remounted read-only
Segmentation fault

Paul Crawford (psc-sat) wrote :

Just got the update (I assume current?) and find the patch of comment 15 has been included for umount.c but nothing appears to have been done to fstab.c to prevent NULL names being passed through (along the lines of my patch of comment 9 above).

This, I assume, explains why Etienne Goyer still sees the segafault. Please can someone explain why the passing of a NULL name should still be allowed if it causes this?

Paul Crawford (psc-sat) wrote :

I did a couple of tests yesterday on my automounted nfs share, and it appeared to have fixed the segfault there.
However, today when I shut down I pressed 'Esc' to see the messages and I got a very brief glimpse of a message about the / mount being busy, maybe something else (can't say if it was a segfault message) and then the machine powered off immediately. On restarting, I found messages in syslog about orphaned inodes in the root file system, THAT IS BAD!
My own system is running 32-bit 10.04 and I have separate partitions for /, /tmp, and /home, so most likely the file(s) in use for / were log messages (pulseaudio is particularly bad at loads of pointless rate limiting messages, etc, and I had been doing stuff with sound). But there is no excuse for not unmounting properly!
Given the report of Etienne Goyer, and my experience today, there is clearly something still not correct about umount.

On Sat, 2011-01-22 at 18:57 +0000, Paul Crawford wrote:
> I did a couple of tests yesterday on my automounted nfs share, and it appeared to have fixed the segfault there.
> However, today when I shut down I pressed 'Esc' to see the messages and I got a very brief glimpse of a message about the / mount being busy, maybe something else (can't say if it was a segfault message) and then the machine powered off immediately. On restarting, I found messages in syslog about orphaned inodes in the root file system, THAT IS BAD!
> My own system is running 32-bit 10.04 and I have separate partitions for /, /tmp, and /home, so most likely the file(s) in use for / were log messages (pulseaudio is particularly bad at loads of pointless rate limiting messages, etc, and I had been doing stuff with sound). But there is no excuse for not unmounting properly!
> Given the report of Etienne Goyer, and my experience today, there is clearly something still not correct about umount.
>

Paul, is it possible that you hit bug #672177, which causes / to not be
unmountable whenever upstart or libc6 is upgraded?

As to your hypothesis that it was logs, rsyslog *should* be stopped by
the time /etc/init.d/umountroot runs, though there's actually no
guarantee as the SIGTERM is sent/received/executed in parallel with the
rest of the shutdown. That is bug #688541, but I think sounds less
likely.

Paul Crawford (psc-sat) wrote :

Clint, yes that may well be the case. I had assumed that the only recently active for writing files would have been in /var as it had been well over the 30 sec commit time since any changes/updates had been performed. However, I had not considered something like libc6 being held open by something active.
I was surprised by how suddenly it went off, as usually you get a brief glimpse of the power off message, so wondered if umount or its calling process was crashing out badly, and could have otherwise done something more to commit the file system cleanly.

Darin Tay (dtay) wrote :

Testing here, the packages in proposed appear to work. I'm no longer seeing a segfault on shutdown, and the filesystems are no longer fsck'ing on startup when cleanly rebooted.

Can't explain why I'm seeing different results from Etienne, but seems fine here.

Martin Pitt (pitti) wrote :

Please fix this in natty ASAP, so that the fix can actually go to -updates.

tags: added: verification-done
removed: verification-needed
Changed in util-linux (Ubuntu Natty):
assignee: nobody → Surbhi Palande (csurbhi)
milestone: none → natty-alpha-3
Surbhi Palande (csurbhi) wrote :

Upstream patch applied to maverick-updates. Please consider merging.

Colin Watson (cjwatson) wrote :

Both uploaded (maverick will wait in the queue for ubuntu-sru approval), thanks Surbhi!

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package util-linux - 2.17.2-3.3ubuntu4

---------------
util-linux (2.17.2-3.3ubuntu4) natty; urgency=low

  * Fixes a segfault on umount, caused due to an empty mtab entry.
    (LP: #579858)
 -- Surbhi Palande <email address hidden> Wed, 26 Jan 2011 16:54:24 +0000

Changed in util-linux (Ubuntu Natty):
status: Triaged → Fix Released
Orticio Jlgtgutisu (jlgutisu3) wrote :
Download full text (3.7 KiB)

Por favor lenguaje Español

> Date: Wed, 26 Jan 2011 17:00:26 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 579858] Re: umount segfault on shutdown when unmounting autofs mountpoint
>
> This bug was fixed in the package util-linux - 2.17.2-3.3ubuntu4
>
> ---------------
> util-linux (2.17.2-3.3ubuntu4) natty; urgency=low
>
> * Fixes a segfault on umount, caused due to an empty mtab entry.
> (LP: #579858)
> -- Surbhi Palande <email address hidden> Wed, 26 Jan 2011 16:54:24 +0000
>
> ** Changed in: util-linux (Ubuntu Natty)
> Status: Triaged => Fix Released
>
> --
> 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 sto...

Read more...

Orticio Jlgtgutisu (jlgutisu3) wrote :
Download full text (3.4 KiB)

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+...

Read more...

Orticio Jlgtgutisu (jlgutisu3) wrote :
Download full text (3.3 KiB)

Por favor, lenguaje en español

> Date: Wed, 26 Jan 2011 16:55:45 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 579858] Re: umount segfault on shutdown when unmounting autofs mountpoint
>
> ** Branch linked: lp:ubuntu/util-linux
>
> --
> 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_6...

Read more...

Orticio Jlgtgutisu (jlgutisu3) wrote :
Download full text (3.6 KiB)

Por favor, lenguaje en español

> Date: Wed, 26 Jan 2011 16:45:44 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 579858] Re: umount segfault on shutdown when unmounting autofs mountpoint
>
> Upstream patch applied to maverick-updates. Please consider merging.
>
> ** Attachment added: "debdiff of util-linux between 1) maverick-updates and 2) upstream patch applied to maverick-updates (edit)"
> https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/579858/+attachment/1808539/+files/debdiff_maverick-proposed
>
> --
> 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:
> Triaged
> 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:
> Triaged
>
> 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.
...

Read more...

Orticio Jlgtgutisu (jlgutisu3) wrote :
Download full text (3.6 KiB)

NO ENTIENDO INGLES. (Por favor solo en español)

> Date: Wed, 26 Jan 2011 16:45:44 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 579858] Re: umount segfault on shutdown when unmounting autofs mountpoint
>
> Upstream patch applied to maverick-updates. Please consider merging.
>
> ** Attachment added: "debdiff of util-linux between 1) maverick-updates and 2) upstream patch applied to maverick-updates (edit)"
> https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/579858/+attachment/1808539/+files/debdiff_maverick-proposed
>
> --
> 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:
> Triaged
> 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:
> Triaged
>
> 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 au...

Read more...

Orticio Jlgtgutisu (jlgutisu3) wrote :
Download full text (3.5 KiB)

NO ENTIENDO EL INGLES. (Por favor solo ESPAÑOL)

> Date: Wed, 26 Jan 2011 16:47:25 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 579858] Re: umount segfault on shutdown when unmounting autofs mountpoint
>
>
> ** Attachment added: "debdiff of util-linux between 1)natty and 2) upstream patch applied to natty"
> https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/579858/+attachment/1808541/+files/debdiff_natty-unreleased
>
> --
> 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:
> Triaged
> 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:
> Triaged
>
> 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
>
> Probl...

Read more...

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package util-linux - 2.17.2-0ubuntu1.10.04.2

---------------
util-linux (2.17.2-0ubuntu1.10.04.2) lucid-proposed; urgency=low

  * Fixes a segfault on umount, caused due to an empty mtab entry.
    (LP: #579858)
 -- Surbhi Palande <email address hidden> Thu, 20 Jan 2011 19:46:34 +0200

Changed in util-linux (Ubuntu Lucid):
status: Fix Committed → Fix Released

Accepted util-linux into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in util-linux (Ubuntu Maverick):
status: Triaged → Fix Committed
Changed in util-linux (Ubuntu Maverick):
milestone: none → maverick-updates
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package util-linux - 2.17.2-0ubuntu1.10.10.2

---------------
util-linux (2.17.2-0ubuntu1.10.10.2) maverick-proposed; urgency=low

  * Fixes a segfault on umount, caused due to an empty mtab entry.
    (LP: #579858)
 -- Surbhi Palande <email address hidden> Wed, 26 Jan 2011 18:25:55 +0200

Changed in util-linux (Ubuntu Maverick):
status: Fix Committed → Fix Released

It looks that I have a similar issue in natty: Bug 775014 Only partial unmounting during shutdown.

That "partial" unmounting is not correct: checking in dmesg I saw that any filesystem fails to unmount. Since I updated to Ubuntu 11-04 after the patches were applied, I wonder whether there was a patch reversal.

Bernhard

util-linux:
  Installiert: 2.17.2-9.1ubuntu4
  Kandidat: 2.17.2-9.1ubuntu4
  Versionstabelle:
 *** 2.17.2-9.1ubuntu4 0
        500 http://mirror.informatik.uni-mannheim.de/pub/linux/distributions/ubuntu/ natty/main i386 Packages
        100 /var/lib/dpkg/status

To post a comment you must log in.