From 73e797e3f31eb52b0074b86cd16949c827b75670 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 10:46:11 -0300 Subject: A lock another open holds fails at once with file in use instead of parking A contended lock parked until the holder unlocked, but through a kernel or FUSE mount the kernel serialises writes to one file, so the parked lock held up the holder's own unlock and close on that ctl, and the two deadlocked. acme's qlock blocks; here the second lock is refused at once with file in use (EBUSY) and the client retries, and nothing parks on the lock any more. Co-Authored-By: Claude Opus 5.5 --- test/fs.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'test') diff --git a/test/fs.py b/test/fs.py index a6d24e0b..816f416c 100644 --- a/test/fs.py +++ b/test/fs.py @@ -218,21 +218,21 @@ def discovery(binary, embedded=False): client.write('/exec', b'Msg woken\n') reader.join(5) assert woke and woke[0].endswith(b' woken\n'), woke - # A pane's ctl takes acme's lock: a second open's lock waits until - # the holder unlocks, and nothing else waits on it meanwhile. + # A pane's ctl takes acme's lock: a second open's lock fails at + # once with "file in use" until the holder unlocks, and nothing + # else waits on it meanwhile. with Client(address) as other: mine = client.open(f'/pane/{first}/ctl', 2) client.rpc(118, struct.pack('