From owner-freebsd-ports@FreeBSD.ORG Mon Jan 23 20:26:18 2006 Return-Path: X-Original-To: ports@FreeBSD.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 168EC16A41F; Mon, 23 Jan 2006 20:26:18 +0000 (GMT) (envelope-from jylefort@FreeBSD.org) Received: from host-212-68-242-42.brutele.be (host-212-68-242-42.brutele.be [212.68.242.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id D79CA43D58; Mon, 23 Jan 2006 20:26:16 +0000 (GMT) (envelope-from jylefort@FreeBSD.org) Received: from jsite.lefort.net (jsite.lefort.net [192.168.1.2]) by gateway.lefort.net (Postfix) with ESMTP id 02CB8556B; Mon, 23 Jan 2006 21:26:14 +0100 (CET) Received: from jsite.lefort.net (localhost [127.0.0.1]) by jsite.lefort.net (Postfix) with SMTP id B0B16C0EC; Mon, 23 Jan 2006 21:26:14 +0100 (CET) Date: Mon, 23 Jan 2006 21:26:14 +0100 From: Jean-Yves Lefort To: Alex Dupre Message-Id: <20060123212614.6f570f8f.jylefort@FreeBSD.org> In-Reply-To: <43D47E36.1070906@FreeBSD.org> References: <20060123040721.GA95972@xor.obsecurity.org> <43D47E36.1070906@FreeBSD.org> X-Mailer: Sylpheed running on FreeBSD Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Mon__23_Jan_2006_21_26_14_+0100_wBF0gRADJH9n0ruB" Cc: ports@FreeBSD.org, kris@obsecurity.org Subject: Re: fam vs gamin X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jan 2006 20:26:18 -0000 --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 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--