From owner-freebsd-bugs Sat Oct 14 13:30:05 1995 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id NAA16919 for bugs-outgoing; Sat, 14 Oct 1995 13:30:05 -0700 Received: (from gnats@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id NAA16913 ; Sat, 14 Oct 1995 13:30:02 -0700 Resent-Date: Sat, 14 Oct 1995 13:30:02 -0700 Resent-Message-Id: <199510142030.NAA16913@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, volf@oasis.IAEhv.nl Received: from iaehv.IAEhv.nl (root@iaehv.IAEhv.nl [192.87.208.2]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id NAA16876 for ; Sat, 14 Oct 1995 13:27:31 -0700 Received: from oasis.IAEhv.nl by iaehv.IAEhv.nl (8.6.12/1.63) id VAA16046; Sat, 14 Oct 1995 21:27:26 +0100 Received: by oasis (8.6.12/1.63) id VAA01503; Sat, 14 Oct 1995 21:26:16 +0100 Message-Id: <199510142026.VAA01503@oasis> Date: Sat, 14 Oct 1995 21:26:16 +0100 From: volf@oasis.IAEhv.nl (Frank Volf) Reply-To: volf@oasis.IAEhv.nl To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/781: MAX_OPEN and FD_SETSIZE Sender: owner-bugs@freebsd.org Precedence: bulk >Number: 781 >Category: kern >Synopsis: OPEN_MAX in kernel config and FD_SETSIZE in /usr/include/sys/types.h mismatch >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Oct 14 13:30:01 PDT 1995 >Last-Modified: >Originator: Frank Volf >Organization: ---------------------------------------------------------------------------- Frank Volf - Internet Access Eindhoven - Digitale Stad Eindhoven ---------------------------------------------------------------------------- || volf@oasis.IAEhv.nl - use for personal mail || || volf@IAEhv.nl - use for Internet Access Eindhoven related mail || || volf@dse.dse.nl - use for Digital City of Eindhoven related mail || ---------------------------------------------------------------------------- IAE Public Access Unix System - Dial +31.40.2439436 and login as new. ---------------------------------------------------------------------------- >Release: FreeBSD 2.0-BUILT-19950603 i386 >Environment: FreeBSD 2.0.5 from CD, nothing fancy in the kernel config >Description: The OPEN_MAX define in the kernel configuration can be used to have a large number of open file descriptors (e.g. 512), getdtablesize returns the value set by OPEN_MAX (this is ok), FD_SETSIZE in /usr/include/sys/types.h is defined as 256. sys_generic.c (containing the code for select()) is compiled with this FD_SETSIZE set to 256. The select() fails at runtime if it is called with a nfds > FD_SETSIZE, because it is compiled with the FD_SETSIZE value, and does not know about OPEN_MAX > 256 >How-To-Repeat: See above. >Fix: Preferable automatic generation of the types.h file from kernel configuration by /usr/sbin/config. Please, let me know the status of this bug report (maybe I did something wrong). Frank >Audit-Trail: >Unformatted: