From owner-freebsd-hackers Sat Jun 21 02:26:30 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id CAA20741 for hackers-outgoing; Sat, 21 Jun 1997 02:26:30 -0700 (PDT) Received: from scanner.worldgate.com (scanner.worldgate.com [198.161.84.3]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id CAA20736 for ; Sat, 21 Jun 1997 02:26:25 -0700 (PDT) Received: from znep.com (uucp@localhost) by scanner.worldgate.com (8.8.5/8.8.5) with UUCP id DAA03471; Sat, 21 Jun 1997 03:26:18 -0600 (MDT) Received: from localhost (marcs@localhost) by alive.znep.com (8.7.5/8.7.3) with SMTP id DAA23462; Sat, 21 Jun 1997 03:26:49 -0600 (MDT) Date: Sat, 21 Jun 1997 03:26:48 -0600 (MDT) From: Marc Slemko To: sthaug@nethelp.no cc: hackers@FreeBSD.ORG Subject: Re: gethostbyname() and fds >255 In-Reply-To: <23110.866883503@verdi.nethelp.no> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Sat, 21 Jun 1997 sthaug@nethelp.no wrote: > > > For comparison, it works fine on BSD/OS 2.1. Does it work in -current? > > > > It would appear to: > > > > 396: host = 198.161.84.2 (valis.worldgate.com) > > 397: host = 198.161.84.2 (valis.worldgate.com) > > 398: host = 198.161.84.2 (valis.worldgate.com) > > 399: host = 198.161.84.2 (valis.worldgate.com) > > root@make-> uname -a > > FreeBSD make.ican.net 3.0-CURRENT FreeBSD 3.0-CURRENT #0: Mon Jun 16 13:10:14 EDT 1997 jkh@make.ican.net:/a/local/src/sys/compile/MAKE i386 > > > > It does indeed fall over on my 2.2-stable system. > > The problem is in res_send(). In lib/libc/net/res_send.c line 577 in > FreeBSD-current we have: Sigh. Yes, that's it. I found it an hour or so ago looking through things. For a test, rebuilding libc with FD_SETSIZE=1024 then linking it against my test program worked fine. That isn't very nice. It appears the only reason it works in -current (well, it will break at 1024 fds there...) is that FD_SETSIZE has been increased. Guess I'll have to double check what else was broken when FD_SETSIZE was increased and make a patch for 2.2 that I can point people to. My biggest concern in this is that Apache 1.2 will not work with >~255 fds used for logs without recompiling libc with a larger FD_SETSIZE.