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.