After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 84919 - Unmount volume fails
Unmount volume fails
Status: RESOLVED DUPLICATE of bug 102760
Product: nautilus
Classification: Core
Component: general
unspecified
Other other
: High major
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 81079 86114 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-06-11 19:19 UTC by Steve Tyler
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.0


Attachments
save the device number before returning on nfs and smb. (886 bytes, patch)
2002-06-19 21:18 UTC, Dave Camp
none Details | Review

Description Steve Tyler 2002-06-11 19:24:48 UTC
Package: nautilus
Severity: normal
Version: 2.0.0
Synopsis: Unmount volume fails
Bugzilla-Product: nautilus
Bugzilla-Component: general

Description:
Description of Problem:
Unmount volume fails

Steps to reproduce the problem:
1. Mount a cd
2. Right click on icon and select unmount volume
3. 

Actual Results:
Nothing happens

Expected Results:
The volume should be unmounted

How often does this happen?
Every time

Additional Information:
I have an NFS mounted home directory, it shouldn't have anything to do
with it, I only mention it because I know that there have been one or to
other issues like this that have been effected by NFS.




------- Bug moved to this database by unknown@bugzilla.gnome.org 2002-06-11 15:24 -------

Reassigning to the default owner of the component, nautilus-maint@bugzilla.gnome.org.

Comment 1 Luis Villa 2002-06-12 17:31:30 UTC
If you do 'killall fam' as root, does it work, Steve? If so, then this
is bug 69706 rearing its head again.
Comment 2 Steve Tyler 2002-06-12 18:19:44 UTC
- Mounted the CD
- Tried to unmount, failed as expected
- Did 'killall fam' as root (sudo'd)
- Tried to unmount the CD, failed
- Checked to see that no fam processes where running
- Tried to unmount the CD, failed
- Stopped xinetd 'cos I remembered that fam runs through it
- Tried to unmount the CD, failed

This would suggest that it's a different problem?
Comment 3 Alex Graveley 2002-06-14 01:27:54 UTC
Does umount'ing from the command line work (as root or otherwise)?  
If so, please run the following while the cdrom is mounted:

    lsof | grep /dev/<cdrom>

Where <cdrom> is the name of your cdrom device (probably hdc if its
not a SCSI).  Does this output anything?  If so, can you try killing
whichever application has the device open, and trying the unmount
through nautilus again?
Comment 4 Luis Villa 2002-06-14 20:53:08 UTC
Reassigning this one to dave. There are two problems here:
1) No error message anymore if you can't unmount.
2) probably has an open monitor to FAM, as killing fam (/here/) allows
me to unmount.
Comment 5 Alex Graveley 2002-06-17 11:49:45 UTC
Nautilus shouldn't be monitoring read-only volumes.  There are checks
in nautilus-monitor.c to avoid this.  So unless the bug is there, or
in the volume monitor stuff, something else must be telling fam to
watch the cdrom.
Comment 6 Alex Graveley 2002-06-17 11:55:33 UTC
Maybe I should take this one, as I know the nautilus/vfs monitor code
pretty well?
Comment 7 Luis Villa 2002-06-19 21:02:06 UTC
Alex: sure, go for it. Be aware that it isn't just a problem for RO
FSs- I'm seeing it on NFS too.
Comment 8 Dave Camp 2002-06-19 21:15:44 UTC
fwiw, I can't reproduce this with either cds or nfs.

However, selecting "Unmount Volume" on nfs fails silently (except for
a g_warning) for me.  Attaching a patch that fixes that problem.
Comment 9 Dave Camp 2002-06-19 21:18:01 UTC
Created attachment 9334 [details] [review]
save the device number before returning on nfs and smb.
Comment 10 Alex Graveley 2002-06-20 19:47:22 UTC
Steve, can you unmount the volume by right-clicking elsewhere on the
desktop, and unselecting the filesystem in question from the Disks menu?

Otherwise, sounds like Dave's patch fixes Steve's problem.  
Comment 11 Dave Camp 2002-06-25 23:49:35 UTC
My patch doesn't affect cds, only smb and nfs mounts.
Comment 12 Luis Villa 2002-06-26 01:10:19 UTC
*** Bug 81079 has been marked as a duplicate of this bug. ***
Comment 13 Tuomas Kuosmanen 2002-06-26 06:14:58 UTC
So, looks like if I select "Unmount Volume" by right clicking the
*desktop icon* of the mount,  it does not pop up the dialog saying the
device is busy. If I just select it again from the "Disks" menu, then
I get the "busy" dialog.

There seem to be 2 things that cause issues:

+  FAM keeping an open monitoring "session" on the trash folder of
   the volume.

+  Nautilus finishing off a batch job to create thumbnails of your
   bazillion holiday photos on the removable disk. This is sometimes
   very annoying and it takes quite long to finish.

Now, I think Nautilus should drop dead all the activity it is *itself* 
doing on a removable device / mounted volume if the user chooses
to umount it. Same with FAM.

The related problem is, many times one has a shell open. And I dont
know what we can do about that?
Comment 14 Tuomas Kuosmanen 2002-06-26 06:18:37 UTC
So, looks like if I select "Unmount Volume" by right clicking the
*desktop icon* of the mount,  it does not pop up the dialog saying the
device is busy. If I just select it again from the "Disks" menu, then
I get the "busy" dialog.

There seem to be 2 things that cause issues:

+  FAM keeping an open monitoring "session" on the trash folder of
   the volume.

+  Nautilus finishing off a batch job to create thumbnails of your
   bazillion holiday photos on the removable disk. This is sometimes
   very annoying and it takes quite long to finish.

Now, I think Nautilus should drop dead all the activity it is *itself* 
doing on a removable device / mounted volume if the user chooses
to umount it. Same with FAM.

The related problem is, many times one has a shell open. And I dont
know what we can do about that?
Comment 15 Tuomas Kuosmanen 2002-06-26 06:20:09 UTC
Don't you just love the way Bugzilla makes it possible for me to get
into a mid-air-collision with myself :-) And then you get the same
comment twice.. Oh well.
Comment 16 Dave Camp 2002-06-27 22:23:30 UTC
the attached patch has been committed.  I'm removing the PATCH keyword
since it isn't really relevant to the bug at hand.
Comment 17 Luis Villa 2002-07-02 18:12:23 UTC
*** Bug 86114 has been marked as a duplicate of this bug. ***
Comment 18 Luis Villa 2002-07-02 18:12:54 UTC
There are other useful comments in bug 86114.
Comment 19 Jathish 2002-07-04 05:41:54 UTC
It works fine for me on Solaris
Comment 20 James Strandboge 2002-07-06 02:06:03 UTC
My problem seems related, so I am putting it here.  I have a usb flash
drive.  Here is my /etc/fstab entry:

/dev/sda /mnt/trek vfat user,sync,noauto,umask=0077 0 0

There are two interesting scenarios which occur (neither correct):

1. Mount the volume using Disks from desktop menu.  Double click the
icon to open a nautilus window.  Try to unmount it-- device busy. 
Close that nautilus window, try to unmount it-- it unmounts.

2. have a symlink from somewhere in your home directory to somewhere
on the device (eg 'ln -sf /mnt/trek/.gnupg /home/james/.gnupg).  Mount
the drive via desktop menu.  Cannot unmount it until you logout-- even
with 'killall -9 fam'.  Similar behaviour happens if I mount the
device into the home directory.  Eg

mount -t vfat /dev/sda /home/james/.gnupg

Hopefully this will help with some of this.  Using a usb drive for gpg
keys is a really neat application-- and I REALLY like the new nautilus
(and gnome2 for that matter).

gnome2 from debian sid (nautilus 2.0.0)
i386

Jamie Strandboge
Comment 21 James Strandboge 2002-07-30 22:49:59 UTC
I wanted to point out the the usbdrive uses a vfat filesystem, and I
just learned of someone else having a problem with nautilus/fam and a
vfat partition (ie on a hard drive).
Comment 22 Oscar Valdez 2002-07-30 23:39:34 UTC
I'm the someone mentioned in the previous comment.

The vfat partition gets mounted (by regular user) by right-clicking
the desktop, and then Disks > windows.

The fstab entry is something like:
/dev/hda1 /mnt/windows vfat user,noauto,rw 0 0

Fam keeps the mounted vfat partition busy, preventing it from being
unmounted. I have to kill fam or nautilus (either as regular user),
and then I can unmount.
Comment 23 lukeh 2002-08-17 23:07:37 UTC
The problem still exists in the most recent (Ximian) snapshot of
Nautilus.  I also see it with a vfat partition, but I'm not claiming
that that is the cause of it.  My problems are caused by Nautilus
without me even opening a Nautilus window for the disk.

Steps:
  (1) I put an MSDOS floppy in the drive
  (2) I type "mount /mnt/floppy".  Nautilus starts frantically
accessing the floppy, even though there are about 7 files on there,
none of which require thumbnails to be generated or anything.  The
activity doesn't die down for several seconds.
  (3) I make changes to the disk contents.
  (4) I type "umount /mnt/floppy".  The following error is reported in
the terminal: "umount: /mnt/floppy: device is busy".  Previous to
trying to unmount the disk, all disk activity had died down, so I
thought Nautilus had finished whatever it was doing.
  (5) As root, typing "fuser -uv /mnt/floppy" returns:

                           USER        PID ACCESS COMMAND
      /mnt/floppy          root     kernel mount  /mnt/floppy

  (6) I cannot unmount the disk until I type "killall nautilus".  Then
the unmount works fine.

Given that Nautilus is not an suid root program (or I certainly hope
it's not!), I'm guessing that the process that has the floppy mounted
is in fact fam -- is this a correct assumption?

The fact the floppy won't unmount is a really annoying problem, but
the disk activity generated in (2) itself is a very worrying problem.
 Wasn't all the unnecessary disk activity eliminated when Alan Cox ran
his syscall trace around version 1?  In the case of a floppy, it
renders the floppy almost unuseable for a substantial period of time,
because it is thrashing.
Comment 24 Dave Camp 2002-09-16 14:56:53 UTC
alexl committed a fix for trash handling that should probably fix
this.  Can you try with the latest snaps and let us know?
Comment 25 Aschwin van der Woude 2003-01-04 00:28:55 UTC
Is this bug still valid, or is fixed??
Comment 26 John Fleck 2003-02-17 01:50:18 UTC
No feedback. Closing.
Comment 27 Ed Halley 2004-02-23 22:59:28 UTC
Please re-open.  This appears for any removable drive with the
following  versions of nautilus and fam: 

$ cat /etc/fedora-release
Fedora Core release 1 (Yarrow)

$ rpm -q nautilus fam
nautilus-2.4.0-7
fam-2.6.8-12

After inserting and browsing a CDROM, I get the following:
 
$ eject
umount: /mnt/cdrom: device is busy
eject: unmount of `/dev/cdrom' failed

$ sudo lsof /mnt/cdrom
COMMAND  PID   USER   FD   TYPE DEVICE SIZE  NODE NAME
fam     5310 halley   22r   DIR   11,0 2048 60006 /mnt/cdrom/CREDATIV
fam     5310 halley   24r   DIR   11,0 4096 59392 /mnt/cdrom

$ sudo killall -9 fam
$ eject
[success]

The system behaves similarly on two different motherboards, with
CDROM, DVD-RW, and CompactFlash USB storage devices, all of which are
prevented from ejection and unmounting.
Comment 28 Alexander Larsson 2004-02-25 10:19:25 UTC

*** This bug has been marked as a duplicate of 102760 ***