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 102760 - Nautilus forgets to stop FAM on mountable device w/ recent files
Nautilus forgets to stop FAM on mountable device w/ recent files
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File Search Interface
2.8.x
Other other
: High major
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 84919 94552 106783 115211 124115 125788 129684 134416 135271 142926 165727 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-01-07 16:48 UTC by Ben FrantzDale
Modified: 2006-01-29 22:34 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ben FrantzDale 2003-01-07 16:48:48 UTC
It appears that Nautilus forgets to tell FAM to stop monitoring /floppy
which means I can't unmount it, not even through Nautilus.

The following is taken from an email discussion between me and Alex
Larsson. It gives more information.

On 20 Dec 2002, Ben FrantzDale wrote:
> On Fri, 2002-12-20 at 01:47, Alexander Larsson wrote:
> > On 20 Dec 2002, Ben FrantzDale wrote:
> > > On Fri, 2002-12-20 at 00:33, Alexander Larsson wrote:
> > > > On 19 Dec 2002, Ben FrantzDale wrote:
> > > > 
> > > > > I got this message:
> > > > > 
> > > > >         Error "Invalid parameters" while copying.  
> > > > >         Would you like to continue? 
> > > > >         [Skip] [Retry] [Stop]
> > > > >         
> > > > > While trying to copy a file onto a floppy disk. Any thoughts?
> > > > 
> > > > This is GNOME_VFS_ERROR_BAD_PARAMETERS, which typically means 
> > > > something returned EINVAL.
> > > 
> > > Hmm... over my head :-)
> > > 
> > > > Did this error happen every time you tried it? It would be
interesting to 
> > > > track down what operation failed. Maybe run it in strace.
> > > 
> > > This does happen every time. I just switched floppies and it still
> > > happens. What process should I be stracing?
> > 
> > Kill alll your nautilus processes, then run this from a shell
> > 
> > "strace -tt -o natuilus.trace nautilus --no-desktop /soure/of/file /floppy"
> > (where /source/of/file is the directory you're copying the file from and 
> > /floppy is mounted).
> >
> > Then wait 10 seconds after the windows come up and do the copy. When it 
> > has failed, press ctrl-c in the shell to terminate nautilus and send me a 
> > gzipped copy of nautilus.trace.
> 
> See attached.

Very strange. There doesn't seem to be any failing system call. So it must 
be some gnome-vfs function that detects bad parameters.
   
> > > > > Also, I was having issues with famd hanging onto the floppy drive
after
> > > > > no windows were displaying it. I had to kill famd to unmount /floppy
> > > > > either through Nautilus or via command line.
> > > > 
> > > > nautilus keeps a fam watch on the trash dir. You should have been
able to 
> > > > unmount it from nautilus though (then it removes the watch before 
> > > > unmounting).
> > > 
> > 
> > Unmounting from nautilus didn't work? Then that is a bug.
> 
> I should think so. The thing is that it's FAM holding onto /floppy, so
> it's not clear to me if it's a fam bug or a Nautilus bug. Perhaps it's a
> nautilus bug because Nautilus should tell FAM to drop it when Nautilus
> doesn't have any open windows for /floppy?

Its most probably a Nautilus bug, it should tell FAM to drop the last 
watch if no window is open and you select unmount.
Comment 1 David Kennedy 2003-03-15 03:57:30 UTC
*** Bug 106783 has been marked as a duplicate of this bug. ***
Comment 2 Egle K. 2003-11-16 20:56:28 UTC
I think nautilus must cancel or suspend monitoring of all directories
and files from mountable devices (directories and files starting from
mount directory, for example if i mount CDROM on /cdrom all files and
directories, which name begins with /cdrom should be stopped
monitored) when user chooses unmount device.
This should be done before nautilus actually calls umount command.
Comment 3 Matthew Gatto 2003-12-19 21:16:47 UTC
*** Bug 129684 has been marked as a duplicate of this bug. ***
Comment 4 Matthew Gatto 2003-12-19 22:01:08 UTC
While I observed this in nautilus 2.4.0 and fam 2.6.10, I don't see
this after upgrading to nautilus 2.4.1, and fam 2.7.0. Does anybody
still see this after to upgrading to those versions?
Comment 5 Egle K. 2004-01-09 09:15:14 UTC
Yes, this annoying bug still reproducible on nautilus 2.4.1 with
latest fam from debian unstable (2.6.10).

Look at
http://lists.debian.org/debian-gtk-gnome/2003/debian-gtk-gnome-200311/msg00125.html
http://lists.debian.org/debian-gtk-gnome/2003/debian-gtk-gnome-200311/msg00142.html
http://lists.debian.org/debian-gtk-gnome/2003/debian-gtk-gnome-200311/msg00141.html

I think there always will be problems if there are no possibility to
cancel or suspend monitoring of all directories and files from
mountable devices before unmounting, because there always be some
software which forgets to cancel monitoring.

Maybe Nautilus developers know more about fam ? In this letter
(http://lists.debian.org/debian-gtk-gnome/2003/debian-gtk-gnome-200311/msg00134.html)
Marcelo E. Magallon says:
What I find irritating is that it's not possible to ask fam what is it
 monitoring and why or how to tell it to stop doing so:

    When fam is called on to monitor a file, it passes back a
    FAMRequest structure.   This structure uniquely identifies the
    request so that it may be cancelled, using FAMCancelMonitor or
    suspended, using FAMSuspendMonitor.

Is it really true, that there isn't possible to ask fam what is it
monitoring and there is no possibility to stop monitor some
files/directories from another application ?

If it is true, then nautilus should minimize fam usage, for example
never ask to monitor read-only files/directories, for example CDROM media.
Comment 6 Carlos Rodrigues 2004-01-09 15:04:29 UTC
I fixed this bug by commenting out the file monitoring from the recent
files list. It monitors the files it has stored and when those files
are on removable media it is impossible to unmount.
Comment 7 Martin Wehner 2004-01-25 18:10:58 UTC
*** Bug 124115 has been marked as a duplicate of this bug. ***
Comment 8 Luis Villa 2004-02-19 14:37:24 UTC
This is still happening in HEAD, right?
Comment 9 Alexander Larsson 2004-02-25 10:07:03 UTC
There are various causes.

One was the recent files, i think that is fixed everywhere now.

One was a bug in fam that leaked monitors, fixed with
http://oss.sgi.com/archives/fam/2004-02/msg00000.html

other is nautilus watching trash directories, but if you unmount from
nautilus those should be removed.

I believe this should work now, but there might still be issues.
Comment 10 Alexander Larsson 2004-02-25 10:19:23 UTC
*** Bug 84919 has been marked as a duplicate of this bug. ***
Comment 11 Narayana Pattipati 2004-03-03 10:56:49 UTC
*** Bug 135271 has been marked as a duplicate of this bug. ***
Comment 12 Matthew Gatto 2004-05-15 17:52:36 UTC
*** Bug 115211 has been marked as a duplicate of this bug. ***
Comment 13 Martin Wehner 2004-05-16 23:30:55 UTC
*** Bug 134416 has been marked as a duplicate of this bug. ***
Comment 14 Martin Wehner 2004-05-16 23:31:02 UTC
*** Bug 125788 has been marked as a duplicate of this bug. ***
Comment 15 Matthew Gatto 2004-05-26 03:26:25 UTC
*** Bug 142926 has been marked as a duplicate of this bug. ***
Comment 16 Matthew Gatto 2004-05-26 18:44:48 UTC
mblaesing@gmx.de in bug 142926 reports seeing this in 2.6.1 on Debian.
Comment 17 Matthias Bläsing 2004-05-26 20:37:06 UTC
The current version of fam used in debian unstable is 2.7.0-5. There was a patch
on 30 January 2004 against fam (mentioned as 01_dnotify). I would think this is
the above mentioned patch (Comment #9).

Now I am using Nautilus 2.6.1 and the situation as in bug 142926 exists.
Comment 18 Matthew Gatto 2004-07-24 17:29:46 UTC
*** Bug 94552 has been marked as a duplicate of this bug. ***
Comment 19 Christophe Combelles 2004-09-04 00:27:30 UTC
I still get this VERY annoying bug every day on latest Sid with a usb key.
fam            2.7.0-5
libgnomevfs2-* 2.6.2-1
nautilus       2.6.3b-3

It does not occur every time, and it's not due to the ".Trash", nor to
".recently-used" file.
Comment 20 Marius Gedminas 2004-10-04 07:28:26 UTC
It's not just floppies and USB disks.  I have set up autofs so that I can
automount a SMB share from my home server on /auto/musmire that is automatically
unmounted after 1 second of inactivity.  If I ever open a nautilus window in
that share, famd keeps the fs busy and it is never unmounted.

This is a bit annoying on a laptop that often moves between different LANs.
Comment 21 Christophe Combelles 2004-11-08 17:28:59 UTC
I have a simple and **fully reproducible** lock with nautilus and fam :

- insert and mount an USB key
- open a nautilus window on it
- right-click on any file -> click on "properties"
- close the properties window
- close the nautilus window
- try to unmount the stick => impossible!

famd still has an open file on the file whose properties have been shown.

(with latest Debian/Sid)
Comment 22 Sebastien Bacher 2005-01-30 17:54:32 UTC
*** Bug 165727 has been marked as a duplicate of this bug. ***
Comment 23 Andreas Volz 2005-04-26 12:24:34 UTC
There is some time gone since the last comment to this big. I've still the same
problem with 2.8.2. Is this bug fixed in the next version or a workaround (other
then not using famd)?

Or is it perhaps possible to configure famd not to monitor some directories
below /mnt?
Comment 24 Olivier Berger 2005-07-20 07:25:32 UTC
Just in case it would be useful, here are a couple links relating to the same
problem (still occurring here on my Debian stable (sarge)) : 

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=106936

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=225636
Comment 25 Fabio Bonelli 2006-01-29 22:34:32 UTC
This is fixed now (with gamin + inotify)