Bug 212551

Summary: gamin not working on nfs mounts
Product: [Fedora] Fedora Reporter: Andrew Clayton <andrew>
Component: gaminAssignee: Alexander Larsson <alexl>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6CC: thomas.canniot
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-11-20 17:15:49 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:
Bug Depends On:    
Bug Blocks: 215504    
Attachments:
Description Flags
Simple C program that uses FAM none

Description Andrew Clayton 2006-10-27 12:35:09 UTC
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

Comment 1 Andrew Clayton 2006-10-27 12:38:37 UTC
Created attachment 139573 [details]
Simple C program that uses FAM

Comment 2 Andrew Clayton 2006-10-27 12:45:15 UTC
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.


Comment 3 Andrew Clayton 2006-10-30 17:02:29 UTC
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,


Comment 4 Alexander Larsson 2006-11-08 16:05:57 UTC
The FC6 gnome-vfs2 uses inotify directly, not fam/gamin.
However, its meant to fall back to fam for nfs dirs.


Comment 5 Andrew Clayton 2006-11-08 21:04:20 UTC
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.

Comment 6 Alexander Larsson 2006-11-09 09:47:12 UTC
Well, gamin does use inotify too, so if the kernel part works this seems to be a
bug in the gamin inotify support.

Comment 7 Thomas Canniot 2006-11-10 17:34:43 UTC
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.

Comment 8 Andrew Clayton 2006-11-14 10:03:09 UTC
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 9 Alexander Larsson 2006-11-20 10:56:47 UTC
This is a bug in the polling backend not working (i.e. doing nothing) when using
the inotify code. I have a fix comming up.


Comment 10 Andrew Clayton 2006-11-20 11:07:48 UTC
Cool.

Cheers.


Comment 11 Fedora Update System 2006-11-20 16:50:16 UTC
gamin-0.1.7-8.fc6 has been pushed for fc6, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.

Comment 12 Fedora Update System 2006-12-04 14:27:54 UTC
gamin-0.1.7-8.fc6 has been pushed for fc6, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.