From owner-freebsd-stable@FreeBSD.ORG Fri Mar 31 00:48:43 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 232D016A400 for ; Fri, 31 Mar 2006 00:48:43 +0000 (UTC) (envelope-from davidxu@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8008E43D8B for ; Fri, 31 Mar 2006 00:48:42 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from localhost.my.domain (root@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k2V0mflY006932 for ; Fri, 31 Mar 2006 00:48:42 GMT (envelope-from davidxu@freebsd.org) From: David Xu To: freebsd-stable@freebsd.org Date: Fri, 31 Mar 2006 08:48:29 +0800 User-Agent: KMail/1.8.2 References: <200603221755.25666.doconnor@gsoft.com.au> <200603222349.45539.doconnor@gsoft.com.au> <200603311108.37829.doconnor@gsoft.com.au> In-Reply-To: <200603311108.37829.doconnor@gsoft.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200603310848.30037.davidxu@freebsd.org> Subject: Re: Process hanging on 6.0-STABLE X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Mar 2006 00:48:43 -0000 =D4=DA Friday 31 March 2006 08:38=A3=ACDaniel O'Connor =D0=B4=B5=C0=A3=BA > On Wednesday 22 March 2006 23:49, Daniel O'Connor wrote: > > On Wednesday 22 March 2006 18:41, David Xu wrote: > > > > The problem is that every now and then the process gets stuck and > > > > becomes unkillable just after forking, ie.. > > > > > > Are you using pthreads ? > > > > Nope. >=20 > Hmm I just found I had an FD leak - I am not sure if it's related. >=20 > Interestingly I had ~1046 FDs open and FD_SET wasn't working properly, eg= =2E.. > fd_set fds; > int fd; >=20 > fd =3D 1046; > FD_ZERO(&fds); > FD_SET(fd, &fds); >=20 > Results in fds being empty :( >=20 > Does anyone know if that is expected behaviour? And whether this problem= =20 could=20 > cause the second one (eg tickle a bug). >=20 > Thanks. >=20 > --=20 > Daniel O'Connor software and network engineer > for Genesis Software - http://www.gsoft.com.au > "The nice thing about standards is that there > are so many of them to choose from." > -- Andrew Tanenbaum > GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C >=20 In /sys/sys/select.h : #ifndef FD_SETSIZE #define FD_SETSIZE 1024U #endif so you should define FD_SETSIZE if you have fd which is larger than 1024. Regards, David Xu