From owner-freebsd-hackers@FreeBSD.ORG Fri May 30 10:16:51 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4217237B401; Fri, 30 May 2003 10:16:51 -0700 (PDT) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 94E6743F85; Fri, 30 May 2003 10:16:47 -0700 (PDT) (envelope-from ru@whale.sunbay.crimea.ua) Received: from whale.sunbay.crimea.ua (ru@localhost [127.0.0.1]) h4UHGfEd061142 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 May 2003 20:16:41 +0300 (EEST) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.12.9/8.12.8/Submit) id h4UHGfYC061137; Fri, 30 May 2003 20:16:41 +0300 (EEST) (envelope-from ru) Date: Fri, 30 May 2003 20:16:41 +0300 From: Ruslan Ermilov To: Enache Adrian Message-ID: <20030530171641.GA60607@sunbay.com> References: <20030530143541.GB42349@sunbay.com> <20030530160723.GB872@ratsnest.hole> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VS++wcV0S1rZb1Fb" Content-Disposition: inline In-Reply-To: <20030530160723.GB872@ratsnest.hole> User-Agent: Mutt/1.5.4i cc: Daniel Eischen cc: hackers@FreeBSD.org cc: Sergey Starosek cc: Yaroslav Levchenko Subject: Re: libc_r: threaded application could stuck in accept(2) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 May 2003 17:16:51 -0000 --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 30, 2003 at 07:07:23PM +0300, Enache Adrian wrote: > On Fri, May 30, 2003 at 05:35:41PM +0300, Ruslan Ermilov wrote: > > We had a bug in our threaded application that would mistakenly close > > the descriptor 0, and this triggers a bug in libc_r which I will try > > to describe below. > ... > > Some important notes: this bug is only applicable to descriptors > > 0 - 2 (stdio set), and might have something to do with the code > > in uthread_fd.c. If you remove two lines that free the descriptor > > 0 in the attached test case, the bug won't manifest itself. >=20 > please have a look at >=20 > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D51535 >=20 Thanks, I had this same patch in my first version of the fix. Yes it works too, but do you have an insight what's going on without these fixes so that the 0..2 descriptors are left in a blocking mode? I just can't get it where this happens. P.S. I will commit both patches after the freeze is over. Cheers, --=20 Ruslan Ermilov Sysadmin and DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer. --VS++wcV0S1rZb1Fb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+15H5Ukv4P6juNwoRAuVTAJ9/hic75v3+9IDsG9XmwUhFymr5AwCeKkLT K8N4elu9aOEZW6H13dJ3gRI= =f3yz -----END PGP SIGNATURE----- --VS++wcV0S1rZb1Fb--