Hello, Since our NFS server moved from the 6.1 kernel to 6.12, blocking locks taken by two different NFSv4.2 clients are no longer woken up when the holder releases them. The waiting client only gets the lock after its 30 s back-off (NFS4_LOCK_MAXTIMEOUT). I reported this to Debian three weeks ago (https://bugs.debian.org/1153524, in Cc). It still reproduces with the latest 6.12 stable update, so I am bringing it here.
Versions (server side, Debian kernels) Last known good: 6.1.0-54-amd64 (bookworm) First known bad: 6.12.115-1 (trixie) Still bad: 6.12.116-1, 6.12.118-1 Mainline: not tested The clients ran 6.12 for three months before the server upgrade, and cross-client locking worked during that time. Nothing changed on the clients when the stalls started, so the regression is on the server. Setup - Server: Debian 13, nfs-kernel-server 1:2.8.3-1, export on ext4 over md RAID1, options sync,wdelay,hide,no_subtree_check,sec=sys,rw, secure,root_squash,no_all_squash. - Clients: two Debian 13 hosts, same kernel as the server, mounted with vers=4.2 (local_lock=none). Reproducer client A: flock -x /mnt/share/testfile sleep 2 client B, 1 s later: time flock -x -w 60 /mnt/share/testfile true Results on 6.12.118 (server and clients), 2026-12-01: A holds, B waits: 30.55 s, then 30.65 s B holds, A waits: 31.93 s A holds, A waits: 0.54 s (same client, control) Server-side traces (6.12.115, same test, kernel tracepoints) - The blocking LOCK from client B (WRITEW_LT) reaches nfsd, but the lock is set without FL_SLEEP: posix_lock_inode shows fl_flags=FL_POSIX only. nfsd treats it as non-blocking, returns NFS4ERR_DENIED and records no blocked lock. - When client A releases the lock (OP_LOCKU), there is no nfsd_cb_queue or nfsd_cb_notify_lock event: CB_NOTIFY_LOCK is never sent. - The client behaves as designed: it waits for the callback up to the 30 s cap, then retries. Two LOCK attempts in total, at t0 and t0+31 s. I noticed a recent nfsd series that fixes the FL_SLEEP test in nfsd4_lock (introduced by 7e64c5bc497c), but for the opposite case, FL_SLEEP wrongly set on non-blocking locks. This may be the mirror case; I have not confirmed the root cause. Impact: any application that serialises on files shared between NFS clients stalls for 30 s per contended lock. For us it was PHP file sessions on a two-node web front, which caused gateway timeouts. We have a workaround in place, but other shared directories are still exposed. The affected server is in production, so I cannot easily boot a mainline kernel on it. I can test patches on the Debian 6.12 kernel, collect more traces, or try to reproduce on a separate test setup if that would help. #regzbot introduced: v6.1..v6.12 Best regards, Julien Leclerc Directeur technique Saatchi&Saatchi 145 rue de Courcelles 75017 Paris (+33) 6 62 83 71 93 [email protected] www.saatchi.fr ------------------------------------------------------------------------ Disclaimer The information in this email and any attachments may contain proprietary and confidential information that is intended for the addressee(s) only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, retention or use of the contents of this information is prohibited. When addressed to our clients or vendors, any information contained in this e-mail or any attachments is subject to the terms and conditions in any governing contract. If you have received this e-mail in error, please immediately contact the sender and delete the e-mail.

