Repository navigation
Closed
Description
The nightly NFS lock suite failed.
- Run: https://github.com/project-minigraf/minigraf/actions/runs/32616793063
- Commit: c4ac994
- Reproduce: needs a loopback NFS export mounted as vers=4 and as
vers=3,nolock; see the "nfs" job in .github/workflows/nfs-lock.yml
Test output
�[1m�[33mwarning�[0m: Cargo.toml: `panic` setting is ignored for `bench` profile
�[1m�[33mwarning�[0m: `minigraf` (manifest) generated 1 warning
�[1m�[92m Compiling�[0m minigraf v1.2.3 (/home/runner/work/minigraf/minigraf)
�[1m�[92m Finished�[0m `test` profile [unoptimized + debuginfo] target(s) in 0.25s
�[1m�[92m Running�[0m tests/nfs_lock_test.rs (target/debug/deps/nfs_lock_test-6e8cc48881198bda)
running 5 tests
OPEN_OK
test test_open_unlocked_mode_succeeds_on_an_ordinary_filesystem ... ok
test test_unrecognized_mode_fails_loudly_instead_of_falling_through ... ok
thread 'test_allow_unlocked_gates_the_unsupported_nfsv3_mount' (5640) panicked at tests/nfs_lock_test.rs:188:5:
default open must fail closed on a mount that cannot lock.
stdout: OPEN_OK
stack backtrace:
0: __rustc::rust_begin_unwind
at /rustc/88d9e12ae178fab0fb5cc050a94da85685d449ea/library/std/src/panicking.rs:679:5
1: core::panicking::panic_fmt
at /rustc/88d9e12ae178fab0fb5cc050a94da85685d449ea/library/core/src/panicking.rs:80:14
2: nfs_lock_test::test_allow_unlocked_gates_the_unsupported_nfsv3_mount
at ./tests/nfs_lock_test.rs:188:5
3: nfs_lock_test::test_allow_unlocked_gates_the_unsupported_nfsv3_mount::{closure#0}
at ./tests/nfs_lock_test.rs:176:59
4: <nfs_lock_test::test_allow_unlocked_gates_the_unsupported_nfsv3_mount::{closure#0} as core::ops::function::FnOnce<()>>::call_once
at /rustc/88d9e12ae178fab0fb5cc050a94da85685d449ea/library/core/src/ops/function.rs:250:5
5: <fn() -> core::result::Result<(), alloc::string::String> as core::ops::function::FnOnce<()>>::call_once
at /rustc/88d9e12ae178fab0fb5cc050a94da85685d449ea/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
test test_allow_unlocked_gates_the_unsupported_nfsv3_mount ... FAILED
test test_lock_is_exclusive_or_refused_over_nfsv3_without_lockd ... ok
OPEN_OK
test test_lock_is_exclusive_over_nfsv4 ... ok
failures:
failures:
test_allow_unlocked_gates_the_unsupported_nfsv3_mount
test result: FAILED. 4 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 27.22s
�[1m�[91merror�[0m: test failed, to rerun pass `--test nfs_lock_test`
Metadata
Metadata
Assignees
Labels
No labels
Activity
adityamukho commentedon Aug 23, 2026
Diagnosis
This is not a test-infrastructure bug — it's the nightly NFS suite catching the exact risk flagged as unmitigated on merge in the kernel file-locking design doc's risk table (
docs/superpowers/specs/2026-08-22-kernel-file-locking-design.md):What happened: On the loopback NFSv3 mount with
nolock,std::fs::File::try_lock()returnsOk(()), not an error. Linux's NFS client handlesflock()on anolockmount via local, in-kernel advisory locking rather than going over NLM to the server — soclassify()(src/storage/backend/file.rs) takes theAcquiredbranch, neverUnsupported.allow_unlockedis never consulted, because the code never learns the mount can't really lock.Why the exclusivity tests still passed: this suite runs both processes from the same client machine, so the local kernel lock table still serializes them correctly within that host. The real-world danger is two separate client machines mounting the same
nolockexport — each gets its ownOk(())from its own local kernel, with zero cross-host coordination. A single-runner loopback test structurally cannot reproduce that (would need a second physical/VM client), but this result confirms the mechanism the design doc worried about is real.Scope note
Issue #324 (this workflow) was scoped to building the detection infrastructure, not fixing lock detection logic — so this failure is expected to stay open until a follow-up addresses it, rather than something #324's own PR should have silently patched around.
test_allow_unlocked_gates_the_unsupported_nfsv3_mount's premise (that an unsupported mount produces an I/O error) doesn't hold fornolockspecifically; it's accurate for genuinely lock-incapable filesystems (e.g. some FUSE/9p mounts), just not this one.Possible directions for a fix
nolock-style local-only NFS locking some other way (e.g. probe via a second, real network round-trip rather than trustingtry_lock()'s local success) — nontrivial,stddoesn't expose enough here.nolockcase explicitly as an unsupported deployment (like unmixed-version writers already are) rather than trying to detect it in-process.No code change proposed here yet — flagging for design discussion before picking a direction.
ci(nfs-lock): stop provisioning the unsupported nolock mount
docs: document NFSv3 nolock as an unsupported lock deployment (#334) (#…
adityamukho commentedon Aug 23, 2026
Fixed in #335 (merged
47f3e54): documented thenolockgap as an unsupported deployment rather than patchingclassify()(no way to detect it fromtry_lock's result). Test premise corrected, doc-comment added onLockOutcome::Unsupported, operator-facing writeup in ERROR_REFERENCE.md STG-027 and CHANGELOG, and the nightly workflow no longer provisions the nolock mount since there's nothing for it to gate on.