From nobody Fri Dec 12 16:08:21 2025 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dSZBD6fWvz6Jrsq for ; Fri, 12 Dec 2025 16:08:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dSZBD68xTz3nTl for ; Fri, 12 Dec 2025 16:08:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765555700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zlAYQCQittb2GfgYErV1rKWgdqLwtx7zDEssDbW9ia8=; b=svBGMwgsh6Izk7EQro7eaTeCK4riw3sp49F5Su8dxVOYEoPlzl/iWCIhJoaXGaLBOdDMHR qgsBGoWmSXp9T681yNdVaBGGjWV1ry5OgW/NJjFAAutodNlu1F8XPxhwUjgLoIt7u7niAK PQkyYE4By4Ab2LxVrXma53ld7wRtaMicwUD7x35UMI7wRk9p7Z/zmcMNf1sSCvqtngnTus MIZ2BOvLdjHAGH/gfefOTfddO6nk3zABHLJQRL9IQKCXhMOn5IhIRoX/VoMb5rb/8/qJgg gbBJejBLrzM0Vmi3MtCrCfqVs/NT7wd3RBRyZOTo4gffFaWSAbU2NF0qalDo9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765555700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zlAYQCQittb2GfgYErV1rKWgdqLwtx7zDEssDbW9ia8=; b=SV9OUlwvi68aW7YSKONv5TZzH7Wk6O+5fqxqy7UBZP5GLXIOBVE/sncDzP1MUCHxc0mT6Q Fe1AK2V/5AwdEq34iSx13hvznIgMpwsvL13jEAqRDP0OVdf25rlOMtiaM2d2FNYM2y5/z6 2en4028a/EYeDdZNLJ79mmWAUqW7uYgQgGKP2X1NOA9x9mklu8ciJ4KbPCXB7bK3oWHTCh YRmNCwr2s6bC0qgWDQo+rd+NUN8dYOkxmNYN21vBiFBCQadmMzuz8zdhzC0wmaPl44iQF3 Zs+LjJBkAd7wtBThMMVZ/K1oMglquUk3GzfGGP94zv5wPG4S4JLWJ//DQL5jjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765555700; a=rsa-sha256; cv=none; b=a5ExH6/L7vfPdZDIQGhXQJcfBsaiQVxwQnl+HSIjGhU0+KLZNBKOYZafOMDx7Fx8OcoUyK e/FsrIQN/nMRTXTt4Pdd7OyC1bpHgr7sWuvfwgGt+KeLnBy2I1b8JY5SopgtAqi9I//ANE gb9Bap4eo85ile3zIV4J5m12CDgZ+nZ16LbqT1jlbnbelko4en3QmlCDTDCvQqIdfWd0fU WgcGoGqB/B19bQOKode5OlGXoYGzuheagHQIY+/x6zUGKyjju+K4ocFNwEuJDorxU7HQYF u7Ux5KpRu/73LW22ajPLrOHorlrvDEAQ0Bsu1qwUojFYiL5L6kOM3f6mntADiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4dSZBD5mSqz85P for ; Fri, 12 Dec 2025 16:08:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 5BCG8Kfg092973 for ; Fri, 12 Dec 2025 16:08:20 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 5BCG8KLB092972 for bugs@FreeBSD.org; Fri, 12 Dec 2025 16:08:20 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 291610] libc stdio breaks when file descriptor greater than 32767 Date: Fri, 12 Dec 2025 16:08:21 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 14.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: kris@tranception.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D291610 --- Comment #1 from Kristofer Peterson --- Further to this issue, I did apply the ten year old patch from github.com/bsdjhb/freebsd.git (branch stdio_file) to a checkout of git.freebsd.org/src.git (tag: release/14.3.0-p6), built and installed world into a jail, and was then able to run a simple test program that fopen()'d = over 0xffff files successfully. I did have to change the K&R style function declarations to ANSI (i.e. type immediately before identifier) but otherwise the diffs applied fairly clean= ly. I also bumped the new fopen and friends symbol versions from @FBSD_1.4 to @FBSD_1.6 (I'm not sure what the symbol versioning convention is - perhaps = it should have been FBSD_1.7 so the "7" corresponds to libc.so.7; what mattered for my testing is that it was different from @FBSD_1.0.) I then rebuilt the application (which is a rust application) and all of its dependencies from ports against the modified libc, world. The initial EMFILE error came from a fdopen() call in rocksdb but when run with the rebuilt application it worked successfully and continued running with procstat -f showing over 35k open files. --=20 You are receiving this mail because: You are the assignee for the bug.=