gamin does not fully support inotify

Bug #11624 reported by Julien Olivier
24
Affects Status Importance Assigned to Milestone
gamin (Ubuntu)
Fix Released
Medium
Sebastien Bacher

Bug Description

If I add or remove a bookmark in the file open / save dialog, I have to run
"killall gnome-panel" for the change to be taken into account in the "places"
menu. Is it supposed to be automatically updated ?

Revision history for this message
Sebastien Bacher (seb128) wrote :

According on what Vincent said when he sent the patch:
  * no update when the GTK+ bookmarks are modified. It seems gamin
doesn't receive a modify event when the file is modified/deleted. It's
probably a bug in inotify or gamin.

Vincent, any news on this ?

Revision history for this message
Vincent Untz (vuntz) wrote :

The problem here is gamin and inotify: gamin does not receive a change event
when a file is changed.
In fact, gamin does not really support inotify well right now (try to do make
tests and you'll see what I mean...).

I tried to look at this but got lost in the gamin code. I might try again later...

I think this bug should be a Hoary blocker (or at least Hoary-targeted)

Revision history for this message
Vincent Untz (vuntz) wrote :

Note that this is not a gnome-panel bug nor a gnome-vfs bug (gnome-vfs does not
receive any gamin event when a file is modified).

Revision history for this message
Jeff Waugh (jdub) wrote :

Let's consider returning to dnotify support only for hoary, if this is not
resolved before then. Marking critical for now.

Revision history for this message
John McCutchan (ttb) wrote :

I have noticed this problem as well. I am busy with school so I haven't had time
to investigate it. The gamin inotify backend doesn't support as much as the
dnotify backend does, and so some events are going to be missing. The problem is
that the dnotify backend also uses the poll backend which lets it watch
files/dirs that don't exist at the time of the watch request amongst other
things. The quickest way to get the inotify backend working well, would be to
take the dnotify backend, and just replace the dnotify specific portions (not
much code is specific to dnotify) of it with the equivelant inotify code. Until
this is done I would recommend against using inotify and gamin.

Revision history for this message
GonzO (gonzo) wrote :

(In reply to comment #4)
> Let's consider returning to dnotify support only for hoary, if this is not
> resolved before then. Marking critical for now.

I (just a user, mind you) second this suggestion, strongly.

I was having HARD freezes unmounting any USB drive on my computer, and after
upgraded to the latest (2.6.10-3) kernel, I started to freeze when unmounting
Samba mounts. After reading a lot of bugzilla entries related to this one, I
booted the kernel with the "noinotify" swtich (which, I assume, forces the use
of dnotify).

Not only do things actually unmount without freezing the system, but I can
plug-unplug-plug-unplug USB drives to my heart's content, and it all works
exactly as it should. New folders get created, with intelligent names. The
"Tree" pane in Nautilus updates almost instantaneously. Mounts are done with
the "sync" option. I can just rip the devices out and it will all unmount
gracefully.

With that one kernel option, all of Utopia works better than it ever did on this
machine, even with Warty. Is there any reason to keep inotify at all?

Revision history for this message
Remy Maucherat (remy-maucherat) wrote :

I am having similar problems (I did not disable inotify yet), and I am raising
the priority, as it causes.

Basically, automounting CDs or flash memory works well (Nautilus displays the
new Window automagically, mount list is fine), but the CD icon usually does not
appear (sometimes, it works fine for the first CD inserted). Ejecting the CD or
removing the memory stick will cause a hard freeze of my laptop (Inspiron 500m,
which is a Banias centrino). I can avoid the crash for CDs by double clicking on
the CDROM icon in the computer virtual folder. This causes an explicit mount
attempt (which fails, since the CD is already mounted), but the side effect is
that Nautilus now properly displays the mounted device, and ejecting it will no
longer cause the hard freeze.

The mount output is 100% correct.

Revision history for this message
Sebastien Bacher (seb128) wrote :

*** Bug 13154 has been marked as a duplicate of this bug. ***

Revision history for this message
GonzO (gonzo) wrote :

...on the other hand, you could just fix the bug, and forget all about the
"noinotify" switch. ;-)

With all the Hoary updates from this morning, everything seems to work
beautifully. As far as I'm concerned, its fixed.

(Kernel 2.6.10-4-24)

Revision history for this message
Remy Maucherat (remy-maucherat) wrote :

Well, the related change in the latest kernel is that inotify was disabled, so
it's kind of normal it doesn't crash anymore ;)

 linux-source-2.6.10 (2.6.10-24) hoary; urgency=low
 .
   * hibernate [Matthew Garrett <mjg59 at srcf.ucam.org>]
     Patch: stolen-from-head_cpufreq-resume.dpatch
     Closes: #6302
   * ppc [Matthew Garrett <mjg59 at srcf.ucam.org>]
     Enable suspend-to-disk.
     Patch: powerpc-pmdisk.dpatch
>>> * disable inotify unless specifically enabled [zulcss at gmail.com]
>>> Patch: enable-inotify.dpatch
   * Version 0.19a of toshiba_acpi.c
     [Daniel Silverstone <daniel.silverstone at canonical.com>]
     Patch: tosh_acpi2.dpatch

Revision history for this message
Ken Foskey (foskey) wrote :

USB mounting is better after last nights upgrade on Hoary however the umount is
not working. gamin is holding the USB key open so that it cannot be umounted.
Killing gamin allows umount to continue.

gangi: ~
$ sudo fuser /media/KEN\ USB/
/media/KEN\040USB: No such file or directory
/media/KEN\040USB/: 8373

gangi: ~
$ ps -ef | grep 8373
ken 8373 1 0 12:37 ? 00:00:00 /usr/lib/gamin/gam_server
ken 8892 8881 0 12:40 pts/0 00:00:00 grep 8373

Revision history for this message
Matt Zimmerman (mdz) wrote :

That's bug #13353, which has returned because we disabled inotify in the kernel.

Revision history for this message
Jeff Waugh (jdub) wrote :

There may be a workaround for this in gamin 0.0.25, uploaded earlier today.

Revision history for this message
John McCutchan (ttb) wrote :

Yep, with gamin 0.25 it won't watch anything underneat /media

Revision history for this message
Matt Zimmerman (mdz) wrote :

Worked around, so downgrading

Revision history for this message
Sebastien Bacher (seb128) wrote :

That works fine for me with 0.1.3, I'm closing this bug as fixed. Feel free to
reopen if you still have the issue with this version.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.