Bug 212551 - gamin not working on nfs mounts
gamin not working on nfs mounts
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: gamin (Show other bugs)
6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Alexander Larsson
:
Depends On:
Blocks: 215504
  Show dependency treegraph
 
Reported: 2006-10-27 08:35 EDT by Andrew Clayton
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-11-20 12:15:49 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)
Simple C program that uses FAM (2.02 KB, text/plain)
2006-10-27 08:38 EDT, Andrew Clayton
no flags Details

  None (edit)
Description Andrew Clayton 2006-10-27 08:35:09 EDT
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 08:38:37 EDT
Created attachment 139573 [details]
Simple C program that uses FAM
Comment 2 Andrew Clayton 2006-10-27 08:45:15 EDT
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 12:02:29 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,
Comment 4 Alexander Larsson 2006-11-08 11:05:57 EST
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 16:04:20 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.
Comment 6 Alexander Larsson 2006-11-09 04:47:12 EST
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 12:34:43 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.
Comment 8 Andrew Clayton 2006-11-14 05:03:09 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 9 Alexander Larsson 2006-11-20 05:56:47 EST
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 06:07:48 EST
Cool.

Cheers.
Comment 11 Fedora Update System 2006-11-20 11:50:16 EST
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 09:27:54 EST
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.

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