From nobody Thu Aug 6 22:52:55 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 4hGMy075npz6nNsg for ; Thu, 06 Aug 2026 22:53:12 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) (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 4hGMxz4Jd4z3VpK for ; Thu, 06 Aug 2026 22:53:11 +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.208.53 as permitted sender) smtp.mailfrom=asomers@gmail.com Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-6a17c04563fso3012058a12.3 for ; Thu, 06 Aug 2026 15:53:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1786056790; cv=none; d=google.com; s=arc-20260327; b=MWqHFykiK8MB8bFnDmTxSfrT50aw0TSqZAbPaRA5sKfoYclBfp7+xr32W+1rmxpd7D ZNnJ1u9n4SSGtRL4+AY+kZrsCBmsceiu0GWFM36v8O+1mWB/YyYIbE/x0Ml2OGxWZvB+ QEN9pi12VuJb3pjDXAFqwJCilFC6Qv0+L6Csku47vaMPJdQ9RK/WZ46C9TGVbuj5iihH wsv/id3exde+dhKMeWDzUdHiiTd1DH3KLxBsuMBI1JNAXmECbl8XsR7coTKicTudW5kn 4i/z0SG8N+Z/a1YVclm3+XaNleSpbfyhXoK1/04ZcmPW91a+FpTN9m4kNUEFO0wKKisu DcUQ== 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=61buXlabPcoQKx90Ar2Zi3F0bLWNSi4aWovAe8WuXgE=; fh=vtlz47msw2JrdJFzq+8+RltUUVYMHM9YJzJlVh5hJC8=; b=QeyzAXwSXlL2H/hAVrQsb/QqtBmHG0gOT8Sb+NfTBtyBSn+4GNuSWkp0+FmEy3HSFD JADFGXDktxE6tYI0qnjPOMJa4K2HDt3V9pu17ziwyTQLSkjG2w1i/x7G0RAJasXGDbAc mn5moO4wCgzKkXE7g5UFZkNS1h/FLuwlR1nsfYBRceV7lYy5UT4D7F5Z/kh4w2dE7r3Y fO2aRwWbhnqN8wJdjMIwuJGi21iHMr85H+X7caGh3ukPYyHSGKTFZWFor4OuxkGuyEu/ jxTME4SRAjglGPSCqIktwm0xo/ziW3RvSyOcfVMwfep4uFh1EM4JX9g0Q6RLqoSFEYdx F6xg==; 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=1786056790; x=1786661590; 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=61buXlabPcoQKx90Ar2Zi3F0bLWNSi4aWovAe8WuXgE=; b=Q/4CpEe3peFT5gmhVJB50Z8agh4TAil0Moc3nnLCcoXzK0kQgLEhliWAtxX19mgJtk kaldHt/y7XH3ojmToy+MvU/QxnlbjHStLQhPQFOqk7cx8N1A1QKX96l+UcY40QReTLKZ Yf9c3QCHtgVSaYUM271b58mQJ0mLQq60IwkO6ouhaCDWHFuBK8itaS7G1WwBWTT7mZLX aS1LEWFOUprVpRJEAIKYqMNR5ffbs3StzfQdCSWCnl017V15Gm5zCBPwzwVKctMcTpK5 Dw32qe9LhbHMFwg1DqtBpQFJ/caxDidmr3c9sDSIlxmHTE5oPaCLSCWdb+6QOCqnKpI7 UwRg== X-Forwarded-Encrypted: i=1; AHgh+RqL6AvZZEpW3j/89o7K+x7K8utjXryr6uLl1xLg7UD9D77jssiRIJLKR77LyJEyWuFqHtEvFJT10+CilZ/MZq8jcZsrTw==@freebsd.org X-Gm-Message-State: AOJu0YwzFXsfIKa9sIkK2UPQMGTgm1i4frIksd64WnX/MMDGlCwxNvP3 8HiWb/sLv5W7pW8OSSGmkJMkn1hh3qRmLN94EHfeoWVVfCLSLnnK6P0Byyhtiju3Z08Q0+bd4LQ 6DzhfSFF9WbV1p0/Q049Xbxze6eeFX80= X-Gm-Gg: AR+sD12qUO4vDsKxph/9qt0jlcLzIdanXubTK6k0qKb9iCpKaW3QkrTmWP4OBhHX4oD Q+/qSM5hJYY+JU6pgw2ZqAnkV9T5ne889/F2a49HyWHRL0pfWpzcFcF283GFTkDRrCJLaZ1JxAU ELf0lfeQZtbk6ZCNlR+vmI1MRLAgMohndr18fdxMehTRTjtibpsotM7STvb8oe0nH1vnXSZ7nPN 4ozHl0OPW7tREgYkNjsjP+BbylCT0DoQSiZPZZzs44GQkaHQVM0LWIERxUfDsxJ0JpJcL+n/DZs bd2K+v/aFfhyC2iFZS3YlIo2ynS0ij7Ga96aYTYP6TX1JhS21/4xHM7T+FwSicsf58ocBnf4xHf dZ02PvP7c8iLMsuyQMSmThCG2bXzrhw== X-Received: by 2002:a05:6402:190b:b0:697:e953:d14d with SMTP id 4fb4d7f45d1cf-6a1b4b9a7c9mr2469696a12.17.1786056789700; Thu, 06 Aug 2026 15:53:09 -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> In-Reply-To: From: Alan Somers Date: Thu, 6 Aug 2026 16:52:55 -0600 X-Gm-Features: AUfX_mxvMUIl2a1PrJquWouPDSUW2W1BNZw38JqBzZ7qkTvuLoA3I9qc-OTVh-8 Message-ID: Subject: Re: git: 4bd01d6ae016 - main - fts: refactor to use fd-relative operations internally To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Jitendra Bhati Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-3.87 / 15.00]; ARC_ALLOW(-1.00)[google.com:s=arc-20260327:i=1]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.97)[-0.966]; 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]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MISSING_XM_UA(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; 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_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.53:from]; R_DKIM_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.53:from]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4hGMxz4Jd4z3VpK X-Spamd-Bar: --- On Tue, Aug 4, 2026 at 4:06=E2=80=AFPM Mark Johnston wr= ote: > > On Tue, Aug 04, 2026 at 01:33:40PM -0600, Alan Somers wrote: > > Try this patch. It works for me. I don't have an ATF regression test > > to go with it, though: > > This fixes the test failures, but I'm still seeing some weirdness when > running tests in parallel: one test is doing something which exhausts > all of the free vnodes in the kernel, and that causes a bunch of other > tests to time out. At some point the system recovers and carries on > normally. I'm not sure what the offending test is, but maybe there is a > file descriptor leak somewhere in the change, or some problem with the > compat implementation? > > > diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c > > index 204340e4b87f..3dd9b6432a2c 100644 > > --- a/lib/libc/gen/fts.c > > +++ b/lib/libc/gen/fts.c > > @@ -489,8 +489,7 @@ fts_read(FTS *sp) > > * FTS_STOP or the fts_info field of the node. > > */ > > if (sp->fts_child !=3D NULL) { > > - if (fts_safe_changedir(sp, p, > > - p->fts_dirfd, p->fts_name)) { > > + if (fts_safe_changedir(sp, p, -1, p->fts_name))= { > > p->fts_errno =3D errno; > > p->fts_flags |=3D FTS_DONTCHDIR; > > for (p =3D sp->fts_child; p !=3D NULL; > > > > > > 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(), fts= _read(), > > > > > and fts_children(). Replace statfs() with _fstatfs(). > > > > > > > > > > Add fts_dirfd to struct _ftsent, set to the file descriptor o= f the > > > > > parent directory. Callers can use openat(ent->fts_dirfd, ent-= >fts_name, > > > > > ...) to access files safely without relying on fts_accpath, w= hich > > > > > enables programs in capability mode to open the files describ= ed by > > > > > _ftsent. > > > > > > > > > > This is a preparatory change for fts_openat() which will allo= w callers > > > > > to provide a pre-opened directory fd, enabling fts(3) travers= al inside > > > > > Capsicum capability mode. > > > > > > > > > > Mirror all fts_open() changes to fts_open_b(). > > > > > > > > > > As a result of expanding _ftsend, publish new ELF symbol vers= ions for > > > > > fts_openat and related functions. > > > > > > > > > > Sponsored by: Google LLC (GSoC 2026) > > > > > Reviewed by: asomers > > > > > Pull Request: https://github.com/freebsd/freebsd-src/pull/2= 303 > > > > > > > > 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-a= md64-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.