From: Fredrik Tolf <fredrik@dolda2000.com>
To: Chuck Lever <cel@kernel.org>
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] SUNRPC: Make svcauth_gss sequence-number window size tunable
Date: Mon, 23 Nov 2026 17:26:53 +0100 (CET) [thread overview]
Message-ID: <a09eb43b-3078-d6e8-1529-8aee1eb302b0@dolda2000.com> (raw)
In-Reply-To: <9f8f700f-a10f-4aff-a385-4300c8164f1b@app.fastmail.com>
On Mon, 23 Nov 2026, Chuck Lever wrote:
> I don't think this is a SunRPC scheduling problem. Rather it's that the
> crypto handling sometimes takes a while (and I don't know why that is)
> and that delays one RPC just enough to trigger the sequence number
> window check.
I think that it is. I reckon that, since nfsd handles requests
concurrently, there are no particular ordering guarantees on the sequence
number checks. While it's true that the particularly long time that the
MIC verification can take seems to be the actual cause of the issue in
these cases, I don't think making that go away would be an actual
root-cause fix.
As I mentioned, I considered other heuristic solutions -- one of them was
to effectively hold a lock during the MIC+seqnum check, or other
mechanisms that would compensate for the time the MIC verification might
take, but in the end I didn't consider them technically correct either.
Again, since the request processing is concurrent, I reckon that, while
much more unlikely, there could be other scheduling issues (ECC/MCE
hickups, interrupt storms, &c&c) that could delay a particular nfsd thread
from even reaching svcauth_gss_verify_header before the window has already
excluded it by the work of other, faster-working threads. A *lot* less
likely, yes, but still hard to consider technically correct and fixing
the root cause, no?
As I said, in a UDP context, I imagine this wouldn't be a problem, since
the failing packet would just be considered lost and retransmitted, but
that's not how things happen over TCP. Unless a TCP connection can also be
made to just consider such requests lost and having them retransmitted
later instead of closing the channel, I imagine the only real root-cause
fix is to serialize the GSS verifier checks, so that they happen in TCP
stream order, and that seems quite difficult to do given the asynchronous
nature of the sunrpc servicing implementation, which is why it comes back
to a scheduling problem.
Again, since I considered that problem quite difficult to solve, that's
why I suggested this solution in the interim, just because I'm sitting
with disconnection storms on my home network that sometimes makes it very
difficult to get anything done. ;)
At least that's how I analyzed it, but I'm really not familiar with the
NFS/sunrpc code; I'm normally just an ordinary home user of it. Thoughts?
--
Fredrik Tolf
prev parent reply other threads:[~2026-11-23 16:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 0:56 Fredrik Tolf
2026-11-23 14:20 ` Chuck Lever
2026-11-23 16:26 ` Fredrik Tolf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a09eb43b-3078-d6e8-1529-8aee1eb302b0@dolda2000.com \
--to=fredrik@dolda2000.com \
--cc=cel@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®