From nobody Fri Aug 7 15:30:53 2026 X-Original-To: dev-commits-src-all@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 4hGp5D29CHz6nGh9; Fri, 07 Aug 2026 15:30:56 +0000 (UTC) (envelope-from markj@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hGp5D0jbkz3lfp; Fri, 07 Aug 2026 15:30:56 +0000 (UTC) (envelope-from markj@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786116656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Vrw/YeeWL2aWfOwjija8WfE03LbRG/fcyU6mbz+1m6M=; b=FwEbXz+66/L3aMcmkdqB9HTY0mNkoXkBcM1uKzN7flS6tdpR/FREOvoKg1vJgzKPstncYl OK8RIufv4HD5Nk8AAA2vfJYOLothvkF9wd6Y0jeWh63mCcUJmbihRM7iHo+ygyvC3tMDbO CzqZbrdiuqyC7hVDM+qbnSQshuYzPN3w/63SiM0+n4kya4xNi9PVjXx7+gex4bsP+cZEDb 1QONK397Q2gtaI0DbO6gWafLdHyF0la8RWL9wz3P/rLNiGlHF60MFtWK4zRn80uuDAG7no Frwm0JXgYQqrFWf1qNyh4SLMFioK0aflm2OS/dtYxhghSKX6BkQ21A/DIeyq3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786116656; a=rsa-sha256; cv=none; b=u53T/LmXessgBal74A10SuUx/7nG5kmPappO7Da7anOfM5FTRJbUwm8t9Cl/DvHit3gf0r beIbZSP9X5l1qOgycDrSbcLwcWT5p5dcCzqUm5HgZ/JXPj1O2Wgg9BXGirw6pRpVGMCtC3 jvMZoBzsj5BZaFjminrcx89HdZvgQkwxfWG1TuHO51ioGU+ClcrY8DL0esdg63EQ77t0u2 UDaPGzbt/xObtQIiTSUQRA/hMZde45AljY2xPVa07uA4CgaPGs2yAFv/kVUDt+kr7gUyIy EgBR9ZiQHJ9b1KaGsjCRnI23rvGSWp0JnPbHY0j39H6VN662Tsce4IoejDLhfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786116656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Vrw/YeeWL2aWfOwjija8WfE03LbRG/fcyU6mbz+1m6M=; b=CVja24QntTFNQJ6/DCl0B2BcqKwRAzmxPJ8TD+4wMbCchZttmhFc356Fwpm5UcS9x/hFlv rbma+vUM1wsFHDFLtn3rWLKPVg7nRxTFH8yfB2FtIbb/NdYYZ+px4Nb/Qf3fpwcTcPop8u uAMLNr4pnmmYe8xgWPFPikU/t8XccSRR9INp1Cze9vnp7DhSMGGLEtWjraSUf0Mq3NujPN oO3YHjESwCU4aGU/gKXBuThcvHE//a3ui/L9pXUMOQgJ/K2N6urL8+4zOPLsqcNJtP2D9s +JcNVuJWRMsyHcc58Mqci5GUSMkdSh+ajYitvhk89+EzE4XBTcg/M30bbhxjUA== Received: from nuc (192-0-220-237.cpe.teksavvy.com [192.0.220.237]) (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) (Authenticated sender: markj) by smtp.freebsd.org (Postfix) with ESMTPSA id 4hGp5C3wnQzQ0y; Fri, 07 Aug 2026 15:30:55 +0000 (UTC) (envelope-from markj@freebsd.org) Date: Fri, 7 Aug 2026 11:30:53 -0400 From: Mark Johnston To: Alan Somers Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Jitendra Bhati Subject: Re: git: 4bd01d6ae016 - main - fts: refactor to use fd-relative operations internally Message-ID: References: <6a70e844.251cb.6995429f@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, Aug 06, 2026 at 04:52:55PM -0600, Alan Somers wrote: > On Tue, Aug 4, 2026 at 4:06 PM Mark Johnston wrote: > > On Tue, Aug 04, 2026 at 01:33:40PM -0600, Alan Somers wrote: > > > On Tue, Aug 4, 2026 at 1:00 PM Alan Somers wrote: > > > > > > > > On Tue, Aug 4, 2026 at 12:58 PM Mark Johnston wrote: > > > > > > > > > > On Mon, Aug 03, 2026 at 07:13:08PM +0000, Alan Somers wrote: > > > > > > The branch main has been updated by asomers: > > > > > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=4bd01d6ae01632501b63438b8d9a401db9744a78 > > > > > > > > > > > > commit 4bd01d6ae01632501b63438b8d9a401db9744a78 > > > > > > Author: Jitendra Bhati > > > > > > AuthorDate: 2026-06-12 17:07:55 +0000 > > > > > > Commit: Alan Somers > > > > > > CommitDate: 2026-08-03 19:12:28 +0000 > > > > > > > > > > > > fts: refactor to use fd-relative operations internally > > > > > > > > > > > > Replace all _open() calls with _openat() in __fts_open(), fts_read(), > > > > > > and fts_children(). Replace statfs() with _fstatfs(). > > > > > > > > > > > > Add fts_dirfd to struct _ftsent, set to the file descriptor of the > > > > > > parent directory. Callers can use openat(ent->fts_dirfd, ent->fts_name, > > > > > > ...) to access files safely without relying on fts_accpath, which > > > > > > enables programs in capability mode to open the files described by > > > > > > _ftsent. > > > > > > > > > > > > This is a preparatory change for fts_openat() which will allow callers > > > > > > to provide a pre-opened directory fd, enabling fts(3) traversal inside > > > > > > Capsicum capability mode. > > > > > > > > > > > > Mirror all fts_open() changes to fts_open_b(). > > > > > > > > > > > > As a result of expanding _ftsend, publish new ELF symbol versions for > > > > > > fts_openat and related functions. > > > > > > > > > > > > Sponsored by: Google LLC (GSoC 2026) > > > > > > Reviewed by: asomers > > > > > > Pull Request: https://github.com/freebsd/freebsd-src/pull/2303 > > > > > > > > > > Quite a few regression tests seem to be failing after this commit, e.g., > > > > > some of the makefs tests: https://ci.freebsd.org/job/FreeBSD-main-amd64-test/29201/ > > > > > > > > I'm testing a fix now. I should have something ready for you soon. > > The fix is committed now, as 74bd6fb1eb02 . Sorry for the trouble. Thanks, but I think there are still some problems. I'm still seeing vnode exhaustion while running the test suite. First, fts_build() appears to dup() the directory entry into every single(!) child FTS entry. That's slow and means that we'll potentially acquire a large number of fds when traversing a wide directory, enough to hit per-process fd limits. Second, the return value from dup() is not checked, and it's not clear to me whether that's handled elsewhere. Finally, I'm fairly sure these dup()ed fds are leaked in various places; for instance, isn't fts_lfree() potentially leaking the dirfd of each entry it frees? The first and last issues are probably straightforward to fix, but I'm not sure about the second one. I don't think FTS can reasonably consume an fd for every entry in a directory, that's going to cause a lot of problems.