From nobody Mon Aug 10 16:16:09 2026 X-Original-To: dev-commits-src-main@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 4hJfyL5zmCz6p0pg for ; Mon, 10 Aug 2026 16:16:26 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (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 4hJfyJ6Tn7z3tSJ 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.52 as permitted sender) smtp.mailfrom=asomers@gmail.com Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-c1f5208b38dso312704366b.0 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=UtIxocXeiUN9seXIdvSlExL25M2TjOtibMHldmtjAwdYXEOpYq+Jp1mercLhm6xHmJ XhaNfR44LMCKtiietFHey198pN49n7esZ8h+76xkJU2La/DAwARCd+jehgxwQVIE7fb1 elChLoaNjtQp3rtBSzfHeLt6+iUdOO4N9f8iZiOtPSAqxMuVM1wnkStg9qoG92Htz0vA 200Saq04AUvyjcQj57JCNRpG5EyYQBAyueSXtvwWg/fNsRX8ZTP5GmvTkJ1wzeDRUlEM JXMk2lsNtgJ8qUCge364QdAw5SyYAiU5G5uVfazRLzZfl4EgRBEX1FoA3r68d8sapj0W 8vlw== 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=GWZrd2FICyfYUxcbHgmfquAnOnsin0RzUWkHXwzQ/fA=; b=gHyea8GCdick1/H2F5JJJYxFdge6p4BsTNdIbrZ97VidSBl9I6XmQFuEiwavDTDEb8 Z7wHbgw4D5ANe5DcMqmGCA7zyr0Ygfrl67vVauBXpANUOfT8TYjqQQ2nwRoNJx8uWt6Q x2lgkNCMfzZ70yY4l7nYeHrkDFYf0trxfayh6RnmpOhyHbTqk6aJlMJwqnb1mr+OdfzW /XFRrQbPP5X308Kbd5P3VJlnkdXRXJkQeXmVZ+9bW0ITLeKFYT0KchBgKux/Q5vRsUyg RVILKHNMkpUSTOwff/sTjb5aTAM+cn8GohMtCIWU0xQG3DUQF6B34n0Xpd81Yv+HD90X OHEw==; 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=Y+sWUqkEj45U8co7pOPMslB9OipeZkY0yWI924R5jUVdiQSex+mE/AvVraLHnGG3+Z XsgSJPwF8WNr04XThYkZ1Hme1bn7Fb9uYp7VC4gEmk9oFg3bJk8c/SYSayPs8iFEIDRB WEIX7R+lmIsxGe38adIT1sFJNOrzFaZ4fgrR/KvUqCCMzu3oAgNAuiPLuhmrS5PIUe6i HwrUjxMO4vX7Dz9lPnN9gnrNSGCjmTc4m6801REc4pOH0Q0JkGpNB4KdM/Xcxyu2FNNm AfyEqzf2liCdIBzQYrCyYlJlKJJmFU5RPUWaAmH7rtAw7NU8Jn3B4JJvWfh9VzMQSayS Azig== X-Forwarded-Encrypted: i=1; AHgh+RqVuRhWT4moZ+EtPnr7R/IEVqeldi8+VIzksyOUDXSNsFfvuF3HPBkyZDMrcpI/c8xhRDyw5SsmQ6CqIz8qxDIPzAVYjA==@freebsd.org X-Gm-Message-State: AOJu0Yydpndyua7mqTuxrvBKAflBx1af2q3IFuo6nG4dRN58RXwHtXeo qhNDwVRDLdlPq+GXBjRV4s47WW6Xj4xRb/jz01sv91lcvP3oTE/Bxk5SwKwElHK8pUbd75GRvKX K6ezzLwjbVK3rG5dZ9DAZ+Ac3p0kjKHY= X-Gm-Gg: AR+sD12qpQNZVKYPXLAx4zbzCbHvh3Vmljjqaf/d7xNOBXhNpQPnGcX9tHmSE+SVUA9 YuQBr1WvS/TTXCG7NuA1pEVbCCIpYKsA5arj6Mscjz8A/mpjUuOpeEhYgAsnD7srhrqYPUY4ZJW qKoaZUj6UQHrdtlrhXdeYnrAnu33cqZL4++qs2Hn/4f49kN9YgneZ8FC0jP2d8AvuzpGeo+f1qK 0mgyM3/7Oa3u1Jkfq8p/DfhIvi+riw6g8W4IebX1wq8K6ym0yI04d84JCPSkKVh380IC4DeRdGG P41Su+A0NWjYEC/uFyz5pIi5GK6l5e/grffByLS2L16XdwRfjCcBjVqZCPyd2tPNQIi+iw4+GWl sVPm8slQiyYYEorGEsgW14kgRQtnyiBM4H0iHVaS4 X-Received: by 2002:a17:907:6d28:b0:c20:2165:d74f with SMTP id a640c23a62f3a-c2039dfe36fmt1752196966b.22.1786378582873; Mon, 10 Aug 2026 09:16:22 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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.52: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)[]; RCVD_COUNT_ONE(0.00)[1]; FREEFALL_USER(0.00)[asomers]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@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.52:from]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; MISSING_XM_UA(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; RCPT_COUNT_FIVE(0.00)[6] X-Rspamd-Queue-Id: 4hJfyJ6Tn7z3tSJ 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 .