This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 215504 - gamin not working on nfs mounts
gamin not working on nfs mounts
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gamin (Show other bugs)
5.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Alexander Larsson
: Desktop
Depends On: 212551
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-14 08:26 EST by Matthias Clasen
Modified: 2007-11-30 17:07 EST (History)
3 users (show)

See Also:
Fixed In Version: 5.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-12-11 00:19:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matthias Clasen 2006-11-14 08:26:20 EST
+++ This bug was initially created as a clone of Bug #212551 +++

Description of problem:

File change notification isn't working for NFS mounted filesystems.


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

gamin-0.1.7-7.fc6


How reproducible:

100%


Steps to Reproduce:
1. When logged into GNOME and your home dir nfs mounted. From a terminal do
touch Desktop/ZZZZ

2.
3.
  

Actual results:

Nothing


Expected results:

Icon for file ZZZZ should appear on the desktop.


Additional info:

If you open nautilus on a dir in a nfs mounted filetstem and get the list of
files, then delete a file from that directory (from the cli) that file will
still show up in nautilus untill you do a reload.


This works on FC5

-- Additional comment from andrew@digital-domain.net on 2006-10-27 08:38 EST --
Created an attachment (id=139573)
Simple C program that uses FAM


-- Additional comment from andrew@digital-domain.net on 2006-10-27 08:45 EST --
Running the test program on a FC5 machine

/home/andrew is mounted via nfs

(pts/1) [andrew@dev-b:~/programming/c]$ ./monitor /home/andrew/tmp/fam
/home/andrew/tmp/fam     FAMExists
/home/andrew/tmp/fam     FAMEndExist
a                        FAMCreated

Then doing a "touch a" in the fam directory shows the file being created.


On an FC6 machine we don't get very much.

(pts/5) [andrew@dev-d:~/programming/c]$ ./monitor /home/andrew/tmp/fam

We didn't the FAMExists or the FAMEndExist events and doing a "touch b" in the
fam directory also gives us nothing.


-- Additional comment from andrew@digital-domain.net on 2006-10-30 12:02 EST --
strace output of montior (attached program) running under FC5 and FC6 looking at
a directory in a NFS mounted filesystem.

FC5

[snip]
connect(3, {sa_family=AF_FILE, path=@/tmp/fam-andrew-}, 110) = 0
write(3, "\0", 1)                       = 1
stat("/home/andrew/tmp/fam", {st_mode=S_IFDIR|0770, st_size=6, ...}) = 0
write(3, "\36\0\1\0\1\0\2\0\24\0/home/andrew/tmp/fam", 30) = 30
select(4, [3], NULL, NULL, NULL)        = 1 (in [3])
getuid()                                = 500
recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"\0", 1}], msg_controllen=0,
msg_flags=0}, 0) = 1
getsockopt(3, SOL_SOCKET, SO_PEERCRED, "\16=\0\0\364\1\0\0\364\1\0\0", [12]) = 0
read(3, "\36\0\1\0\1\0\10\0\24\0/home/andrew/tmp/fam\36\0"..., 4106) = 60
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2b47302d9000
write(1, "/home/andrew/tmp/fam     FAMExis"..., 35/home/andrew/tmp/fam     FAMExists
) = 35
select(4, [3], NULL, NULL, NULL


FC6
[snip]
connect(3, {sa_family=AF_FILE, path=@/tmp/fam-andrew-}, 110) = 0
write(3, "\0", 1)                       = 1
stat("/home/andrew/tmp/fam", {st_mode=S_IFDIR|0770, st_size=6, ...}) = 0
write(3, "\36\0\1\0\1\0\2\0\24\0/home/andrew/tmp/fam", 30) = 30
select(4, [3], NULL, NULL, NULL)        = 1 (in [3])
getuid()                                = 500
recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"\0", 1}], msg_controllen=0,
msg_flags=0}, 0) = 1
getsockopt(3, SOL_SOCKET, SO_PEERCRED, "Z\35\0\0\364\1\0\0\364\1\0\0", [12]) = 0
read(3,


-- Additional comment from alexl@redhat.com on 2006-11-08 11:05 EST --
The FC6 gnome-vfs2 uses inotify directly, not fam/gamin.
However, its meant to fall back to fam for nfs dirs.


-- Additional comment from andrew@digital-domain.net on 2006-11-08 16:04 EST --
Yes, I've noticed that things which use inotify are still working, some
ruby-inotify thing, pyinotify, inotifywatch from inotify-tools etc (as long as
the events occur on the same machine as the monitoring).

But fam does seem broke in this regards.

-- Additional comment from alexl@redhat.com on 2006-11-09 04:47 EST --
Well, gamin does use inotify too, so if the kernel part works this seems to be a
bug in the gamin inotify support.

-- Additional comment from thomas.canniot@laposte.net on 2006-11-10 12:34 EST --
Seems I have the same kind of bug but with non nfs.

When I add a music folder with nautilus into the directory from where rhythmbox
makes its database of music files, I have to make rhythmbox rescan the directory
for it to find the new subdirectory. 
On FC5, everything works smoothly without having to rescan anything and
rhythmbox apply any changes made in the directory.

-- Additional comment from andrew@digital-domain.net on 2006-11-14 05:03 EST --
Hmm, the FC5 gamin update (gamin-0.1.7-1.3.fc5) is also suffereing from this
problem. Just tested the libfam part at least, I'm now getting the FC6 output
from Comment #3 for FC5.
Comment 1 Matthias Clasen 2006-11-14 08:28:02 EST
I see this on beta2, too.   Adding an explicit

fsset nfs poll 10

to ~/.gaminrc does not fix it.
Comment 2 Alexander Larsson 2006-11-20 06:30:19 EST
gamin-0.1.7-8.el5 has the fix built.
Comment 3 Zack Cerza 2006-12-07 13:11:48 EST
Adding and removing files via the terminal on an NFS mount is reflected properly
in nautilus now.
Comment 4 Yan Tian 2006-12-11 00:19:11 EST
Verified gamin-0.1.7-8.el5 was in RHEL5-Client-20061207.0 system. Resolved it.

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