From owner-freebsd-current@FreeBSD.ORG Mon Jun 7 20:16:28 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D5E7C16A4CE for ; Mon, 7 Jun 2004 20:16:28 +0000 (GMT) Received: from winston.piwebs.com (217-19-20-178.dsl.cambrium.nl [217.19.20.178]) by mx1.FreeBSD.org (Postfix) with SMTP id 0798743D58 for ; Mon, 7 Jun 2004 20:16:28 +0000 (GMT) (envelope-from avleeuwen@piwebs.com) Received: (qmail 817 invoked from network); 7 Jun 2004 20:16:21 -0000 Received: from vincent.piwebs.com (192.168.0.84) by winston.piwebs.com with SMTP; 7 Jun 2004 20:16:21 -0000 From: Arjan van Leeuwen To: Robert Watson Date: Mon, 7 Jun 2004 22:16:24 +0200 User-Agent: KMail/1.6.2 References: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Boundary-02=_d0MxAuVjRZMafXQ"; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200406072216.29044.avleeuwen@piwebs.com> cc: freebsd-current@freebsd.org cc: "David A. Benfell" Subject: Re: file descripter leak in current with Qmail? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: avleeuwen@piwebs.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jun 2004 20:16:29 -0000 --Boundary-02=_d0MxAuVjRZMafXQ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 07 June 2004 21:42, you wrote: > On Mon, 7 Jun 2004, Arjan van Leeuwen wrote: > > > > In terms of debugging it: your first task it to identify if there's > > > > one process that's holding all the fd's, or if it is distributed ov= er > > > > many proceses. After that, you want to track down what kind of fd = is > > > > being left open, which may help you track down why it's left open... > > > > > > Just as I'm reading this, I'm seeing the same thing on my -CURRENT > > > server, which has a _very_ low load (atm, it's only routing the > > > internet traffic for 3 users and serving SMTP for 2 of them). I'm also > > > running qmail. The kernel is from June 6. How do I go about > > > investigating this further? > > > > Replying to myself - > > fstat shows all open files evenly distributed among the running > > processes. > > It could be that this is related to the esd file descriptor leak problem > also being reported. You might also try the attached patch. I get a panic (address not allocated) when using the patch. I can't write d= own=20 any useful details about it right now, because although the server has only= 3=20 users, they're very disconcerned when I disrupt their internet traffic :). Best regards, Arjan > > Robert N M Watson FreeBSD Core Team, TrustedBSD Projects > robert@fledge.watson.org Senior Research Scientist, McAfee Research > > Index: uipc_syscalls.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /data/ncvs/src/sys/kern/uipc_syscalls.c,v > retrieving revision 1.187 > diff -u -r1.187 uipc_syscalls.c > --- uipc_syscalls.c 7 Jun 2004 09:59:50 -0000 1.187 > +++ uipc_syscalls.c 7 Jun 2004 19:38:39 -0000 > @@ -285,7 +285,7 @@ > if ((head->so_state & SS_NBIO) && TAILQ_EMPTY(&head->so_comp)) { > ACCEPT_UNLOCK(); > error =3D EWOULDBLOCK; > - goto done; > + goto noconnection; > } > while (TAILQ_EMPTY(&head->so_comp) && head->so_error =3D=3D 0) { > if (head->so_state & SS_CANTRCVMORE) { > @@ -296,14 +296,14 @@ > "accept", 0); > if (error) { > ACCEPT_UNLOCK(); > - goto done; > + goto noconnection; > } > } > if (head->so_error) { > error =3D head->so_error; > head->so_error =3D 0; > ACCEPT_UNLOCK(); > - goto done; > + goto noconnection; > } > so =3D TAILQ_FIRST(&head->so_comp); > KASSERT(!(so->so_qstate & SQ_INCOMP), ("accept1: so SQ_INCOMP")); > > > > !DSPAM:40c4c5b6283404763116770! --Boundary-02=_d0MxAuVjRZMafXQ Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBAxM0d3Ym57eNCXiERAjnQAJ9kvpK+myUOOLehWoymlWBtVkA3FgCeM0XR gex5oXPPS28XDdrCvlwtqgg= =jM/Y -----END PGP SIGNATURE----- --Boundary-02=_d0MxAuVjRZMafXQ--