Description
Observation
mcpp 2026.11.7.1 (candidate, mcpp-community/mcpp#889) runs every compiler of a build through an executor (mcpp __compiler-cap) that takes one of N slot locks with mcpplibs::os::fs::lock::acquire(<generation>/../slots/slot-<i>.lock, exclusive, wait = false) (mcpplibs.os 0.3.0 over openkal-macos 0.22, hosted). On macOS 15 (arm64), in the e2e suite, the first attempt of an executor on slot-0.lock is now and then reported as
locking /private/var/folders/…/.mcpp/compiler-runs/<id>/slots/slot-0.lock: not found
while another executor holds that slot. Instrumented in the same process right after the failure (probe PR mcpp-community/mcpp#895):
- the directory and
slot-0.lockexist;std::ofstreamcreates a file in the directory; - the preopens are the working directory and
/; - a second
lock::acquireof the same file reportswould block.
It occurs in about one of fifteen runs of four e2e tests, always on the first slot, never on Linux (openkal-linux) with the same binary layout.
What the kernel answers
The same pattern without openkal, on the same runners (libc open + fcntl(F_OFD_SETLK)):
| Probe | Attempts | Result |
|---|---|---|
| 8 processes contending for 4 slots, unlock + close | 128 000 | EAGAIN or acquired |
| a held lock, 2000 fresh processes, one attempt each | 2 000 | EAGAIN |
| 4 000 processes whose holders end by exiting | 4 000 | acquired after EAGAIN |
and with mcpplibs.os 0.3.0 itself in 8 contending processes: 83 571 would block, 4 638 acquired, nothing else. So the kernel does not report ENOENT; the report arises in the hosted path kal_fs_open → kal_fs_lock under conditions this standalone program does not reproduce (the executor has taken and released other OFD locks before, and runs beside a parent that holds the generation's owner lock).
Requested
The kal_err_not_found of a non-waiting kal_fs_lock, or of the kal_fs_open with KAL_OPEN_CREATE before it, for an existing file in an existing directory. mcpp treats it as a held slot while the directory exists, and refuses after five seconds of it (mcpp-community/mcpp#889).
Activity
fix(build): a slot reported missing in its existing directory is held