Article View: muc.lists.freebsd.bugs
Article #14[Bug 299221] nfscl: 45s NFSv4.1 outage when CREATE_SESSION returns NFS4ERR_STALE_CLIENTID within one nfsc_renew
From: bugzilla-noreply
Date: Thu, 08 Oct 2026 12:28
Date: Thu, 08 Oct 2026 12:28
72 lines
5006 bytes
5006 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=299221
Bug ID: 299221
Summary: nfscl: 45s NFSv4.1 outage when CREATE_SESSION returns
NFS4ERR_STALE_CLIENTID within one nfsc_renew
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: bugs@FreeBSD.org
Reporter: olivier@freebsd.org
Created attachment 275500
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=275500&action=edit
patch
After NFS4ERR_BADSESSION, recovery first tries CREATE_SESSION with the
extant ClientID. If that returns NFS4ERR_STALE_CLIENTID and a full recovery
already ran within the last nfsc_renew (lease/2, ~45s), nfsrpc_setclient()
returns NFSERR_IO instead of falling back to EXCHANGE_ID (the retok path,
recover_done_time gate in nfscl_renewthread()). The mount then does no I/O
until the window expires. Under load, 5ab48fb9f7ac re-arms recovery on every
BADSESSION, so this also becomes a CREATE_SESSION storm (+78 CREATE_SESSION,
+2 EXCHANGE_ID in one minute observed).
RFC 8881 says a failed CREATE_SESSION with the extant ClientID is followed by
EXCHANGE_ID. STALE_CLIENTID is definitive; waiting does not help.
Trigger: Amazon EFS drops session and ClientID whenever it resets a client
TCP connection (seen 30 times in one hour on one mount target). Linux 6.19
on the same mount target recovers in 8 ms (pcap: SEQUENCE 10052,
DESTROY_SESSION 10052, CREATE_SESSION 10022, EXCHANGE_ID, CREATE_SESSION 0).
DTrace (fbt on nfsrpc_setclient/createsession/exchangeid; retok=1 is the
CreateSession-only path):
18:30:41 setclient start /mnt/efs-soak retok=0
18:30:41 createsession ret=10022
18:30:41 exchangeid ret=0
18:30:41 createsession ret=0 <- recovered
18:30:59 setclient start /mnt/efs-soak retok=1 <- 2nd reset, 18s later
18:30:59 createsession ret=10022
18:30:59 setclient ret=5 retok_out=1 <- EIO, no EXCHANGE_ID
18:31:41 setclient start /mnt/efs-soak retok=0 <- 42s later
18:31:41 createsession ret=10022
18:31:41 exchangeid ret=0
18:31:41 createsession ret=0
4 of 17 recoveries in 2.5h took this path: outages of 42, 46, 46 and 45s.
Fix (attached): in nfsrpc_setclient(), on NFSERR_STALECLIENTID from the
extant-ClientID CREATE_SESSION, clear *retokp and continue to EXCHANGE_ID,
so nfscl_recover() also reclaims opens and delegations. Other errors keep
the current behaviour. Trade-off: a server that keeps dropping the ClientID
now gets a full recovery per BADSESSION instead of one per nfsc_renew; the
RECVRINPROG/RECOVER flags still serialize recoveries.
--
You are receiving this mail because:
You are the assignee for the bug.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID:
<bug-299221-227@https.bugs.freebsd.org/bugzilla/>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail From: bugzilla-noreply@freebsd.org Newsgroups: muc.lists.freebsd.bugs Subject: [Bug 299221] nfscl: 45s NFSv4.1 outage when CREATE_SESSION returns NFS4ERR_STALE_CLIENTID within one nfsc_renew Date: Thu, 08 Oct 2026 12:28:56 +0000 Organization: Newsgate at muc.de e.V. Sender: owner-freebsd-bugs@FreeBSD.org Approved: news-admin@muc.de Distribution: world Message-ID: <bug-299221-227@https.bugs.freebsd.org/bugzilla/> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2"; logging-data="16262"; mail-complaints-to="news-admin@muc.de" X-Original-To: bugs@mlmmj.nyi.freebsd.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791462537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qFC4FKor+DU2tTV9nwbeKRjuQkD/jHei89P/FLcijvM=; b=Lexe4yXXMixzUgfI3beNQsB8GDoAqRbbYCAyBG5ZUPilKJ4rDAEkvWt1aCUzJJhm1Y36FJ 1ggmaw30lD3qhZUXiZapUD5W1URVxAfVgpq9EHsPDc0B2gn8M6KbndT9wS9kI7qvVQScj6 LQ/byyR/wD59lq8rX/f0wh3CA5gMqx0Y5+xcFmK//MS8cq0Muw5OMPlkkroC+6+wGmRt95 FvAx3gCY5sGqrK+agIKHnugPDQ0U19IvwBZXyBxqRRSDroIkmpZQkE2ZNvezzxlYCIZ2JC hQnC5JXvKD+lMl+TWq/00KDZB1JdS3WqY97Ecuo6AevXxm6l05zImPFJqC2xTw== X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f Auto-Submitted: auto-generated Precedence: list X-Newsgate-Id: f02c70b8849f+ X-No-Archive: Yes