All of lore.kernel.org
 help / color / mirror / Atom feed
From: bfields@fieldses.org (J. Bruce Fields)
To: Olga Kornievskaia <aglo@umich.edu>
Cc: Rick Macklem <rmacklem@uoguelph.ca>,
	Linux-NFS <linux-nfs@vger.kernel.org>
Subject: Re: Linux NFSv4.1 client session seqid sometimes advances by 2
Date: Tue, 13 Apr 2021 13:17:38 -0400	[thread overview]
Message-ID: <20210413171738.GA28230@fieldses.org> (raw)
In-Reply-To: <CAN-5tyEWwAtBG41VByps+zS6Sw_z9U7Q8HZb84SqyXp4woUiPA@mail.gmail.com>

On Tue, Apr 13, 2021 at 09:31:37AM -0400, Olga Kornievskaia wrote:
> On Tue, Apr 13, 2021 at 3:08 AM Rick Macklem <rmacklem@uoguelph.ca> wrote:
> >
> > Hi,
> >
> > During testing of a Fedora Core 30 (5.2.10 kernel) against a FreeBSD
> > server (4.1 mount), I have been simulating a network partitioning
> > for a few minutes (until the TCP connection goes to SYN_SENT on
> > the Linux client).
> >
> > Sometimes, after the network partition heals, the FreeBSD server
> > replies NFS4ERR_SEQ_MISORDERED.
> > Looking at the packet trace, the seqid for the slot has advanced by
> > 2 instead of 1. An RPC request for old-seqid + 1 never seems to get
> > sent.
> > --> Since sending an RPC with "seqid + 2" but never sending one
> >        that is "seqid + 1" for a slot seems harmless, I have added an optional
> >        hack (can be turned off), to allow this case instead of replying
> >        NFS4ERR_SEQ_MISORDERED for it. The code will still reply
> >        NFS4ERR_SEQ_MISORDERED if an RPC for the slot with
> >        "old seqid + 1" in it.
> >        --> Yes, doing this hack is a violation of RFC5661, but I've
> >              done it anyhow.
> >
> > If you are interested in a packet capture with this in it:
> > fetch https://people.freebsd.org/~rmacklem/linuxtofreenfs.pcap
> > - then look at packet #1945 and #2072
> >   --> You'll see that slot #1 seqid goes from 4 to 6. There is no
> >          slot#1 seqid 5 RPC sent on the wire.
> >          (This packet capture was taken on the Linux client using
> >           tcpdump.)
> > --> Btw, the "RST battle" you'll see in the above trace between
> >        #2005 and #2068 that goes on until the FreeBSD
> >        krpc/NFS times out the connection after 6min. seems to be a recent
> >        FreeBSD TCP bug.
> >        I have reproduced this seqid advances by 2 on an older system
> >        that does not "RST battle" and allows the reconnect right away,
> >        once the network partition is healed, so it does seem to be
> >        relevant to this bug.
> >
> > Someday, I will get around to upgrading to a more recent Linux
> > kernel and will test to see if I can still reproduce this bug.
> > On 5.2.10, it is intermittent and does not occur every time I
> > do the network partitioning test.
> >
> > Mostly just fyi, rick
> 
> Hi Rick,
> 
> I think this is happening because slotid=1 had something queued up
> using seqid=5 and that was interrupted because the connection was
> RSTed. For the interrupted slot, the client would send solo SEQUENCE
> with +1 seqid.

Doesn't the client send the solo SEQUENCE with seqid 5 in that case?

--b.

  reply	other threads:[~2021-04-13 17:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12 20:57 Linux NFSv4.1 client session seqid sometimes advances by 2 Rick Macklem
2021-04-13 13:31 ` Olga Kornievskaia
2021-04-13 17:17   ` J. Bruce Fields [this message]
2021-04-13 18:59     ` Olga Kornievskaia
2021-04-13 19:29       ` J. Bruce Fields
2021-04-13 20:52         ` Olga Kornievskaia
2021-04-13 23:08           ` Rick Macklem

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=20210413171738.GA28230@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=aglo@umich.edu \
    --cc=linux-nfs@vger.kernel.org \
    --cc=rmacklem@uoguelph.ca \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.