Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 24280 - fam-oss-2.6.10 ebuild makes fam unable to connect to a remote fam
Summary: fam-oss-2.6.10 ebuild makes fam unable to connect to a remote fam
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Nick Hadaway
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-11 07:42 UTC by Danny Milosavljevic
Modified: 2003-08-22 03:33 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Danny Milosavljevic 2003-07-11 07:42:40 UTC
Hi!

The fam-oss-2.6.10 ebuild makes fam unable to connect to a remote fam (and fam-oss-2.6.9 did too) .

I am not talking about local_only=True, I set that back to "false", but about the actual ability to 
contact a remote fam (or the check to see if file X is remote or local, dunno).

I downloaded fam-2.6.10 and the dnotify patch from sgi, compiled, installed by hand, and it worked 
fine. So the problem can be narrowed down to have to be in some of the additional things the ebuild 
does (in addition to applying the dnotify patch and compiling)...

I think there is some glitch in the ebuild or in some of the additional patches the ebuild uses...

Reproduction:
   Host 1: start fam
   Host 2: set local_only = False, start fam
   Host 2: go to your favourite filemanager, point it to an nfs mounted directory (host 1 mount)
   Host 1: change a file
   Host 2: didn't notice until *very* far in the future

If you need any more info etc, I'll be glad to help... I'm just at a loss on where to start looking, I think 
the original author of all these patches would know better than me ;)

Also, how's the linux kernel imon patch going ? I'd like to switch to imon because dnotify has poor 
performance anyways - even if it works :)
Comment 1 Nick Hadaway 2003-07-11 14:09:34 UTC
Change the line in the 2.6.10 ebuild from dnotify.patch.new to dnotify.patch and let me know if you still have problems.
Comment 2 Nick Hadaway 2003-07-12 02:36:30 UTC
re: imon  it is available as an option in the gentoo-sources-2.4.20-r5 kernel which is currently stable... i'm not sure when it first was in.
Comment 3 Danny Milosavljevic 2003-07-18 16:15:28 UTC
ooookay... The Problem is in the KERNEL... geeeeez that was a hell of a debugging session ;)

reproduction:
int main(int argc, char *argv[])
{
        struct statvfs fs_status;

        /*"/mnt/ifurita-logs/syslog"*/
        int     rc = statvfs(argv[1], &fs_status);

        if (rc >= 0) {
                printf("OK %d\n", fs_status.f_fsid);
        }

        return 0;
}

and call this with a nfs mounted directory. It returns 0 (for "root file system"), which is wrong.

confirmed with linux-2.4.21 and linux-2.5.75 :(

gah, never handled kernel bugs, what now ?

Comment 4 Danny Milosavljevic 2003-07-18 16:16:22 UTC
argh, #include <sys/statvfs.h> ....

Comment 5 Danny Milosavljevic 2003-07-19 04:53:12 UTC
statvfs 
- works for xfs partitions

- does not work for ext2,ext3,nfs

- others untested
Comment 6 Nick Hadaway 2003-07-23 08:43:40 UTC
Did you ever try our 1.6.10 ebuild changing the dnotify.patch.new line to dnotify.patch?
Comment 7 Danny Milosavljevic 2003-07-23 13:46:22 UTC
yes, I did, but it did not help ... then I started debugging to find out why it still doesn't and discovered the cause, Until that is fixed, it can be worked around by #undef'ing HAVE_STATVFS in config.h (so that HAVE_STATVFS never is defined and thus never is used).  (after configure)

Then it works in all cases. Local. Remote. Links. :D


Comment 8 Danny Milosavljevic 2003-07-23 13:53:34 UTC
btw, the comment for HAVE_STATVFS in config.h reads like this:

/*  Define if we have statvfs.  Otherwise, statfs will be used.  */

That's a lie ;) statfs is never used. It just uses regular (string) pathname expansion in case statvfs is unavailable. Slower but works.

I think the automake stuff could be patched to compile a test program which checks the fsid for 0, and, if it is, screams in terror, and disables statvfs... but I cannot do stuff in automake that good yet... sorry...

Comment 9 Nick Hadaway 2003-07-26 02:21:48 UTC
#
#  local_only makes fam ignore requests from remote clients & remote fams.
#  Note that this is ignored if fam is started by inetd.
#
#  The -L command-line argument overrides this option.
#
local_only = true

In your scenario you have set local_only = false on Host 2.  It would seem that you need to put local_only = false on Host 1 though as that is the host that is getting "requests from remote clients & remote fams"

Please change the setting on Host 1 and let me know if you fine things to be working properly.
Comment 10 Danny Milosavljevic 2003-07-26 09:05:03 UTC
I just checked... I have local_only=false on both machines
Comment 11 Nick Hadaway 2003-07-27 22:35:19 UTC
That's a lie ;) statfs is never used. It just uses regular (string) pathname expansion
in case statvfs is unavailable. Slower but works.

When you said that, what do you mean, slower but works?  Are there possible problems with NOT using statvfs?  
Comment 12 Danny Milosavljevic 2003-07-28 02:13:58 UTC
no, its just slower... (multiple string manipulation operations as opposed to comparing two dwords per request)

I use the string-parsing (non-statvfs) version without any problems...
Comment 13 Nick Hadaway 2003-07-30 14:44:46 UTC
fam-2.6.10/TODO:- configure.in ignores the test for sys/statvfs.h on Linux because the f_fsid

hrm... 

anyway... i have added 2.6.10-r1 to portage which changes the statvfs stuff.

Please test and let me know if things work as expected. :)

Comment 14 Danny Milosavljevic 2003-08-02 07:12:13 UTC
yup, woriks fine now :)

Thanks ! :)
Comment 15 Nick Hadaway 2003-08-13 21:05:05 UTC
More verification needs to happen before this is considered a stable ebuild but I am hoping that this change is a positive one. :)
Comment 16 kfm 2003-08-22 03:33:06 UTC
This bug has made for very informative reading. In any case, I am just posting to say that fam-oss-2.6.10-r1 works very well for me in all cases. On my workstation with a NFS mounted /home, changes display instantaneously in Nautilus. Also, my server has courier-imap-2.0.0 running (comiled against libfam, also 2.6.10-r1 for IMAP IDLE support) and all is well. :)