Bug 149187

Summary: gamin keeps files locked preventing unmounting of mass storage device
Product: [Fedora] Fedora Reporter: Armijn Hemel <armijn>
Component: gaminAssignee: Daniel Veillard <veillard>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: havardw, justin, michal, pri.rhl1, reast, tiger84, tom.georgoulias, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.0.25 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-03-02 18:11:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Armijn Hemel 2005-02-20 15:06:10 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041111 Firefox/1.0

Description of problem:
After an upgrade to gamin 0.0.24 I can't unmount my Olympus C-50 camera anymore after normal use with gthumb. umount complains the device is busy and lsof shows
that only the gam_server process has /media/usbdisk open.

Version-Release number of selected component (if applicable):
gamin-0.0.24-1.FC3

How reproducible:
Always

Steps to Reproduce:
1. attach Olympus C-50
2. use it normally
3. close applications
4. unmount
  

Actual Results:  Device is not unmounted.

Additional info:

Comment 1 Armijn Hemel 2005-02-20 15:13:03 UTC
I downgraded to 0.0.17 and I'm not seeing this problem anymore.

Comment 2 Michal Jaegermann 2005-02-22 20:21:44 UTC
The same problem makes removable medial like a USB memory stick
or a USB floppy practically unusable. gam_server grabs references,
apparently multiple ones, to mount points and makes unmounting
without killing gam_server process impossible.  Even the later
seem to depend heavily on timing and if one is late with umount
then the whole game has to be restarted again.

If one will manage to kill gam_server and unmount a floppy then
putting a new floppy in a drive does not seem to have any effect
even if another gam_server process was restarted.  One has to
replug a USB floppy enclosure before it is recognized again.

Interestingly enough the above does not happen for CDs.  Are they
special-cased in the code?

Backing off to gamin-0.0.17-1.FC3 makes floppies unmountable
again but an icon for a USB floppy drive does not show up even
after hitting "Reload" in a "Computer" window.  Interestingly
enough what brings it is clicking on "Floppy Drive" icon in
"Computer" while no media are present.  This is causing an error
but also makes an icon for a "Removable Media" to show up both
in "Computer" window and on a desktop.  With 0.0.17 this still
can be unmounted.

All the above is not particular to i386.

Comment 3 Justin 2005-02-26 11:28:49 UTC
i am experiencing the exact same problem this is one annoying bug and
has already cause the corruption of one usb key


Comment 4 Justin 2005-02-26 12:13:43 UTC
i dont know what the deal is this is a lesser version number than the
one that is available on the site but this gamin appears to work
perfectly. 
http://www.gnome.org/~veillard/gamin/RPMS/FC3/i386/gamin-0.0.20-1.i386.rpm

all of a sudden my usb key can unmount.

Comment 5 Michal Jaegermann 2005-02-26 17:42:14 UTC
A report I got from a friend with a USB memory stick is that if
you will let it "hotplug mount", and will _not_ open any file
manager windows to a corresponding directory but use a command
line operations to move files in and out, then gam_server is not
sticking to directory handles and unmounting is possible without
doing 'pkill -f gam_' or equivalent.

Comment 6 Travis Suel 2005-02-26 22:28:14 UTC
Someone mentioned that this does not happen with CD's.  But I have
this problem with both my CD-ROMs.  Although it doesn't happen unless
I browse the CD with Konqueror.  After that I am forced to umount like
this:
      ]$ fuser -k /mnt/cdrw
      ]$ umount /dev/cdrw

Comment 7 Russell East 2005-03-01 01:05:16 UTC
I have this problem with a memory stick.  After attempting to umount
the stick via the KDE icon, `ps -ef` shows me there are 2 (two)
gam_server processes like this:
UID        PID  PPID  C STIME TTY          TIME CMD
russell   6295     1  0 10:37 ?        00:00:00 /usr/libexec/gam_server
root     11709     1  0 15:55 ?        00:00:00 /usr/libexec/gam_server

I can force the umount by using the following (as root):
kill -HUP 6295;umount /media/usbdisk/

In other words, I only have to hang-up the process that is owned by
me.  Subsequently, KDE, or whatever, is reestablishing a new user
process as seen here:
UID        PID  PPID  C STIME TTY          TIME CMD
root     11709     1  0 15:55 ?        00:00:00 /usr/libexec/gam_server
russell  14433     1  0 16:58 ?        00:00:00 /usr/libexec/gam_server



Comment 8 Daniel Veillard 2005-03-01 11:49:26 UTC
I know about the issue, just didn't found the cause yet.

Daniel

Comment 9 HÃ¥vard Wigtil 2005-03-01 21:37:20 UTC
I halso have this problem with the 0.24 update and USB sticks.
However, the 0.25 SRPM from http://www.gnome.org/~veillard/gamin/SRPMS/ fixes
the problem for me.

Comment 10 Daniel Veillard 2005-03-01 21:40:49 UTC
yes 0.0.25 should fix this problem, well I made the release specifically
after finding the bugs related to this, so I hope this is fixed, it works
for me with FC3 and 0.0.25,

Daniel

Comment 11 Michal Jaegermann 2005-03-01 22:30:46 UTC
A quick check on x86_64 indeed seem to confirm that 0.25 works as
intended.  This was not a very extensive testing.

Comment 12 Tim Waugh 2005-03-02 10:50:03 UTC
Reopening -- Daniel, this clearly needs an FC3 update, since it is a regression
since FC3 release.

Comment 13 Daniel Veillard 2005-03-02 10:55:23 UTC
It is being pushed to FC-3 and if the build system didn't took 7 hours to
compile it, and 12 more hours to get someone to approve it, it would be
pushed out already !

Daniel

Comment 14 Justin 2005-03-02 14:45:21 UTC
after installing gamin-0.0.25-1 files only appear in nautilus after hitting refresh

Comment 15 Daniel Veillard 2005-03-02 14:48:58 UTC
w.r.t. comment #14, this works for me. I tested it specifically. So you will
have to provide a reproductible test case including paths used etc ... in a new
bug report after being sure to have restarted all running gam_server 
I will close that bug once 0.0.25 is finished pushing to FC-3

Daniel

Comment 16 Justin 2005-03-02 14:55:37 UTC
sorry daniel,  i though that when installing the rpm ot would have restarted
gam_server right after installation.  after restart it worked perfectly.  thanks

Comment 17 Daniel Veillard 2005-03-02 15:23:51 UTC
better :-)

Daniel

Comment 18 Daniel Veillard 2005-03-02 18:11:25 UTC
Pushed to FC-3 updates,

Daniel

Comment 19 Russell East 2005-03-03 01:32:49 UTC
it works fine for me.  After installing the update, I can now mount
and unmount the thumb drive using the KDE icon.  Thanks!