From nobody Mon Aug 10 10:21:50 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 4hJW5h2kymz6nXXl; Mon, 10 Aug 2026 10:22:16 +0000 (UTC) (envelope-from herbert@gojira.at) Received: from fhigh-b2-smtp.messagingengine.com (fhigh-b2-smtp.messagingengine.com [202.12.124.153]) (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) by mx1.freebsd.org (Postfix) with ESMTPS id 4hJW5g54j4z3xB2; Mon, 10 Aug 2026 10:22:15 +0000 (UTC) (envelope-from herbert@gojira.at) Authentication-Results: mx1.freebsd.org; none Received: from ams-compute-01.internal (ams-compute-01.internal [10.64.2.61]) by mailfhigh.stl.internal (Postfix) with ESMTP id 224EE7A00B2; Mon, 10 Aug 2026 06:22:14 -0400 (EDT) Received: from ams-imap-09 ([10.64.2.29]) by ams-compute-01.internal (MEProxy); Mon, 10 Aug 2026 06:22:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gojira.at; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1786357333; x=1786443733; bh=bcHgfjEVNOYWG9/1KTiQzqncws55esalNfH8TiI/Y5I=; b= jN9Zo84UVttndmdUkPONqFHKuy6zy6froAGPn+Nw30u1ERjSSQBTouEItbvkvjA8 bFzULOUofr77o63sC+0f+auLdtGVFl8XWXA5ihZEabvrtP9WpvlzmPVaX97Ml8PS xo+tE4Fmi4eooGmwGt2U7K/0AYC+OzfScIyMC+ozEZLQGAgciVLaGexKb5GzdjLV 2uAiXVqjbqfA+SGBPhw+C8iiSjSrNgXU1AXe28utrxv/MSWpMxtQowJWC2G3cCt1 LT3EtcaYPsZzJ9o3ouLWvrS6+AHt5UtCqFqsT+VdFIbv+l0cd3HS5HQkIevv8sVr KiUjHsfSaqo0Aiz48cQ8uw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1786357333; x= 1786443733; bh=bcHgfjEVNOYWG9/1KTiQzqncws55esalNfH8TiI/Y5I=; b=U yGaShYp4Qo5h8/6mRjY3e/HSygHWWDfJE6btrVpStyMW1QPJEF//IVCliNy4PZhF DD5cz82LFTiM+Sqji8R6c0infciGxUxYhohd8DuAqkh5QQR8VWAHH6kgyJRWTiYB sChcpGgIEoOhi5swHEgkuvAgfReO2Y7g6tGobPDPA+PufX9CbCyKxM9lAW7WqSrb EipQmnE1llszIYUgBv8hrUGDKefj/lONwJHhC2IB/CKpvgZD9A4q23z+OsyAWRBR IUkIFacXTCZR2orOOJdqqcKcTufTO9B86Xv3iZnMiMImyMoAz0vHQ6SCqC9up3Qx mHvGE3/u9v2fKy6s9Yr3w== X-ME-Sender: X-ME-Proxy-Cause: dmFkZTFENjvOFFLKAN8ROF+0Q7GZ1P0MEPYT2WrqrKZHr/POJ8AI9+i9fQageA2pTVos3M 6RIlweFo+xHMFZzcc4va722UhcmLc3NdcLkhEAmePp7mcOabs/uo9VB3KTQoDASxdalEJB WgrglIvNSccEQQpy9Cs/NW8bWWIbhwXid4aABwdVeJNBu+kpP4wC02qvjslc0Y5y8eMj+x T64tiGM8jb/KFscparY4zwzsuI+0zG215CSlUKnVEjkf+qAbvlCwKcRxHav/Khl/2aDGZG sa6jq2/thq1ozkOvT2xjmEQ/DILsqDLgDBAshvp90u/MIYglRYQ8hMEpcN3ZtNYNgfclfd /rVJahpaKJAamgARfV+TqLpO5ICatEndWpABQqii4jBH1GrEFGTWPQWO8x6BaPwh5rBKpw fsHUZXZ86pKLk+0vSEXAt3v4mTPlxwm+fAkDB969rNF+McWYg1hJtc0aQhypsmvD2qRNpj qZkr09YWDaBgJx61u6ruvP2nAZlis3+Ohs/7i5UsKW8D+k5YScKx8hTmoLkWxym0CEhJVA FKbxB+shPY6/CyTew3DsISTSjfqZP7SV0rHFPoFIeyV681uPjdBzGQ0hN3EwA9RJvStAud 5bJRNSPDcoCJ+Nx4LCctbu5i8pW5wB+v+Y+ljNC1G3pQB1pjeyaBzfGrYcfg X-ME-Proxy: Feedback-ID: i64fe486c:Fastmail Received: by mailuser.ams.internal (Postfix, from userid 501) id E39C4180075; Mon, 10 Aug 2026 06:22:10 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface 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 Date: Mon, 10 Aug 2026 12:21:50 +0200 From: "Herbert J. Skuhra" To: "Don Lewis" Cc: "Alan Somers" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, "Jitendra Bhati" Message-Id: <9980693b-c55f-42ee-a29d-9cf4128b3b26@app.fastmail.com> In-Reply-To: References: <6a70e844.251cb.6995429f@gitrepo.freebsd.org> <87bjbiysvw.wl-herbert@gojira.at> Subject: Re: git: 4bd01d6ae016 - main - fts: refactor to use fd-relative operations internally Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4hJW5g54j4z3xB2 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:151847, ipnet:202.12.124.0/24, country:AU] X-Spamd-Bar: ---- On Mon, 10 Aug 2026, at 09:15, Don Lewis wrote: > On 10 Aug, Herbert J. Skuhra wrote: >> On Mon, 10 Aug 2026, at 07:08, Don Lewis wrote: >>> On 7 Aug, Don Lewis wrote: >>>> On 4 Aug, Herbert J. Skuhra wrote: >>>>> On Mon, 03 Aug 2026 21:13:08 +0200, 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 >>>>>> --- >>>>>> include/fts.h | 2 + >>>>>> lib/libc/gen/Makefile.inc | 1 + >>>>>> lib/libc/gen/Symbol.map | 18 +- >>>>>> lib/libc/gen/fts-compat15.c | 1355 +++++++++++++++++++++++++++++++++++++++++++ >>>>>> lib/libc/gen/fts-compat15.h | 97 ++++ >>>>>> lib/libc/gen/fts.3 | 18 +- >>>>>> lib/libc/gen/fts.c | 49 +- >>>>>> 7 files changed, 1519 insertions(+), 21 deletions(-) >>>>> >>>>> This change seems to break poudriere: >>>>> >>>>> [00:00:04] Recording filesystem state for prepkg...mtree: ./bin: No such file or directory >>>>> [ERROR] Unhandled error! >>>>> [00:00:04] Cleaning up >>>>> [00:00:04] Unmounting file systems >>>>> Exiting with status 1 >>>> >>>> I am seeing a different error with poudriere-devel: >>>> >>>> [00:00:01] Starting jail CURRENTamd64-default >>>> Updating /var/run/os-release done. >>>> [00:00:02] Will build as nobody:nobody (65534:65534) >>>> [00:00:03] Ports supports: FLAVORS SUBPACKAGES SELECTED_OPTIONS >>>> [00:00:03] Acquiring build logs lock for CURRENTamd64-default... done >>>> [00:00:03] Logs: /var/poudriere/data/logs/bulk/CURRENTamd64-default/2026-08-07_15h29m37s >>>> [00:00:03] Loading MOVED for /var/poudriere/data/.m/CURRENTamd64-default/ref/usr/ports >>>> [00:00:03] Gathering ports metadata >>>> [00:00:03] Warning: (misc/freebsd-release-manifests): jexec: jail_attach(41): Operation not permitted >>>> [00:00:03] Warning: (misc/freebsd-release-manifests): Error: Error looking up dependencies for misc/freebsd-release-manifests >>>> [00:00:03] Warning: (ports-mgmt/pkg): jexec: jail_attach(41): Operation not permitted >>>> [00:00:03] Warning: (ports-mgmt/portconfig): jexec: jail_attach(41): Operation not permitted >>>> [00:00:03] Warning: (ports-mgmt/pkg): Error: Error looking up dependencies for ports-mgmt/pkg >>>> [00:00:03] Warning: (ports-mgmt/portconfig): Error: Error looking up dependencies for ports-mgmt/portconfig >>>> [00:00:03] Error: /usr/local/share/poudriere/bulk.sh:gather_port_vars:184:Fatal errors encountered gathering ports metadata >>>> [CURRENTamd64-default] [2026-08-07_15h29m37s] [crashed] Time: 00:00:01 >>>> [00:00:03] Logs: /var/poudriere/data/logs/bulk/CURRENTamd64-default/2026-08-07_15h29m37s >>>> >>>> >>>> When I upgraded my pkg build machine from >>>> 3abd3d3cf3f034cb3d4250a95a8d6c41e72971ef to >>>> 30ccf2f48c11e54fc0540510dcec7cd006a2c366, I found that poudriere-devel >>>> started having jexec failures. I suspected a kernel problem and started >>>> to set things up to track down the offending commit. I was surprised to >>>> find that using the old world 3abd3d3cf3f034cb3d4250a95a8d6c41e72971ef >>>> with the new 30ccf2f48c11e54fc0540510dcec7cd006a2c366 kernel did not >>>> have this problem, which makes this look like a userland problem. >>>> >>>> I did a git bisect to find the problematic commit by doing: >>>> make buildworld >>>> make installworld >>>> cd /usr/ports/ports-mgmt/poudriere-devel && make clean reinstall >>>> poudriere bulk -j CURRENTamd64 -C ports-mgmt/poudriere-devel >>>> at each step. I did the poudriere-devel build and reinstallation so >>>> that it is propertly built against and linked to the newly installed >>>> world. The result of the final poudriere bulk determines whether the >>>> iteration is a pass or a fail. Any failures of the earlier steps are >>>> handled as skips. >>>> >>>> When I ran git bisect, I got this result: >>>> 4bd01d6ae01632501b63438b8d9a401db9744a78 is the first 'bad' commit >>>> commit 4bd01d6ae01632501b63438b8d9a401db9744a78 >>>> Author: Jitendra Bhati >>>> Date: Fri Jun 12 22:37:55 2026 +0530 >>>> >>>> fts: refactor to use fd-relative operations internally >>>> >>>> poudriere-devel runs jexec on the host and not in the jail. I think the >>>> permission error should only happen if jexec is run by a user other than >>>> root. I added some debug output to the poudriere internal scripts and >>>> it looks like the uid is root. >>>> >>>> I don't know why jexec would be sensitive to fts, since jexec does not >>>> use it: >>>> %ldd /usr/sbin/jexec >>>> /usr/sbin/jexec: >>>> libjail.so.1 => /lib/libjail.so.1 (0x3704d89e7000) >>>> libutil.so.10 => /lib/libutil.so.10 (0x3704d8ae3000) >>>> libc.so.7 => /lib/libc.so.7 (0x3704d9af8000) >>>> libsys.so.7 => /lib/libsys.so.7 (0x3704da328000) >>>> [vdso] (0x3704d7516000) >>>> >>>> I see that a fix to fts was committed, but uupgrading to >>>> commit 2ae8976a3f6a7e4deb1905326145f5c2575264f4 >>>> Author: Gleb Smirnoff >>>> Date: Fri Aug 7 13:46:22 2026 -0700 >>>> >>>> ocs_fc: return correct error code from ocs_hw_set_persistent_topology() >>>> did not make a difference. >>>> >>>> I'm stumped. >>> >>> If I go back one commit to 9590878fca68e62c63d607da73139698e204d0f0 on >>> both the host and vm, and rebuild poudriere-devel to use the old fts, >>> poudriere-devel is able to build ports. >>> >>> If I then, update the host world to >>> 4bd01d6ae01632501b63438b8d9a401db9744a78 (there are no kernel changes >>> at that step), poudriere-devel still works. If I then rebuild and >>> reinstall poudriere-devel so that it picks up the new fts API, I start >>> seeing jexec errors again. >>> >>> I added some debug fprintfs to jail exec and its inputs look OK: >>> [00:00:02] Loading MOVED for >>> /var/poudriere/data/.m/CURRENTamd64-default/ref/usr/ports >>> [00:00:03] Gathering ports metadata >>> [00:00:03] Warning: (ports-mgmt/poudriere-devel): jexec >>> CURRENTamd64-default jid=11 uid=0 euid=0 >>> [00:00:03] Warning: (misc/freebsd-release-manifests): jexec >>> CURRENTamd64-default jid=11 uid=0 euid=0 >>> [00:00:03] Warning: (misc/freebsd-release-manifests): jexec >>> jail_attach() errno=1 >>> [00:00:03] Warning: (misc/freebsd-release-manifests): jexec: >>> jail_attach(11): Operation not permitted >>> [00:00:03] Warning: (ports-mgmt/pkg): jexec CURRENTamd64-default jid=11 >>> uid=0 euid=0 >>> [00:00:03] Warning: (misc/freebsd-release-manifests): Error: Error >>> looking up dependencies for misc/freebsd-release-manifests >>> [00:00:03] Warning: (ports-mgmt/pkg): jexec jail_attach() errno=1 >>> [00:00:03] Warning: (ports-mgmt/portconfig): jexec CURRENTamd64-default >>> jid=11 uid=0 euid=0 >>> [00:00:03] Warning: (ports-mgmt/pkg): jexec: jail_attach(11): Operation >>> not permitted >>> [00:00:03] Warning: (ports-mgmt/portconfig): jexec jail_attach() errno=1 >>> [00:00:03] Warning: (ports-mgmt/portconfig): jexec: jail_attach(11): >>> Operation not permitted >>> [00:00:03] Warning: (ports-mgmt/pkg): Error: Error looking up >>> dependencies for ports-mgmt/pkg >>> [00:00:03] Warning: (ports-mgmt/portconfig): Error: Error looking up >>> dependencies for ports-mgmt/portconfig >>> [00:00:03] Error: >>> /usr/local/share/poudriere/bulk.sh:gather_port_vars:184:Fatal errors >>> encountered gathering ports metadata >>> >>> but the call fo jail_attach() fails. >> >> But does this also happen with 74bd6fb1eb028d15df407efb62628253dab90aa5? >> Have you tried a clean build? > > Clean build of: > FreeBSD zipper.catspoiler.org 16.0-CURRENT FreeBSD 16.0-CURRENT #44 > n287974-74bd6fb1eb02: Mon Aug 10 00:02:36 PDT 2026 > dl@zipper.catspoiler.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 > > # poudriere bulk -j CURRENTamd64 -C ports-mgmt/poudriere-devel > [00:00:01] Creating the reference jail... done > [00:00:02] Mounting system devices for CURRENTamd64-default > [00:00:02] Warning: Using packages from previously failed, or > uncommitted, build: > /var/poudriere/data/packages/CURRENTamd64-default/.building > [00:00:02] Mounting ports from: /usr/ports > [00:00:02] Mounting packages from: > /var/poudriere/data/packages/CURRENTamd64-default > [00:00:02] Mounting distfiles from: /usr/ports/distfiles > [00:00:02] Appending to make.conf: /usr/local/etc/poudriere.d/make.conf > [00:00:02] Appending to make.conf: > /usr/local/etc/poudriere.d/CURRENTamd64-make.conf > /etc/resolv.conf -> > /var/poudriere/data/.m/CURRENTamd64-default/ref/etc/resolv.conf > [00:00:02] Starting jail CURRENTamd64-default > Updating /var/run/os-release done. > [00:00:02] Will build as nobody:nobody (65534:65534) > [00:00:03] Ports supports: FLAVORS SUBPACKAGES SELECTED_OPTIONS > [00:00:03] Acquiring build logs lock for CURRENTamd64-default... done > [00:00:04] Logs: > /var/poudriere/data/logs/bulk/CURRENTamd64-default/2026-08-10_00h12m11s > [00:00:04] Loading MOVED for > /var/poudriere/data/.m/CURRENTamd64-default/ref/usr/ports > [00:00:04] Gathering ports metadata > [00:00:04] Warning: (misc/freebsd-release-manifests): jexec: > jail_attach(1): Operation not permitted > [00:00:04] Warning: (misc/freebsd-release-manifests): Error: Error > looking up dependencies for misc/freebsd-release-manifests > [00:00:04] Warning: (ports-mgmt/pkg): jexec: jail_attach(1): Operation > not permitted > [00:00:04] Warning: (ports-mgmt/portconfig): jexec: jail_attach(1): > Operation not permitted > [00:00:04] Warning: (ports-mgmt/pkg): Error: Error looking up > dependencies for ports-mgmt/pkg > [00:00:04] Warning: (ports-mgmt/portconfig): Error: Error looking up > dependencies for ports-mgmt/portconfig > [00:00:04] Error: > /usr/local/share/poudriere/bulk.sh:gather_port_vars:184:Fatal errors > encountered gathering ports metadata > [CURRENTamd64-default] [2026-08-10_00h12m11s] [crashed] Time: 00:00:01 > [00:00:04] Logs: > /var/poudriere/data/logs/bulk/CURRENTamd64-default/2026-08-10_00h12m11s Sorry, I was obviously testing with an "old" poudriere version (built pre fts changes). :-( After rebuilding poudriere I also get this error. Your patch seems to fix this, but the "too many open files" error still occurs (e.g. building lang/go126). I have reverted both commits in my local checkout and rebuilt host and jail.