From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 18 21:29:15 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D10A2763 for ; Tue, 18 Nov 2014 21:29:15 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93A2A694 for ; Tue, 18 Nov 2014 21:29:15 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XqqKn-000D2M-ER; Tue, 18 Nov 2014 21:29:13 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id sAILTC2t006632; Tue, 18 Nov 2014 14:29:12 -0700 (MST) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+HkAWVpIiFTzclk290ceAr X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: Running 8 building 10 gives "Out of file descriptors" ? From: Ian Lepore To: Dieter BSD In-Reply-To: References: Content-Type: text/plain; charset="us-ascii" Date: Tue, 18 Nov 2014 14:29:11 -0700 Message-ID: <1416346151.1147.62.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 21:29:15 -0000 On Tue, 2014-11-18 at 12:08 -0800, Dieter BSD wrote: > amd64 running 8.2 > Attempting to update to 10.1 > Need to build custom 10.1 kernel on machine running 8.2. > Installed binaries and src off to the side. > Attempts to compile kernel directly failed. > Attempts to build 10.1 "make" as 8.2 binary failed. > Chroot to 10.1 tree. > Attempt to build kernel (using stock GENERIC config file and stock sources > for now) failed: > > >>> stage 3.1: making dependencies > -------------------------------------------------------------- > cd /usr/obj/usr/src/sys/GENERIC; MAKEOBJDIRPREFIX=/usr/obj MACHINE_ARCH=amd64 \ > MACHINE=amd64 CPUTYPE= GROFF_BIN_PATH=/usr/obj/usr/src/tmp/legacy/usr/bin GR\ > OFF_FONT_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/groff_font GROFF_TMAC_PATH\ > =/usr/obj/usr/src/tmp/legacy/usr/share/tmac _SHLIBDIRPREFIX=/usr/obj/usr/src/t\ > mp _LDSCRIPTROOT= VERSION="FreeBSD 10.1-RELEASE amd64 1001000" INSTALL="sh /\ > usr/src/tools/install.sh" PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/u\ > sr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/sr\ > c/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/us\ > r/obj/usr/src/tmp/usr/games:/sbin:/bin:/usr/sbin:/usr/bin CC="cc " CXX="c++ " \ > CPP="cpp " AS="as" AR="ar" LD="ld" NM=nm OBJDUMP= RANLIB=ranlib STRINGS= COMP\ > ILER_TYPE=clang make -m /usr/src/share/mk KERNEL=kernel depend -DNO_MODULES_O\ > BJ > machine -> /usr/src/sys/amd64/include > x86 -> /usr/src/sys/x86/include > cc -c -O2 -pipe -fno-strict-aliasing -std=c99 -g -Wall -Wredundant-decls -Wnes\ > ted-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -\ > Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs\ > -fdiagnostics-show-option -Wno-error-tautological-compare -Wno-error-empty-bod\ > y -Wno-error-parentheses-equality -Wno-error-unused-function -nostdinc -I. -I/u\ > sr/src/sys -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/ipfilter -I/usr/s\ > rc/sys/dev/ath -I/usr/src/sys/dev/ath/ath_hal -I/usr/src/sys/contrib/dev/ath/at\ > h_hal -I/usr/src/sys/contrib/ngatm -I/usr/src/sys/dev/twa -I/usr/src/sys/dev/cx\ > gb -I/usr/src/sys/dev/cxgbe -I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERN\ > EL_OPTION_HEADERS -include opt_global.h -fno-omit-frame-pointer -mno-omit-leaf-\ > frame-pointer -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse\ > -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector \ > -gdwarf-2 /usr/src/sys/amd64/amd64/genassym.c > NM='nm' sh /usr/src/sys/kern/genassym.sh genassym.o > assym.s > Out of file descriptors > *** Error code 2 > > > Maybe I need to build the 10.1 toolchain as 8.2 binaries? > nice -20 make kernel-toolchain > /tmp/make_kernel_toolchain_out 2>&1 > Result: > mkdep -f .depend -a -I/usr/src/tools/build/../../contrib/libc-pwcache -I/usr\ > /src/tools/build/../../lib/libc/include -I/usr/obj/usr/src/tmp/legacy/usr/inclu\ > de -std=gnu99 /usr/src/tools/build/../../contrib/libc-pwcache/pwcache.c > Out of file descriptors > > Wrote a very small C program. Result: > getdtablesize() returned 11095 > > The 10.1 mkdep is the same as 8.2 except for comments. > > It seems unlikely that it really needs more than 11095 file descriptors. > So what is going on, and how do I fix it? > > [ Obviously I have thought of booting stock 10.1 and then building > new kernel, but I can't take the machine down that long. ] I've been building 10.x and 11.x world and kernel from source on an 8.2 (and more recently now 8.4) system for a couple years, as recently as last night. I've never needed to do anything special. When I check sysctl kern.maxfiles it's set to 12328, not so different from yours. I wonder if some long-running process on your system is leaking away descriptors? A 'procstat -af' might help find that. -- Ian