GNOME Bugzilla – Bug 102760
Nautilus forgets to stop FAM on mountable device w/ recent files
Last modified: 2006-01-29 22:34:32 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.
*** Bug 106783 has been marked as a duplicate of this bug. ***
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.
*** Bug 129684 has been marked as a duplicate of this bug. ***
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?
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.
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.
*** Bug 124115 has been marked as a duplicate of this bug. ***
This is still happening in HEAD, right?
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.
*** Bug 84919 has been marked as a duplicate of this bug. ***
*** Bug 135271 has been marked as a duplicate of this bug. ***
*** Bug 115211 has been marked as a duplicate of this bug. ***
*** Bug 134416 has been marked as a duplicate of this bug. ***
*** Bug 125788 has been marked as a duplicate of this bug. ***
*** Bug 142926 has been marked as a duplicate of this bug. ***
mblaesing@gmx.de in bug 142926 reports seeing this in 2.6.1 on Debian.
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.
*** Bug 94552 has been marked as a duplicate of this bug. ***
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.
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.
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)
*** Bug 165727 has been marked as a duplicate of this bug. ***
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?
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
This is fixed now (with gamin + inotify)