From nobody Mon Aug 10 14:58:04 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 4hJdDG3HDSz6ntyP for ; Mon, 10 Aug 2026 14:58:22 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (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 4hJdDG0TZ2z3g3H for ; Mon, 10 Aug 2026 14:58:22 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-6a156627e22so6362678a12.1 for ; Mon, 10 Aug 2026 07:58:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1786373900; cv=none; d=google.com; s=arc-20260327; b=cHO+cJeMYeJ6BlwplA8d3yEy7GnTPffl56Dk5U05Bu0i2YT1Qj5/JllzgLdlidNj3C ly6/mnQzyBXw1uc1NQXVNUl4F21pVpfycz742CTvr8k/2PMcqz+e5Q5MQkSC588wRZK6 gJl6ZnrHpkxGYJ5uNBcV1N7GmHd11pJOXw2/PcMlLi3y3X6DMdszpyG2AIQIKIQA6xct s0cWi66kpU1Mhyo8Q4tp9Ywjo0oet7ObCDw7lAA9l3Ka1yn33xMiwKk7Zd9TzQB6ywjc mrhYGUjop+FxCDw7FpPMoRgG0t3+6EK87IhF78E1PUzKWz94EZVpQqFWQiygVR/xA+LW w+hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=adm2DHNKazS4LCGaj4vp6e6BkoY0e5izBmd3/rXWuqU=; fh=TlnfFx0LASQtaiqF/8deCs9qMDEafjIQNa8AfDWG/6U=; b=FBBQkrGfJy140q4we8lWNR9k4Unp79DVlpGeGhUDGa+V5/xWEDUbZUOjeSWdmXqtXM L6fnOKb9aBzzkOLJp4nukh+pZfjyIkT1QlfzxNEtPo304/zTKvXui73BU6L+Cr7NRP/j YwpESo3Yp+P8ad60fVddBHHPfW6qsqVH4FDD7x8EIYqMcYN/y8BM8/xi4nfVl9TvDS7U 8HfTmvPNogPw166DTkK8zV+CYltw/mtsoM/cqExMDVtLdZWjkzBY2yj60guDFNjJFlUh EyyVjQOrEm/HWMg1WRdQZYBRom2EO9s7HWSlH2Jq/nkAwqHHlFcjDmEp/vrOTiv/O8LZ VRIA==; 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=1786373900; x=1786978700; h=content-transfer-encoding:content-type:cc:to: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=adm2DHNKazS4LCGaj4vp6e6BkoY0e5izBmd3/rXWuqU=; b=d1u+lmoWII+JpJDpyFyPdG1s7RJKKQSu0fxLUOhIZAZAtmRt9XrUkrkeoV8Br8LsNZ TZwRDXkyp+SYVKYja0lLKqyRM/btCwDaDRgfh/5B5YQLaAS5OqowrR9tr68U2/IzH/M4 P4CAWmUUUyXZ4S+wDjv6Etz4YiwWLrnFPup/wK/dWIRjw0XkzGUOufdSssojsLbdeDkl RcHSdy3WOW9j8xCSk3L9ZjMFyGAH0VJAysxbcexxG20lIsg5i71+bUvEWEryeHzBENVd jiM+SqBkEMxWd3XsQDK2Ui7lkZz36Rm2eu6OwXExXOwk6MZc7zkpSM3tE0poxliGadue 46IA== X-Forwarded-Encrypted: i=1; AHgh+RoSt3x9DEHl345ZkkEhjBwTt3xTZvYAz9Nfso4dcl2Nv/d6FvfMUFiUlCv7VhVSpW104mV5SvOarUE4KZpG8dAjkk41@freebsd.org X-Gm-Message-State: AOJu0YwhgxoqMr9b/pOQ9Y9blFLFbsGing6F2kDgeLNK0aUr4jX6yOzr 3K8wNaLZRgzJVXlYv9oNPmSxKD+CNanWXyam8PcJnG1dr/+lbp09hNydgq5BG7SKQhuuZSSJ9CM ytzScDjLEMAveeCqtzl9jRTSjhLm5cqg= X-Gm-Gg: AR+sD12Cm5jJ+Dzlrb6+ng4GPg7XHRyhZHAioodQnLuqcN6xWBgSATBhqC+LdLZx+MY tOI4kveGGBywk+j6ohAr1csPkL9suUUFVluk5nXfhXd5XkkvSrYbmucbcq3fs1MaaHyTkX9vqGl d8kl9q5arE4dXYyM5DvHtG9LNAr+cWwrhaDsMptHd7Ki/6FbRz5uArJHcwBAYbo+Q6azrdc9pBS 0xIvHPDVc+EH0Y2N4PTIFr9vFTmBN2yEVrhcMr3TTTuCgb1Q1xh2klgARp0Hq3Zce/RTwBb6hQQ R6nnkCCrcj2afEMLRIfswlhr2twqXQOw37fBHthVU6DClKKOg4HlpJ43DkD+XP3qdXeuN8b/xEn jOur+vrWX+TwgPxugunrYOB4z5hyzHwl69uvaezRV X-Received: by 2002:a05:6402:5416:b0:69f:c929:b88 with SMTP id 4fb4d7f45d1cf-6a1f4dffe2amr9204609a12.5.1786373900289; Mon, 10 Aug 2026 07:58:20 -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: <6870a20e-5366-486e-9405-44ad57a89bf4@FreeBSD.org> From: Alan Somers Date: Mon, 10 Aug 2026 08:58:04 -0600 X-Gm-Features: AUfX_myjSFe910xMi8xvuJ_xM7Eie1yEaaJBV3z7EeYYqmuNNKkRXSs-G6ivnZw Message-ID: Subject: Re: git: 4bd01d6ae016 - main - fts: refactor to use fd-relative operations internally To: Kyle Evans Cc: 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-Rspamd-Queue-Id: 4hJdDG0TZ2z3g3H X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Spamd-Bar: ---- On Mon, Aug 10, 2026 at 8:26=E2=80=AFAM Kyle Evans wro= te: > > 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=3D4bd01d6ae01632501b= 63438b8d9a401db9744a78 > >>>>>>> > >>>>>>> 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(), ft= s_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 descri= bed by > >>>>>>> _ftsent. > >>>>>>> > >>>>>>> This is a preparatory change for fts_openat() which will all= ow callers > >>>>>>> to provide a pre-opened directory fd, enabling fts(3) traver= sal inside > >>>>>>> Capsicum capability mode. > >>>>>>> > >>>>>>> Mirror all fts_open() changes to fts_open_b(). > >>>>>>> > >>>>>>> As a result of expanding _ftsend, publish new ELF symbol ver= sions 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 potentiall= y > > 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 consum= e > > 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.