Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 51160 - fuser -k "umounting filesystems" during shutdown kills the shutdown script itself
Summary: fuser -k "umounting filesystems" during shutdown kills the shutdown script it...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-15 15:14 UTC by Ryan Lortie
Modified: 2004-12-18 21:59 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Lortie 2004-05-15 15:14:51 UTC
This is a regression introduced by the fix for bug 13599

If you have your 'mount' reading its mtab off of a tmpfs, then tmpfs is now unmounted by the shutdown scripts. (ie: i have /etc/mtab symlinked to /var/run/mtab which is on a tmpfs)

The code to do "Unmounting Filesystems" uses 'mount' to establish a list of filesystems to *not* unmount then uses 'cat /proc/mounts' to determine the list of filesystems to unmount.

The problem is that /proc/mounts always works and 'mount' fails to work after the tmpfs containing mtab is blown away.  This means that '/' isn't in the list of filesystems to skip unmounting.  fuser -km / is then called, and of course the shutdown script is using the root filesystem, so gets killed.

Possible solutions:
(1) Instead of using `mount | awk '{ $1 / $3 / $5 } print $3'` use `awk { $1 / $2 / $3 } print $2 /proc/mounts` (this is how I've fixed my system)
(2) (same as the alternative option suggested by the author of bug 13599)  Delay the unmounting of swap until *just before* poweroff/reboot and skip the tmpfs unmount until then.
(3) You probably have some better ideas than this.

Thanks
Comment 1 SpanKY gentoo-dev 2004-12-18 21:59:18 UTC
re-open in 1.11.8 doesnt handle this correctly