Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jan 2006 21:26:14 +0100
From:      Jean-Yves Lefort <jylefort@FreeBSD.org>
To:        Alex Dupre <ale@FreeBSD.org>
Cc:        ports@FreeBSD.org, kris@obsecurity.org
Subject:   Re: fam vs gamin
Message-ID:  <20060123212614.6f570f8f.jylefort@FreeBSD.org>
In-Reply-To: <43D47E36.1070906@FreeBSD.org>
References:  <20060123040721.GA95972@xor.obsecurity.org> <43D47E36.1070906@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--Signature=_Mon__23_Jan_2006_21_26_14_+0100_wBF0gRADJH9n0ruB
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, 23 Jan 2006 07:56:54 +0100
Alex Dupre <ale@FreeBSD.org> wrote:

> Kris Kennaway wrote:
> > Are devel/fam and gamin supposed to be compatible?  They both provide
> > a libfam, but since I switched from fam to gamin, my courier-imap is
> > segfaulting.  This persists after I rebuild it.
>=20
> The library should be 100% compatible, since gamin uses the fam
> interface, but it doesn't implement all the fam functions (for a
> complete list of differences look here:
> http://www.gnome.org/~veillard/gamin/differences.html). If your
> courier-imap doesn't do something unsupported in gamin, the libraries
> should be completely interchangeble.
> *But* I'm working at my real job on a project using gamin, and just
> friday I found a very strange behaviour (probably a bug) of gamin with
> kqueue backend monitoring a few directories with thousands of files
> inside (lost or delayed events). Switching to polling solved the
> problem, this is the reason I think it's a kqueue implementation bug.
> Today I'll do other tests, more accurately. Stay tuned.

The delays are likely caused by the fact that you have reached the
file descriptor limit; beyond that limit, gamin can no longer monitor
files with kqueue, and has to periodically lstat() them. You should
try to set a very large kern.maxfiles in /boot/loader.conf (you need
one file descriptor per monitored file); see pkg-message for details.

However, events should never be lost (although they can be
substantially delayed when monitoring a very large directory on a slow
machine, because event processing time increases linearly with the
number of files contained in the directory). Please cc your findings
to me.

--=20
Jean-Yves Lefort

jylefort@FreeBSD.org
http://lefort.be.eu.org/

--Signature=_Mon__23_Jan_2006_21_26_14_+0100_wBF0gRADJH9n0ruB
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFD1TvmyzD7UaO4AGoRAhliAJ49cLBgANZJqJ4m9oaB6JSH7CtFbwCfcWhb
9jjXuO1NqxQyA14Tgy9Ek3w=
=pXo9
-----END PGP SIGNATURE-----

--Signature=_Mon__23_Jan_2006_21_26_14_+0100_wBF0gRADJH9n0ruB--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060123212614.6f570f8f.jylefort>