Locks: report shared lock-table exhaustion as ENOLCK#929
Closed
brandonpayton wants to merge 1 commit into
Closed
Conversation
This was referenced Jul 13, 2026
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes one focused slice from #769.
What #907 already landed
#907 fixed the mmap/munmap accounting and syscall-channel behavior that was mixed into the old composite branch. This PR does not replay any of that work.
What remains here
The shared host advisory-lock table has a fixed capacity. A conflicting lock and a full table used to look identical, so
F_SETLKWcould retry forever when no slot existed.This change keeps the existing capacity and carries a detailed result through the host import:
EAGAIN;ENOLCK;What I removed
The old #769 commit only raised the default table from 256 entries to 4096. That moved the failure point without defining correct behavior, so that capacity bump is deliberately not included.
ABI and package artifacts
The structural ABI 39 snapshot is unchanged. This corrects the errno for an existing host-side failure case and does not change syscall numbers, layouts, pointers, or generated bindings, so there is no ABI bump. No package recipe or package output changed, so no package rebuild is required.
Validation
Run through
scripts/dev-shell.sh:A full Vitest run reached 143 passing files and 1,239 passing tests, but four unrelated package/runtime fixture files failed locally while native Rust dependencies invoked the host archive tool; one earlier run also lacked the root
tsxinstall. The focused final-state rerun is green and CI is running the full maintained matrix.Not run locally: browser suites, libc/POSIX/Sortix conformance, or performance benchmarks. This PR makes no performance claim.