From owner-freebsd-bugs@FreeBSD.ORG Wed Nov 21 04:29:14 2007 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D5D416A41A for ; Wed, 21 Nov 2007 04:29:14 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.176]) by mx1.freebsd.org (Postfix) with ESMTP id E15EE13C4C4 for ; Wed, 21 Nov 2007 04:29:13 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so2789121waf for ; Tue, 20 Nov 2007 20:29:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=e37Vy3EqXJ7XyLIIZlc/3emuu7qcxwnXuaBMoSai5+I=; b=a4iX2IyKKll1HP3uiIxqHF3cSdenvAb8jSQTkddCeVxzBvkLH9W6eoEEBKsEYDorBleYQQ7Aapz/iIOnAdB4fNL4ogIjBAPWaS4/vKeX45sZeyTAUTHYv3ILoIgXHVPTVm7bvWplhulgRMOBq+TvBUu3swzKL9SbP/NNbWP3kaQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=fKrAnv3B5mYiw5QO6t/LbQ6YVTGDpTI4TfpghQspuuJZDinwcrP9LTPbiIzLmPdvPkCO6B8tzcbT1snWLTEhy2msBKGV6LfbVDSsdWchoZ0cj+aCIF0DdXV3WzlF54idJPPmmq+LXHj7KxACNdn1MpF8UlvBr3uX+xD4o7QhBIg= Received: by 10.114.107.19 with SMTP id f19mr153815wac.1195619352886; Tue, 20 Nov 2007 20:29:12 -0800 (PST) Received: by 10.114.13.15 with HTTP; Tue, 20 Nov 2007 20:29:12 -0800 (PST) Message-ID: Date: Tue, 20 Nov 2007 20:29:12 -0800 From: "Kip Macy" To: "Jin Guojun" In-Reply-To: <4743B04D.8030305@george.lbl.gov> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200711170119.lAH1Jokl048803@freefall.freebsd.org> <473E451C.8090103@george.lbl.gov> <4743B04D.8030305@george.lbl.gov> Cc: freebsd-bugs@freebsd.org, kmacy@freebsd.org Subject: Re: kern/37436: [hang] accept dead loop when out of file descriptors X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Nov 2007 04:29:14 -0000 If you can send me a test case to reproduce I'll track down where the error is coming from. -Kip On Nov 20, 2007 8:13 PM, Jin Guojun wrote: > > Kip Macy wrote: > > >On Nov 16, 2007 5:34 PM, Jin Guojun wrote: > > > > > >>kmacy@FreeBSD.org wrote: > >> > >> > >> > >>>Synopsis: [hang] accept dead loop when out of file descriptors > >>> > >>>State-Changed-From-To: open->feedback > >>>State-Changed-By: kmacy > >>>State-Changed-When: Sat Nov 17 01:19:37 UTC 2007 > >>>State-Changed-Why: > >>> > >>>Is this still an issue? > >>> > >>>http://www.freebsd.org/cgi/query-pr.cgi?pr=37436 > >>> > >>> > >>> > >>> > >>I will check into it in a week. > >> > >> > > > >By "still", I mean RELENG_6 or better yet RELENG_7. > > > > -Kip > > > > > Another slightly odd thing is discovered during repeat this test. > The maximum number of threads (pthread_create via libthr) can be created > is 111. > Therefore, there is no way to reproduce this problem due to > pthread_create problem. > > The pthread_create() fails due to Error<35> Resource temporarily > unavailable. However, > memory allocation is still functioning. I have tested on a 256MB laptop > and a 1GB desktop, > both had the same problem for pthread creation -- maximum 111 threads > can be created. > Below is my resource limits and I do not believe that is the problem: > > /home/users/libthr: limit > cputime unlimited > filesize unlimited > datasize 1048028 kbytes > stacksize 65536 kbytes > coredumpsize unlimited > memoryuse unlimited > vmemoryuse unlimited > descriptors 11095 > memorylocked unlimited > maxproc 5547 > sbsize unlimited > > It looks like 6.2-R and RELENG_6/7 kernel has some restriction on number > of threads to handle, > because all libthr, libpthread and libc_r all behave the same. > Is this true? > > So, that only test can be done is to set descriptors limit to 117 on the > server to test 111 > connections from a client. Such test is Ok. > If the descriptors limit is set to 116, the accept will return error > without hanging. > But I do not know if this will be true when the number of descriptors > used is larger. > > I tried to run the same command multiple times on the same client, it > does not help much. > I will look this issue further. > > -Jin >