Bug 57286 - umount changes /etc/mtab in case of a failure
Summary: umount changes /etc/mtab in case of a failure
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: mount
Version: 7.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Elliot Lee
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-12-08 20:40 UTC by jfalk
Modified: 2007-04-18 16:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-08-13 16:32:26 UTC
Embargoed:


Attachments (Terms of Use)
fix (598 bytes, patch)
2001-12-08 20:45 UTC, jfalk
no flags Details | Diff
Improved, less intrusive fix (against mount-2.11g-5). (663 bytes, patch)
2002-07-23 14:11 UTC, diego.santacruz
no flags Details | Diff

Description jfalk 2001-12-08 20:40:58 UTC
Description of Problem:
umount fails but changes /etc/mtab

Version-Release number of selected component (if applicable):
mount-2.11m-1
but versions before this too

How Reproducible:
umount -f -a -t nfs 2>/dev/null

Steps to Reproduce:
1. Mount a nfs share
2. Now use a file on this share on keep on using it.
   This will make the kernel syscall fail with EBUSY.
3. try to umount with 'umount -f -a -t nfs 2>/dev/null'
   don't forget 2>/dev/null it's needed for the failure to
   happen !!!
 
Actual Results:
umount fails but alters /etc/mtab
the entry for the nfs share will have disappeared

Expected Results:
/etc/mtab should not have changed


Additional Information:

Comment 1 jfalk 2001-12-08 20:45:25 UTC
Created attachment 40147 [details]
fix

Comment 2 diego.santacruz 2002-07-23 12:19:48 UTC
I can also confirm this problem with mount-2.11g-5.
This also happens when mount is run from initlog, which happens in the
initscripts. Therefore it is not a rarely occuring bug.

As a consequence the "netfs stop" script does not work correctly and leaves NFS
mounts alive when a process is using the mount. The first umount attempt will
erroneously delete the mount entry from /etc/mtab (without having umounted the
fs since it's busy), then the script goes on killing the problematic process,
and the successive "mount -f -a -t nfs" calls will do nothing since no NFS entry
appears in /etc/mtab any longer, leaving the NFS mount alive.

This is serious since, because of this bug, the "netfs stop" script will leave
"hidden" NFS mounts lurking. By "hidden" I mean that mount will not show them,
but they appear in /proc/mounts.

I'm using RedHat 7.2 on a laptop and this is biting me very often (since apm
suspend runs netfs stop). I would appreciate very much if it got fixed and a new
RPM got released for 7.2 and all other versions suffering from this.

Thanks in advance.

Comment 3 diego.santacruz 2002-07-23 14:11:44 UTC
Created attachment 66564 [details]
Improved, less intrusive fix (against mount-2.11g-5).

Comment 4 Elliot Lee 2003-08-13 16:32:26 UTC
This fix appears to be in util-linux-2.11y, so the latest dist release should be fine. I don't 
plan on releasing a 7.x erratum with the fix.

Apologies for the loooong delay.


Note You need to log in before you can comment on or make changes to this bug.