From nobody Mon Aug 10 16:16:09 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 4hJfyL60qhz6p0ph for ; Mon, 10 Aug 2026 16:16:26 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hJfyJ6Krfz3tHd for ; Mon, 10 Aug 2026 16:16:24 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); arc=pass ("google.com:s=arc-20260327:i=1"); spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.218.54 as permitted sender) smtp.mailfrom=asomers@gmail.com Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-c167aa9500dso258550666b.3 for ; Mon, 10 Aug 2026 09:16:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1786378583; cv=none; d=google.com; s=arc-20260327; b=sUNCQJGRuEC55DKpduyAo9SRzfqP39H0/BSPwzaXWvkSAjq+ufM5yS3i22ODpFtTDh zm2p3gkllVj0AdjE2ObJwQXalo8XhAja4S/bTpMfoAHjBw2C6x6pV7Eoy52rbJy1scSJ eBnXw1IQvi++WTKuenY88QaBXYQx7rWu9o/Z8D5Mqp9QV2ULJQHZ3bod24C/Oq6jCVsV vCZXZI3/DZDslCO8DGlv8zlyewl2OWiPkQaixH3dcVXWBpOpa9w+JO8RxeHqYRlkaLve 0733BVEHQCG2L1/Y4mQtP/XeB1hJHBLsj8Rfx8BgFYVBVr+GPSMdRPeRu11STBmDzIU3 V3Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:subject:message-id:date:from :in-reply-to:references:mime-version; bh=wNJkNAY+HryW86Ql1HnULr5012DgrKcRB25fx+Q2G2w=; fh=IiU6CdGpIhaNjuWlNHgo/23ZB2FOao0qhyfDyOWUXLg=; b=YE5UGOdNakjR57IoheMAOT9f/cSlnPW0ixyROLtphQ63uSu6USzfNF9nlUgov5coeJ qdd8P6dVJcmKev/9gTLWQB74sC8n6GWB2cnPVMnZMtPwObrwNl6vd16rYmxmZZ5NRAXr IxUS8UUuIP6GozLFo/wdNC/6PspDVcaQk+O4/NCiRPjzeENANn/AJo6K2UN5Gb5cP+Fq +xE5nAnSdjdImg7rM2rt2JUL7tm/oXing1T08pyBJKztwSHO9Y6peC2/7ifFLSMAsQoL n+AVWXNh/jDez94FJ9iBdurbCLVt29K4NBX0YHMJXOGUMJsaVQFfwMjRoe/gdMwDdz9N KNgA==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786378583; x=1786983383; h=content-transfer-encoding:content-type:cc:subject:message-id:date :from:in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to:content-type; bh=wNJkNAY+HryW86Ql1HnULr5012DgrKcRB25fx+Q2G2w=; b=DabVQeKbqJ6gGD4KD/9d/7GRsHGbgkmmCjNvR6AWhIPQRNz8Q8fwApmyQhSsEQCpI7 rQbuNqHmObkuw3FOaQG6qJGBQwvahXN0H1iylTGEHpVAVirDO22ark2/qBZRs0m2/OaR eygthCoDscTFGYYTe8/+hee+EYF10PhPTL0h8xAMTYuB8FMZoge6ExI2Qw17Eak5Th9o qeOtypTCfVn3llU9LlzUfjbprXfpPb/4SuNbDp6YiQ8o4j0cnRhUjks8fvX5pcaDj+MR em6bqMldFp5P+Dc3iu8lILB0GLOa5wkg5vF+HtyIR9Fp9xEoDQQpyXgc/HMZuPvaMoT5 a0Qg== X-Forwarded-Encrypted: i=1; AHgh+Rqb9HtQpJlzEG4ZTdOgcaZ9H5tIchndRlxqDzjWWi4+G2LY4piLH/iPEokzGAPX0jX7OHgoAWDaA4WRP3XZTb30ZLv/@freebsd.org X-Gm-Message-State: AOJu0YybeBl/8Krbwg8YFqW+twCYh0a5cqV7z72SuKhYTyITn1y5YHp+ 3+PhK1xZ3T5NTNzU2/Kgoerzp+gOLiVk3hnosmKWfNbCYw+b7mFYeA0nUpO+Ar2iyD3ft1OKX90 9gpWZKK1JqD7rQbvw8rWNPagl1EX2XhQ= X-Gm-Gg: AR+sD12oynJ4REgAwc31uBEse8N5EMT0xiGXGcd7wAl0cFBkVcjsPsL5KxNFaDJGbgI pCP2X35cg8tMbifSI5M3CCsSJSlfN04ar3lr3OE2pXlCRQ78iTJjUwnXDeD6RZK6iJGHApoWD9y m7XVaI1scyxwLh3kHqbR4DBkZmZho6P+GrDEKLp4LxbhJxD1UyzWd50VFaUunGkcB371oY61oVq 0cJvTR0f+vELlpjmOjHxEQncrdBQ7IPLpONrpAdi5VRBgX7sQZqlWsPArr5KYlq2fss0NgrR4DN sXQwHeMRahTMA/ntQXV460Q8Bub1Pa3NWXGzHnVh3HzaOKRu0gjUa5ZcAZbA8GNTrrQtoCxdoLz JWmkbGBWaD2dCuOBggdo2ggQX7qtV+uq8wc4cZyu8 X-Received: by 2002:a17:907:6d28:b0:c20:2165:d74f with SMTP id a640c23a62f3a-c2039dfe36fmt1752196866b.22.1786378582873; Mon, 10 Aug 2026 09:16:22 -0700 (PDT) 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 References: <6a70e844.251cb.6995429f@gitrepo.freebsd.org> <6870a20e-5366-486e-9405-44ad57a89bf4@FreeBSD.org> In-Reply-To: From: Alan Somers Date: Mon, 10 Aug 2026 10:16:09 -0600 X-Gm-Features: AUfX_mwlGkiybHsd-hoZjysWyKP27ckYUYfiTyI1WkaHM78Y4mAjtecj5nRz550 Message-ID: Subject: Re: git: 4bd01d6ae016 - main - fts: refactor to use fd-relative operations internally Cc: Kyle Evans , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Jitendra Bhati , Mark Johnston Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-0.45 / 15.00]; MISSING_TO(2.00)[]; ARC_ALLOW(-1.00)[google.com:s=arc-20260327:i=1]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.89)[-0.891]; NEURAL_SPAM_LONG(0.44)[0.443]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; MIME_GOOD(-0.10)[text/plain]; RWL_MAILSPIKE_GOOD(-0.10)[209.85.218.54:from]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; MISSING_XM_UA(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; RCVD_IN_DNSWL_NONE(0.00)[209.85.218.54:from]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; R_DKIM_NA(0.00)[]; FREEFALL_USER(0.00)[asomers]; RCPT_COUNT_FIVE(0.00)[6] X-Rspamd-Queue-Id: 4hJfyJ6Krfz3tHd X-Spamd-Bar: / On Mon, Aug 10, 2026 at 8:58=E2=80=AFAM Alan Somers w= rote: > > On Mon, Aug 10, 2026 at 8:26=E2=80=AFAM Kyle Evans w= rote: > > > > On 8/7/26 10:30, Mark Johnston wrote: > > > On Thu, Aug 06, 2026 at 04:52:55PM -0600, Alan Somers wrote: > > >> On Tue, Aug 4, 2026 at 4:06=E2=80=AFPM Mark Johnston wrote: > > >>> On Tue, Aug 04, 2026 at 01:33:40PM -0600, Alan Somers wrote: > > >>>> On Tue, Aug 4, 2026 at 1:00=E2=80=AFPM Alan Somers wrote: > > >>>>> > > >>>>> On Tue, Aug 4, 2026 at 12:58=E2=80=AFPM 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=3D4bd01d6ae0163250= 1b63438b8d9a401db9744a78 > > >>>>>>> > > >>>>>>> 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 descripto= r of the > > >>>>>>> parent directory. Callers can use openat(ent->fts_dirfd, e= nt->fts_name, > > >>>>>>> ...) to access files safely without relying on fts_accpath= , which > > >>>>>>> enables programs in capability mode to open the files desc= ribed by > > >>>>>>> _ftsent. > > >>>>>>> > > >>>>>>> This is a preparatory change for fts_openat() which will a= llow callers > > >>>>>>> to provide a pre-opened directory fd, enabling fts(3) trav= ersal inside > > >>>>>>> Capsicum capability mode. > > >>>>>>> > > >>>>>>> Mirror all fts_open() changes to fts_open_b(). > > >>>>>>> > > >>>>>>> As a result of expanding _ftsend, publish new ELF symbol v= ersions for > > >>>>>>> fts_openat and related functions. > > >>>>>>> > > >>>>>>> Sponsored by: Google LLC (GSoC 2026) > > >>>>>>> Reviewed by: asomers > > >>>>>>> Pull Request: https://github.com/freebsd/freebsd-src/pul= l/2303 > > >>>>>> > > >>>>>> Quite a few regression tests seem to be failing after this commi= t, e.g., > > >>>>>> some of the makefs tests: https://ci.freebsd.org/job/FreeBSD-mai= n-amd64-test/29201/ > > >>>>> > > >>>>> I'm testing a fix now. I should have something ready for you soo= n. > > >> > > >> 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 potentia= lly > > > acquire a large number of fds when traversing a wide directory, enoug= h > > > 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 elsewher= e. > > > Finally, I'm fairly sure these dup()ed fds are leaked in various plac= es; > > > 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 cons= ume > > > an fd for every entry in a directory, that's going to cause a lot of > > > problems. > > > > > > > Hi, > > > > Can we go ahead and back this out until the outstanding issues are > > resolved, please? > > > > Thanks, > > > > Kyle Evans > > The "too many open file descriptors" problem should be fixed by > https://github.com/freebsd/freebsd-src/pull/2360 , and I'm doing the > final pre-commit testing of that PR right now. "Too many open files" should be fixed in revision dd532ad133 .