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 115211 - Monitoring of .Trash file prevents umount of usb mass storage device
Monitoring of .Trash file prevents umount of usb mass storage device
Status: RESOLVED DUPLICATE of bug 102760
Product: nautilus
Classification: Core
Component: Trash
2.2.x
Other Linux
: High major
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-06-15 04:12 UTC by John M. Desmond
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description John M. Desmond 2003-06-15 04:12:49 UTC
Description of Problem:

On a Red Hat 9.0 system, interaction between
Nautilus creating a .Trash file on a USB device
and sgi-fam monitoring the heck out of it prevents
umount-ing the device.

Steps to reproduce the problem:

1. Automounted a Casio camera to download some
pictures. (I use the the mass-storage driver, not
gphoto, with this camera.)
2. Deleted a file on the camera.
3. Attempted a umount of the camera (/auto/camera
is dev/sda1).

Actual Results:

   "Device Busy" error.

Expected Results:

   No error :)

How often does this happen? 

Can reproduce it every time. Doesn't happen if
files are only copied from or to the camera. Only
if a deletion is done.

Additional Information:

I think the file deletion caused Nautilus to
create a .Trash file on the camera. Then, sgi-fam
sits on the file causing any attempt to umount the
camera to result in a "device busy" error. (lsof
/dev/sda1 showed that fam was hogging the mountpoint.)
Workaround was to restart sgi-fam. Then the drive
could be umount-ed.
Not sure about the Nautilus-fam interaction but an
option in Nautilus to either not write files to
certain types of drives or not to sic fam on them
would keep this from happening. Google shows a lot
of instances of fam camping on drives like this.
Fam doesn't seem to have an option to help with
this, either.
Comment 1 John M. Desmond 2003-06-17 22:10:39 UTC
Deleting the .Trash file did not un-busy the mount.
Comment 2 Jeff Kowing 2003-10-30 21:37:09 UTC
I would like to confirm that I am getting the same type of umount
problems with a USB memory key.  I believe the problem has to do with
Nautilus interaction with fam when monitoring .Trash files.

I am on Red Hat 9

My /etc/fstab/ has:
/dev/sda1 /mnt/diskonkey vfat noauto,owner,user 0 0

Version: 
$ rpm -q nautilus
nautilus-2.2.1-5

--------------------------------------------------------------------

Here is an example of how a .Trash directory starts causing problems:

Normally I can mount and umount with no problems:
$ mount /mnt/diskonkey
$ umount /mnt/diskonkey

I can even browse with Nautilus:
 
$ mount /mnt/diskonkey
[Browse around with Nautilus]
[Create files with Nautilus]
[Close Nautilus]
$ umount /mnt/diskonkey

So far, all is good.

HOWEVER, if I cause a .Trash-<username> directory to be created on the
memory key by deleting a file using Nautilus (even though I empty the
trash), then umount will no longer work:

$ mount /mnt/diskonkey

$ find /mnt/diskonkey
/mnt/diskonkey
/mnt/diskonkey/foo.txt

[Delete /mnt/diskonkey/foo.txt with Nautilus.]

$ find /mnt/diskonkey/.Trash-jkowing
/mnt/diskonkey
/mnt/diskonkey/.Trash-jkowing
/mnt/diskonkey/.Trash-jkowing/foo.txt

[Empty trash]
[Close Nautilus]

$ find /mnt/diskonkey
/mnt/diskonkey
/mnt/diskonkey/.Trash-jkowing
find: /mnt/diskonkey/.Trash-jkowing: Stale NFS file handle

*** [Note the Stale NFS file handle error above] ***

$ umount /mnt/diskonkey
umount: /mnt/diskonkey: device is busy

--------------------------------------------------------------------

I can get the command line umount to work again, but only by first
deleting the /mnt/diskonkey/.Trash-jkowing directory and unmounting by
right clicking on the desktop diskonkey icon and selecting "unmount
volume".

If I don't remove the .Trash-jkowing directory (and unmount it using a
gui), then future umount commands also fail with a "device is busy"
error.

Finally, by runing fam with the debugging flag:
# fam -d
I can see it looking at that evil .Trash directory.

I will be glad to clarify any symptoms.  Thanks.
Comment 3 Luis Villa 2004-01-02 18:35:02 UTC
This is still a problem, and fairly major.
Comment 4 Luis Villa 2004-02-19 14:23:42 UTC
Upping priority.
Comment 5 Miguel Mingo 2004-02-21 17:52:48 UTC
I have the same problem unmounting any device (removable media like
USB memory).

Only restarting fam (/etc/init.d/fam restart) Nautilus let me unmount
the volume.

I use Nautilus 2.4.2 and FAM 2.7.0 on Debian sid.
Comment 6 Matthew Gatto 2004-05-15 17:52:35 UTC
This is a dup of bug 86114 which is a dup of 84919 which is a dup of 102760
which is supposed to be fixed with redhat's patched fam and GNOME >= 2.6 :)

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