Re: [PATCH] SUNRPC: Make svcauth_gss sequence-number window size tunable
From: Chuck Lever
Date: Mon Nov 23 2026 - 09:21:16 EST
On Sun, Nov 22, 2026, at 7:56 PM, Fredrik Tolf wrote:
> The concrete problem that I seek to resolve with this is an issue where MIC
> verification, due to being schedulable, may sometimes delay the checking of
> sequence number so long that the sequence window in the meantime has drifted
> beyond the sequence number being verified. This causes the NFS server to
> disconnect the client in question despite it having done nothing wrong, making
> the client do 15-second timeouts before reconnecting and retrying, killing
> performance.
>
> Now, I would of course like to fix this *properly*, since the client, indeed, is
> doing nothing wrong, but as far as I can tell, I am not sure there is a way to
> fix this properly in a TCP context without serializing the entire authentication
> process, which in turn seems that it would require a full rewrite of the sunrpc
> servicing threading model, since it seems made to be intrinsically asynchronous.
> This makes sense given its past UDP primacy, where also the occasional dropping
> of a packet due to transient authentication failures like these would not be an
> issue since the request would just be treated as lost and retransmitted by the
> client, but in a TCP context, clearly, retransmission is left to the network
> layer and the client just terminates the whole connection on an authentication
> failure instead.
>
> Due to this difficulty in developing a proper fix, probably better done by
> someone actually familiar with the NFS/sunrpc code, I'm just making the window
> size tunable, so that I tune myself out of the problem. I considered a number of
> other heuristics along the way, but since they weren't really technically more
> correct, I figured this was the simplest and therefore best.
>
> The default window size was also inreased from 128 to 1024, due to 128 being
> clearly too small.
>
> This also relates to <https://bugzilla.linux-nfs.org/show_bug.cgi?id=416>
>
> Signed-off-by: Fredrik Tolf <fredrik@xxxxxxxxxxxxx>
As you noted in the bugzilla, this is a long-standing problem that is
difficult to address. Your sequence number misordering diagnosis is
correct.
However, just to be clear about the standing of the proposed fix: NACK
o Our usual upstream policy is to avoid adding tunables where the system
should be automatic. Tunables increase the size of the testing matrix,
add documentation requirements, and are difficult to remove when they
become outdated.
o Our usual upstream policy is to root-cause and fix the underlying
problem.
o Increasing the GSS sequence number window size does not actually make
this problem go away. It only makes it less frequent.
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.
--
Chuck Lever (Come to NFS bake-a-thon! https://nfsv4bat.org)