[FEATURE] Coordinate original-object advisory locks across build clients #32
Labels
No labels
alpha-1
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/posixd#32
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem and motivation
Concurrent build tools require advisory exclusion in addition to exclusive lockfile creation. Cargo documents shared/exclusive cache locks and build-directory locks; Rust file locking retains an open-description lifetime. Git's documented create/write/rename lockfile flow is already covered by existing namespace operations. Exact imported source selection and guest tool execution remain separate deliverables.
Proposed behavior and scope
Implement process-owned and open-description-owned record locking, whole-file shared/exclusive/unlock operations, nonblocking conflict queries/acquisition and blocking acquisition through existing admitted descriptor/scope custody. Preserve complete signed offset/length and zero-length-to-future-EOF semantics, negative-length normalization, replacement/splitting/coalescing, shared-read compatibility and exclusive conflicts. Coordinate locks across realms selecting the same original native file; do not substitute mediator-local pathname tables.
Use original VFS candidate/provider identity and existing counted storage. Derive ownership from the authenticated scope or retained shared description, never an application PID, pathname, fd number or claimed inode. Process locks release on any corresponding descriptor close; description locks survive aliases until final close. Blocking waits retain native invocation custody, detect required deadlock cycles, respond to cancellation and wake from lock-state changes without request replay.
Authority, security and reliability
Advisory exclusion adds no content, namespace, process-control, wait endpoint or entropy grant. Require the original admitted object and appropriate read/write access. Keep complete object/scope/description generations through rename, unlink, cancellation and teardown. Refusals and capacity exhaustion precede mutation. Uncertain operations retain cleanup custody. Scope retirement and process death release their original lock/wait ownership; copied IDs cannot unlock another owner. No mandatory-I/O permission or UID-zero bypass is introduced.
Acceptance criteria
Checklist
Alternatives and tradeoffs
A pathname or per-mediator lock map would fail rename/hardlink identity or cross-realm exclusion. The shared original VFS object boundary can coordinate native scopes while preserving provider custody and existing resource budgets. Whole-file locking can use the same interval machinery as description-owned record locks; its interaction policy must be documented. Do not infer imported-tool acceptance from these substrate controls. Choose no new retry/depth/range-count limits beyond actual counted storage and scalar representability.
Tracking and rollout
Coordinate filesystem semantics, temporary outputs, Posixd review, VFS review and phase completion. Derive implementation independently from the POSIX fcntl contract, Rust File documentation, Cargo cache-lock documentation and Git lockfile documentation; import no external implementation code. Tests, builds, lint, generated documentation, VM/profiler execution and CI observation remain deferred. Both full guest EriX generations and external Rust/LLVM guest rebuilding remain required.
Original-object advisory lock completion — 2 October 2026
Original provider-confirmed objects and retained scope/candidate generations determine ownership; descriptive PIDs, paths and fd numbers grant no authority.
Abandonment cleans readiness even if Commit never arrived.
Libc entry points, exact imported-tool selection, both full EriX guest generations and external Rust/LLVM guest rebuilding remain required.
Related records and contracts
erikinkinen referenced this issue from erix/coreutils2026-10-02 09:51:18 +02:00
erikinkinen referenced this issue from erix/docs2026-10-02 09:51:21 +02:00
erikinkinen referenced this issue from erix/e2fsd2026-10-02 09:51:32 +02:00
erikinkinen referenced this issue from erix/exsh2026-10-02 09:51:33 +02:00
erikinkinen referenced this issue from erix/extop2026-10-02 09:51:34 +02:00
erikinkinen referenced this issue from erix/fatd2026-10-02 09:51:34 +02:00
erikinkinen referenced this issue from erix/integration2026-10-02 09:51:37 +02:00
erikinkinen referenced this issue from erix/launchd2026-10-02 09:51:42 +02:00
erikinkinen referenced this issue from erix/lib-ipc2026-10-02 09:51:48 +02:00
erikinkinen referenced this issue from erix/lib-posixabi2026-10-02 09:51:49 +02:00
erikinkinen referenced this issue from erix/lib-stdio2026-10-02 09:51:51 +02:00
erikinkinen referenced this issue from erix/loaderd2026-10-02 09:51:55 +02:00
erikinkinen referenced this issue2026-10-02 09:52:02 +02:00
erikinkinen referenced this issue from erix/procd2026-10-02 09:52:05 +02:00
erikinkinen referenced this issue from erix/ramfsd2026-10-02 09:52:06 +02:00
erikinkinen referenced this issue from erix/rootd2026-10-02 09:52:06 +02:00
erikinkinen referenced this issue from erix/timed2026-10-02 09:52:07 +02:00
erikinkinen referenced this issue from erix/ttyd2026-10-02 09:52:08 +02:00
erikinkinen referenced this issue from erix/vfsd2026-10-02 09:52:08 +02:00