Package: src:linux Version: 6.12.116-1 Severity: important Tags: upstream Dear Maintainer, After upgrading an NFS server from the bookworm 6.1 kernel to the trixie 6.12 kernel, blocking locks taken on an NFSv4.2 export by two different clients are no longer woken up when the holder releases them. The waiting client stalls for about 30 seconds (the client-side NFS4_LOCK_MAXTIMEOUT back-off) instead of getting the lock as soon as it is released. Setup
* Server: Debian 13.7, linux-image-6.12.116+deb13-amd64 6.12.116-1, nfs-kernel-server 1:2.8.3-1. The export is on ext4 (md RAID), options sync,wdelay,hide,no_subtree_check,sec=sys,rw,secure,root_squash,no_all_squash. * Clients: two Debian 13 hosts running 6.12.116+deb13-amd64, mounted with vers=4.2. * The clients have run 6.12 since August 2026, and cross-client locking worked while the server ran 6.1.0-54-amd64. The stalls started on 2026-11-05, when the server moved to 6.12.115-1. Nothing changed on the clients that day, so the regression is on the server side. Reproducer client A: flock -x /mnt/share/testfile sleep 5 client B (1.5 s later): time flock -x -w 60 /mnt/share/testfile true Expected: B gets the lock after about 3.5 s. Observed on 2026-11-09 with 6.12.116-1: 31.61 s. With both processes on client A, the wait is 3.51 s. Server-side traces (6.12.115-1, 2026-11-06, kernel tracepoints during the same test) * The blocking LOCK from client B (WRITEW_LT) reaches nfsd, but nfsd sets the lock without FL_SLEEP: posix_lock_inode shows fl_flags=FL_POSIX only. The server therefore treats it as non-blocking: it returns NFS4ERR_DENIED and records no blocked lock. * When client A releases the lock (OP_LOCKU), no nfsd_cb_queue or nfsd_cb_notify_lock event appears. CB_NOTIFY_LOCK is never sent. * The client behaves as designed. It waits for the notification up to the 30 s cap, then retries: two LOCK attempts in total, at t0 and at t0+31 s. * I found 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 report may be the mirror case, but I have not confirmed the root cause. Impact Any application that serialises on files shared across NFS clients stalls for 30 s per contended lock. In our case, PHP file sessions on a two-node web front caused gateway timeouts. We have worked around it (sessions moved to a database, load-balancer session affinity), but the bug still affects other shared directories. I have not tested a mainline kernel. I can test patches or collect more traces on request. Best regards, Julien Leclerc Directeur technique Saatchi&Saatchi 145 rue de Courcelles 75017 Paris (+33) 6 62 83 71 93 [email protected]<mailto:[email protected]> www.saatchi.fr<http://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.

