Bug 128905 - gam_server keeping my usb keydrive mounted
Summary: gam_server keeping my usb keydrive mounted
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gamin
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: FC3Target
TreeView+ depends on / blocked
 
Reported: 2004-07-31 03:50 UTC by Jef Spaleta
Modified: 2007-11-30 22:10 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-09-02 21:22:16 UTC


Attachments (Terms of Use)

Description Jef Spaleta 2004-07-31 03:50:21 UTC
Description of problem:
plugin in the usb keydrive
new icon added in the Computer Window named flash1 !!!!!
  note i have a compact flash reader that shows up as flash already
mount the drive as flash1 and get a desktop icon! 
do a little file management and dance a jig! 
close all the nautilus windows.
go to unmount using the icon on the desktop
bam! drive busy cant unmount

/sbin/fuser /mnt/flash1  : 
  /mnt/flash1/:         3595

ps aux|grep 3595
smartuser  3595  0.0  0.2  3140 1268 ?        S    18:10   0:06   
  /usr/bin/gam_server

wail in dispair!!!!

Version-Release number of selected component (if applicable):
gamin-0.0.2-1

Expected results:
being able to unmount my keydrive
well actually i get this on both my keydrive and my cf reader

Comment 1 Jef Spaleta 2004-07-31 03:55:11 UTC
one additional thing... i just tried killing the gam_server as a work
around to get these things unmounted. No go.
i try to kill the gam_server and it kills my gnome panel as well..
which respwans and gam_server is back with a new process number and
the new process is holding the mount points still.

Fun Fun Fun... i guess you could look at it this way. Its much better
than fam at holding mount points :->

-jef

Comment 2 Daniel Veillard 2004-07-31 09:20:08 UTC
Okay :-), I need to get this fixed ! The fact that gam_server is
restartable from a client viewpoint is a feature, but I understand this
makes this bug (present to some extent in fam too) aggravating !
The point is really to not get gamin to block umount, either by 
reverting to poll for directories watch or find other ways.
Good to know that the restart actually works :-)

Daniel

Comment 3 Daniel Veillard 2004-07-31 10:14:24 UTC
Can you make sure the fix for fam doesn't correct the problem you're
seeing with gamin ? See bug #123677 
I.e. can you confirm that before switching from fam to gamin you
didn't had the same problem, that would help, 

Daniel

Comment 4 Jef Spaleta 2004-07-31 12:59:20 UTC
let me give you a half answer...
when this box was fc2, i can't remember the last time i saw the mount
sticking problem under fam.

Now the better answer, now that i have this box rdiff-backup'd 
I'll do an exhaustive set of comparisons between gam and fam.
If I'm lucky i'll find a way to make this issue a system crasher bug,
and I'll finally be famous.


-jef

Comment 5 Daniel Veillard 2004-07-31 13:12:43 UTC
Hum, I think hunting down gamin bugs is likely to be a sucessful 
chase, on the other hand I can provide no garantee that you will 
get fame as one of the trophies,

Daniel

Comment 6 Jef Spaleta 2004-07-31 14:40:36 UTC
gamin 0.3 seems to have fixed this specific problem with unmounting
the devices...but...and you know there is a but...

i've seemed to have developed a problem with having nautilus see the
usb device being plugged in and taken out of the system. fstab and the
/mnt directory are updated correctly with the correct ownership..so it
looks like hotplugging is working...but nautilus doesnt update the
computer view any longer when i un/plug the usb key. To see the
devices in nautilus i have to log into gnome with the devices plugged
in already. 

Im not sure where to file this issue, so if you can point me to the
correct component, I'll go poke someone else if this isn't a gamin
problem. Or if it is.. i'll refile it as a seperate bug.

-jef

Comment 7 Jef Spaleta 2004-07-31 23:05:55 UTC
sorry to say... my last comment about gamin 0.3 fixing things.. seems
to be inaccurate. My initial test seemed to work, but on logging out
and back in, im having problems unmounting again.... worse
i can't even try gam_server to die and get the drive unmounted. I have
to logout of gnome, go into a non gnome based session and kill gam_server.

Is there some detailed logging information i can give you?

-jef

Comment 8 Jef Spaleta 2004-08-04 23:43:13 UTC
gamin 0.0.4 installed and so far i can't reproduce another mount lock
in gnome.  2 usb flash drives both mount both unmount, repeatedly.
Haven't tested more than one user on the system yet. But so far so good.
Nautilus even closes its open windows inside the mountpoint if i go to
unmount the volume. I think you might have earned yourself a drinkable
KK doughnut, it seems fixed to me. Is there something specific you
need me to try?

-jef

Comment 9 Daniel Veillard 2004-08-04 23:51:55 UTC
now I'm puzzled. I did fix things in 0.0.4 but I didn't expect to 
fix that one, are you sure you didn't updated for example gnome-vfs
at the same time. I think we can keep that bug open because I
still don't know what happened and this requires investigation...

Daniel

Comment 10 Daniel Veillard 2004-08-04 23:53:32 UTC
BTW I live in France, no KrispyKream doughnut, only healphy food
and strong cheese here :-)

Daniel

Comment 11 Jef Spaleta 2004-08-05 00:48:40 UTC
No KK doughnuts there yet. But the great thing about a KK doughnut is
they ship via normal bulk mail rather well, even if it takes 2 weeks
to get the package.

just checked against yesterdays rpmpkg log and no gnome-vfs or
gnome-vfs2 changes.  as much as i want to close my eyes and pretend
its fixed, I will attempt to rollback packages and make sure i just
have gamin updated if you want this confirmed.

 


Comment 12 Ralf Ertzinger 2004-08-11 09:20:50 UTC
I'm seeing the same thing with a NFS share mounted via automount:

gam_serve 3010        sun   39r  unknown       0,18                  
  /net/kushana/var1/garbage/.Trash-sun (deleted) (kushana:/var1/garbage)

Strange thing is, I can not remember accessing the /var1/garbage tree
during this session (there are other shares mounted from this machine
that I used, so /var1/garbage got pulled in).

As you can see, deleting the file does not make gamin release it, either.

Comment 13 Ralf Ertzinger 2004-08-11 09:21:26 UTC
Oh, this is gamin-0.0.5-1.

Comment 14 Jef Spaleta 2004-08-15 04:19:37 UTC
Okay just to check in again, Im currently rawhide synced and the only
mountable device that I have that consistently has this problem still
is my floppy drive.
/sbin/fuser /mnt/floppy/
/mnt/floppy/:         3489
ps aux|grep 3489
3489  0.0  0.1  3176  948 ?        S    00:15   0:00 /usr/bin/gam_server

My other mountable devices that ive tried, the usb flash card reader
and the usb keydrive and my cdrom don't show this problem at all.

-jef

Comment 15 Tim Waugh 2004-08-18 13:36:25 UTC
I saw this yesterday with a USB flash card reader (actually a camera),
with 0.0.5-1.

Comment 16 Jef Spaleta 2004-08-27 23:44:38 UTC
gamin 0.0.8 installed and I can't reproduce this problem on any of my
user mountable devices, floppy, cdrom, usbstick, flash card reader,
nikon digital camera.  Is this now closable? Or does this bug need to
be left open?

Comment 17 Daniel Veillard 2004-08-30 07:44:16 UTC
Okay, this is good news. But I still expect to add some support for
temporary, user mountable device directly at the gamin level, let's
put it into a modified state, but not close it right now.

  thanks !

Daniel

Comment 18 Warren Togami 2004-08-31 09:51:36 UTC
Bad gamin!

[root@ibmlaptop /]# umount /media/usbdisk/
umount: /media/usbdisk: device is busy
umount: /media/usbdisk: device is busy
[root@ibmlaptop /]# fuser /media/usbdisk/
/media/usbdisk/:      4857
[root@ibmlaptop /]# ps aux |grep 4857
warren    4857  0.0  0.1  3136 1640 ?        S    22:11   0:00
/usr/libexec/gam_server
[root@ibmlaptop /]# rpm -q gamin
gamin-0.0.8-1


Comment 19 Daniel Veillard 2004-09-02 21:22:16 UTC
I would be interested in feedback on this after the upgrade to
gamin-0.0.9 (pushed to RawHide yesterday), it includes rules to
only use polling for resources in /media/ and /mnt/ subtrees.
This should fix the problem,

Daniel

Comment 20 Jef Spaleta 2004-09-02 21:24:12 UTC
its on my list of things to check.
Im wary of reporting on any bugs until i know the kernel and module
loading issues that showed up in rawhide recently are confirmed dead.


Comment 21 Daniel Veillard 2004-09-02 21:38:46 UTC
you can try gamin on a stable box too ... I'm developping it
on RHEL3 mostly.

Daniel

Comment 22 Jef Spaleta 2004-09-02 23:56:24 UTC
okay....
/dev/fd0                /media/floppy           auto   
noauto,user,exec,kudzu 0 0
/dev/sda1               /media/usbdisk          vfat   
noauto,user,exec,kudzu,noatime,sync 0 0
/dev/sdb1               /media/usbdisk1         vfat   
noauto,user,exec,kudzu,noatime,sync 0 0

all mounted and browsed in nautilus  a few times
no unwarrented mount hangs when unmounting.

-jef


Comment 23 Jef Spaleta 2004-09-03 00:07:39 UTC
One thing about gamin 0.0.9
its not noticing when i unplug the usb drives
the icon in Computer is still there several minutes after the drives
are unplugged
the mount point and fstab entry have been removed correctly by hal.
Is this worth a new bug ticket?

-jef

Comment 24 Daniel Veillard 2004-09-03 11:21:59 UTC
Is that really gamin which should notice this ? I'm unsure ...
If it's clear that yes, then add to #130859
If it's unclear, maybe this should be addressed as a nautilus 
bug and then proper error checking can be made.

  /me has no usb drive

Daniel

Comment 25 Jef Spaleta 2004-09-03 13:24:34 UTC
Re comment #24

nevermind.  I rolled back to an older kernel and spent a few minutes
inserting and removing usb devices, and for the first time everything
worked as I expected for the complete round of testing.

The introduction of udev and hal have greatly reduced my capacity to
intuit at what layer my hardware problems are actually occuring.

-jef

Comment 26 Daniel Veillard 2004-09-03 13:42:37 UTC
Yeah the whole stack has changed rather dramatically.
But for me it's excellent news :-)

  thanks !

Daniel

Comment 27 Stefan Biene 2004-11-09 15:37:28 UTC
Sure this one's closed? Have a look:
This is Fedora Core 3, mounted cifs to a remote server...
Problem still seems to exist?!


[root@dhcp139 ~]# umount /netmnt/msdn/
umount: /netmnt/msdn: device is busy
umount: /netmnt/msdn: device is busy
[root@dhcp139 ~]# lsof | grep netmnt
gam_serve 3659  stefan   78r      DIR       0,20     4096          2
/netmnt/msdn
[root@dhcp139 ~]# ps alx | grep 3659
0   500  3659     1  15   0  4520 1628 SendRe D    ?          0:00
/usr/libexec/gam_server
4     0  7433  7314  17   0  5664  680 -      R+   pts/4      0:00
grep 3659
[root@dhcp139 ~]# kill 3659
[root@dhcp139 ~]# lsof | grep netmnt
gam_serve 3659  stefan   78r      DIR       0,20     4096          2
/netmnt/msdn
[root@dhcp139 ~]# rpm -q gamin
gamin-0.0.15-1

I am not able to kill this one. But: rebooting solves the problem,
until... I try to umount the drive again...

Comment 28 Daniel Veillard 2004-11-09 15:44:48 UTC
use /mnt or /media to mount such tempporary files.

Daniel

Comment 29 Andy Haynes 2004-11-11 15:42:07 UTC
Chaps,

Same story for me except this time I am trying to unmount a VFAT
drive. The gam_serve still has open files on the drive and when I kill
the process, another gam_serve process appears.

This is FC3 -- gamin-0.0.15-1

Andy Haynes

Comment 30 Andy Haynes 2004-11-11 16:05:08 UTC
Just a quick (almost) workaround.

You can unmount the drive by killing the PID of gamin and unmounting
the drive as follows

kill -9 <gam_serv PID> && umount -f /<mount-point>

Doing it this way forces an unmount before the process is restarted

HTH

Andy Haynes

Comment 31 Michel Fodje 2004-12-02 10:36:27 UTC
kill -HUP <gam_serv PID> actually works for me.

Comment 32 Martin Ebourne 2005-02-23 20:37:53 UTC
Closed? I'm getting this one on a fully updated (just checked) FC3:

sh-3.00# umount /media/idedisk
umount: /media/idedisk: device is busy
umount: /media/idedisk: device is busy
sh-3.00# fuser -m /media/idedisk
/media/idedisk:       8101
sh-3.00# ps 8101
  PID TTY      STAT   TIME COMMAND
 8101 ?        S      0:00 /usr/libexec/gam_server
sh-3.00# rpm -q gamin
gamin-0.0.24-1.FC3

Funny thing is I wasn't getting this a month ago, started happening in
the last couple of weeks. No idea quite when/what changed.

Comment 33 Otto 2005-02-24 18:12:58 UTC
Exactly the same is happening to me:

[root@localhost ~]# umount /mnt/usb
umount: /mnt/usb: device is busy
umount: /mnt/usb: device is busy

[root@localhost ~]# lsof|grep /mnt/usb
gam_serve 9130    dl36   11r      DIR        3,5     4096     355528
/mnt/usb
gam_serve 9130    dl36   12r      DIR        3,5     4096     355528
/mnt/usb
gam_serve 9130    dl36  223r      DIR        8,1    16384          1
/mnt/usb

[root@localhost ~]# rpm -q gamin
gamin-0.0.24-1.FC3

FC3, kernel 2.6.10-1.741_FC3

Comment 34 Hans van de Koot 2005-02-24 22:40:01 UTC
hans@ling.ucl.ac.uk

Comment 35 quintesse 2005-02-27 01:04:46 UTC
Same here.
gamin-0.0.24-1.FC3
2.6.10-1.766_FC3

Comment 36 Russell East 2005-02-28 17:30:04 UTC
I wonder if there has been some regression problem.  It started
happening to me just in the last 2 weeks.  Probably after the 766
kernel update.
gamin-0.0.24-1.FC3
kernel-2.6.10-1.766_FC3

Comment 37 Russell East 2005-02-28 17:40:20 UTC
Uh, there is another bugzilla report that has status==New:
  https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=149187

Comment 38 Jef Spaleta 2005-02-28 17:47:38 UTC
as the original bug reporter... i can with high confidence say that
whatever you are seeing is a regression involving newer versions of
packages. My original bug reported issue was resolved.

I strongly suggest you do regression testing by rolling back to
something before gamin-0.0.24-1.FC3 and kernel-2.6.10-1.766_FC3 and
refile this issue with a NEW bug for either gamin-0.0.24-1.FC3 or
kernel-2.6.10-1.766_FC3 as appropriate.

I assure you the original problem i filed as discussed through comment
#26 is dead. Comments #27 through #31 are an unrealted configuration
issue dealing with how gamin treats special /mnt and /media as polling
special cases.  Starting wint comment #32 is potentially a brand new
issue that needs a new bug. 

-jef

Comment 39 Daniel Veillard 2005-02-28 18:18:57 UTC
gamin-0.0.24-1.FC3 introduced a regression w.r.t. /media and
/mnt mounted "temporary" devices, I'm still chasing it down.

Daniel

Comment 40 Richard Duran 2005-06-09 04:23:26 UTC
Haven't seen this mentioned here, but the same issue exists with SMB mounts
(running gamin-0.0.25-1.FC3).

-richard

Comment 41 Daniel Veillard 2005-06-09 07:32:15 UTC
w.r.t. #40, update to 0.1.0, the latest version.

Daniel

Comment 42 Daniel Veillard 2005-06-09 07:34:56 UTC
W.r.t. #40 dnotify kernel support and CIFS don't seems to like each other,
it's a kernel issue from my point of view. You can try excluding kernel 
monitoring for those volumes, see http://www.gnome.org/~veillard/gamin/config.html

Daniel

Comment 43 Richard Duran 2005-06-10 02:24:08 UTC
Re: #42 does the config file understand ~/Desktop to mean $HOME/Desktop?
Re: #41 thanks for the suggestion. will investigate and update.

Regards,
-richard

Comment 44 Richard Duran 2005-06-10 02:36:56 UTC
Re: #42, we have the following .gaminrc

--- begin ---
poll ~/mnt/*
poll ~/Desktop/mnt/*
poll ~/Desktop/My Documents/*
---- end ----

is this valid? We are still seeing gam_server attached to CIFS/SMB filesystems
mounted to directories such as ~/Desktop/mnt/WINSERVER/SHARENAME

Regards,
-richard

Comment 45 Richard Duran 2005-06-10 02:48:31 UTC
Re: #41, my manager had previously uninstalled the FC3 rpm, compiled the source
for 0.1.0 and HUPped the running instance of gam_server with a kill -9, and saw
no change in behaviour. Does gam_server fork a child of itself on this signal,
or was a new instance started from the newly compiled binary?

-richard

Comment 46 Daniel Veillard 2005-06-10 09:01:06 UTC
~ is not interpreted as $HOME, that could be added easilly
upon death of the server, the client restart a server
and reinstanciates the monitors automatically.

Daniel

Comment 47 Daniel Veillard 2005-06-10 09:49:17 UTC
Since it's trivial and probably very useful I added support for ~
as being interpreted as the user home dir to .gaminrc , it's in CVS
and will be in the next release probably today.

Daniel

Comment 48 Thomas Hutton 2006-03-17 01:42:16 UTC
Quick workaround for unmounting.

1) find the process number however you like,
2) kill process_number ; umount your_mountpoint


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