Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.45 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796394438; b=13qITxoex0O7VrE1Qh+9BpqYoVKw4Xg+ZvWhzmajp7kBbXXwH2MGQyJX8EYccDYtH1cn DOgHdjPfT5O756fsyIzqGK92KiJQTWDkUSwQMksIvZ1Mk6IncIzYj9XFNhlLgPjNwqoOI wp0SdxOJS69ZVIdqkXlAewTSSORR1NeXRTT3SgF/gGZfc0eC143vvyqZVmxFxDVIO1YGB Qz1Fn+j3dtGmpiyMT3z1AF3i+0c1jQS5QVOiG6oSFMit4+2qpT+L3QFqx/SEjlYwizWQa Ocz6jyUB8T+Ip0gx0lyUNOQ6T01r+YNtuOjZ3twSq6fkxmPilX+/q/7WqgELUHqXH1Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796394438; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:Sender:Received:From: To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=kJfYay8pBmPreLzhwLbn4KB4txZmFi27/B2bX0SsZPA=; b=NmhOWDQOO2CQUSSs9hgbb/v66J7iD//QNIYXSRXQ2G5GPaqdE3BISJ048ujpB0iJ87Da CBdFlAe9k54JZHzKVnoOgDLlBqk5Xg5yxXdD6XV1fIUuaBRYXMJ2tJtNE4q6QDG2/5G1+ syKFbmhRk9zDujqvKmcZ3BNsits/hIq1L+xx9ritkZnSF3AcD08SzgnW2iSN0Hvtq0gAw KdCbut/IS8RJc4m0lBqooIfnIza28p/Qcy3C4slCZya3ZctHC4UZhXcEqWI3ogaZdTpmK hidUf4Y+nvz+wuCMBuXF2XF+kRY+c9W8dOZE9rW+/oyFzMjzl1I+PNhYr7bHWU+9NgQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail header.from=debian.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=W0OhEGdD; arc=none smtp.remote-ip=209.85.128.45 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D5B98606A32D for ; Fri, 4 Dec 2026 14:27:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D5B98606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=W0OhEGdD Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4bb70074ab2so6726335e9.0 for ; Fri, 04 Dec 2026 06:27:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796394436; x=1796999236; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to :content-type; bh=kJfYay8pBmPreLzhwLbn4KB4txZmFi27/B2bX0SsZPA=; b=W0OhEGdDC+dsTBEQa5+dg6QN6vJ/EcdxFPig67iSEMXTTLNRkKtYTzfi6lmuqvyAod sUmo7LeZNvUgnAgrYv+0arAyTOBsO3ZSdWBglCk/gnU1nn1Q3457Dj35WkdBNB89D1W9 cRIUC9mIF2UQPA2oE5YBv/dsa/kLzf3y/jxy46AaH2ja5Vfs+FV+gV+wmSGWP3IR/XoO cFCwLkq0M8w8zIHyWvSpCziCw/8uGWsP1dKEsbFoJ0zINfELAE2G+uOWm5NM+IMzsXNh IVDBtssrV9cHw1xt6fv2+7ljHeTgajd+6e6kpnxM3pRqRcPdBl3D47CcvpJxBm/JwKGc ZV6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796394436; x=1796999236; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=kJfYay8pBmPreLzhwLbn4KB4txZmFi27/B2bX0SsZPA=; b=VIlpg3GqXMYfDpGNDkIH3js4tDBEmCQw2a7ig2GH7Hja+AvCQyusaraWRWlmBX5n+o HGuXHo20a0U5aIi4dt/Jkf5h4Na6NoYbwE6tCF+Y/FWlf46tSdKvFayiCuuQ/QefH4Y+ n5FB/B8fmXGOFJ57mWXe4t7lPeoZe5wBFCLpRBlKPl/Pd1Cf7lEjrr07G7ip508S7JSs 0j4teOEauyPbjCBdfkl2giIT4m6Xf0qqy4Z0iMx4UV6dHM8YOKAz/pwxzgA0IxJ8JXcg qJ+gyUh7VAjL2y4iacHwbIJVALj9Josdu3LkoPL+/1ZipWwhegt0XVmlDVJiZPDgkf+W DoZw== X-Gm-Message-State: APuU4Z9kAvhb0TU6xRIlmYjO0lbkdhul55gx+feIMI8hn0RL91z0zFZY MZpnfXxZz2NMNFGwewSlxgrrXorf9IdRxa7mMhH9BYr9kNSTLyIr3NAx X-Gm-Gg: AZFdTZcz2Um7mWSol7ZTMeiD/fDHvQKGgrONwmhwcoiSR26CKYRFvJ86IXteeb1DCTe 37YypQDEFayWhYNCQ0bidWz+RWmaTzNTKYJR0ZMkg9pc+oNimO8V3gwryg07USLzqPBWNDtXSBd 8CuvNoS2KboStMt7Rti83oIZQwcdxLk2aO9rdCrjuRcYuvVGXJPILGP7YJPIO0HefYJf5/KY4XI 55xFKihQiONdSGmodIIBdC6mI1S5x/geL+hCCHecZFnD3WSkJhgfXIPg0C5KaraCdYotU71I4oC XSGi8CEL1Qg09OIVouToL1HMrt8B5RqBZ2ouhpoysqHhgI3VS5eJs7cd30k3EAzMMa8UIbu1t5u ielmVFVYOrizS/DL16WCv557i/qP03oyeBoryuESanTD1dXI+A8cVlGzDCmkxN1JES19zXBilka 16eYktFMOJlR5czOE0slXZv+XoAJkhnkyMgbhvyr76RcYROFEeIPTUzZWPfXOv1xqSBNvG+Jvgx ySqpn0RXgovEKL/3CfBHVBzRd3tkRfoAKEc5+Ep4NfCsofx+xZCOIvzepe5YCDqkKs2J8/Iqpig qt4bJFpYwbIkWUn9gjtYjkoIPjiCZHlv4/o8O82D11g1v+acAqhhjlDKrXutmDy0wOah+7q5XV4 E4CBBF26ZwQ== X-Received: by 2002:a05:600c:46c9:b0:4bb:5f07:10d7 with SMTP id 5b1f17b1804b1-4bbeb8eb672mr44706735e9.26.1796394436051; Fri, 04 Dec 2026 06:27:16 -0800 (PST) Received: from eldamar.lan (c-82-192-247-196.customer.ggaweb.ch. [82.192.247.196]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbe00792c9sm166960305e9.3.2026.12.04.06.27.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 06:27:15 -0800 (PST) Sender: Salvatore Bonaccorso Received: by eldamar.lan (Postfix, from userid 1000) id 32170DC04A2; Fri, 04 Dec 2026 15:27:14 +0100 (CET) From: Salvatore Bonaccorso To: Julien Leclerc , Jeff Layton Cc: linux-nfs@vger.kernel.org, 1153524@bugs.debian.org, Chuck Lever , regressions@lists.linux.dev, stable@vger.kernel.org Subject: [PATCH 6.12.y 0/4] Backport for "NLM/NFSD: Fix lock notifications for async-capable" Date: Fri, 4 Dec 2026 15:20:28 +0100 Message-ID: <20261204142703.1100372-1-carnil@debian.org> X-Mailer: git-send-email 2.55.0 X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi In Debian bug https://bugs.debian.org/1153524 reported a regression after updating from 6.1.y to the 6.12.y series, explained as follows: > 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,roo- > t_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. It was forwarded to th NFS list: https://lore.kernel.org/linux-nfs/SADPR02MB574770B2C27CA5277D9878958CE84D2@SADPR02MB574770.namprd02.prod.outlook.com/T/#mf090eb57d7770d471224ec0cb6a564ae2010d75f Jeff Layton determined: > Ben Coddington's series fixed the check in v6.13. None of it went to > 6.12.y: > > 8cf9a01edc21 ("fs: Introduce FOP_ASYNC_LOCK") > 2253ab99f2e9 ("gfs2/ocfs2: set FOP_ASYNC_LOCK") > 7e64c5bc497c ("NLM/NFSD: Fix lock notifications for async-capable > filesystems") > > The recent patch you noticed is 246a90a5109b ("nfsd: fix FL_SLEEP > being set unconditionally for all LOCK types"). It fixes a bug that > 7e64c5bc497c introduced, so it needs to be backported along with the > other three. The 4 patches following are matching the above. *Though* I defintively prefer if those will come directly from Jeff or will get an ack from him here. In Debian we will be in need to apply those ideally with the next round of updates we are going to push. Regards, Salvatore