From: Rick Macklem <rmacklem@uoguelph.ca>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
"J. Bruce Fields" <bfields@fieldses.org>,
Bram Vandoren <brambi@gmail.com>
Subject: Re: NFS client hangs after server reboot
Date: Thu, 11 Apr 2013 19:15:52 -0400 (EDT) [thread overview]
Message-ID: <60201423.761959.1365722152352.JavaMail.root@erie.cs.uoguelph.ca> (raw)
In-Reply-To: <452C72A5-F773-4E16-88F4-B1100C505C41@oracle.com>
Chuck Lever wrote:
> [ Adding Rick Macklem ]
>
> On Apr 9, 2013, at 3:08 PM, J. Bruce Fields <bfields@fieldses.org>
> wrote:
>
> > On Tue, Apr 09, 2013 at 05:51:40PM +0200, Bram Vandoren wrote:
> >> Hello,
> >> we have a FreeBSD 9.1 fileserver and several clients running kernel
> >> 3.8.4-102.fc17.x86_64. Everything works fine till we reboot the
> >> server. A fraction (1/10) of the clients don't resume the NFS
> >> session
> >> correctly. The server sends a NFS4ERR_STALE_STATEID. The client
> >> sends
> >> a RENEW to the server but no SETCLIENTID. (this should be the
> >> correct
> >> action from my very quick look at RFC 3530). After that the client
> >> continues with a few READ call and the process starts again with
> >> the
> >> NFS4ERR_STALE_STATEID response from the server. It generates a lot
> >> of
> >> useless network traffic.
> >
> > 0.003754 a.b.c.2 -> a.b.c.120 NFS 122 V4 Reply (Call In 49) READ
> > Status: NFS4ERR_STALE_STATEID
> > 0.003769 a.b.c.2 -> a.b.c.120 NFS 114 V4 Reply (Call In 71) RENEW
> >
> > I don't normally use tshark, so I don't know--does the lack of a
> > status
> > on that second line indicate that the RENEW succeeded?
> >
> > Assuming the RENEW is for the same clientid that the read stateid's
> > are
> > associated with--that's definitely a server bug. The RENEW should be
> > returning STALE_CLIENTID.
>
> The server is returning NFS4_OK to that RENEW and we appear to be out
> of the server's grace period. Thus we can assume that state recovery
> has already been performed following the server reboot, and a fresh
> client ID has been correctly established. One possible explanation for
> NFS4ERR_STALE_STATEID is that the client skipped recovering these
> state IDs for some reason.
>
Just to clarify/correct what I posted yesterday...
The boot instance is the first 4 bytes of the clientid and the first
4 bytes of the stateid.other. (Basically, for the FreeBSD server, a
stateid.other is just the clientid + 4 additional bytes that identify
which stateid related to the clientid that it is.)
Those first 4 bytes should be the same for all clientids/stateid.others
issued during a server boot cycle. Any clientid/stateid.other with a
different first 4 bytes will get the NFS4ERR_STALE_CLIENTID/STATEID
reply.
rick
> A full network capture in pcap format, started before the server
> reboot occurs, would be needed for us to analyze the issue properly.
>
> --
> Chuck Lever
> chuck[dot]lever[at]oracle[dot]com
next prev parent reply other threads:[~2013-04-11 23:15 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-09 15:51 NFS client hangs after server reboot Bram Vandoren
2013-04-09 19:08 ` J. Bruce Fields
2013-04-10 19:33 ` Chuck Lever
2013-04-10 23:23 ` Rick Macklem
2013-04-11 23:15 ` Rick Macklem [this message]
2013-04-12 9:19 ` Bram Vandoren
2013-04-12 15:10 ` J. Bruce Fields
[not found] ` <CACQjR_CcKwHU8sMrmQ5YfgV5dbuiMLRRqBkDRQEVq2yjGEuzmg@mail.gmail.com>
2013-04-12 15:14 ` Chuck Lever
2013-05-28 12:31 ` Bram Vandoren
2013-05-28 19:23 ` Chuck Lever
2013-05-28 22:06 ` Rick Macklem
2013-05-28 23:30 ` Rick Macklem
2013-05-29 1:04 ` Chuck Lever
2013-05-29 1:13 ` Chuck Lever
2013-05-29 12:49 ` Rick Macklem
2013-05-30 11:09 ` Bram Vandoren
2013-05-30 0:24 ` Rick Macklem
2013-05-30 0:31 ` Rick Macklem
2013-05-30 11:20 ` Bram Vandoren
2013-05-30 11:04 ` Bram Vandoren
2013-05-30 11:55 ` Rick Macklem
2013-05-31 16:35 ` Bram Vandoren
2013-05-31 23:24 ` Rick Macklem
2013-08-28 13:39 ` William Dauchy
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=60201423.761959.1365722152352.JavaMail.root@erie.cs.uoguelph.ca \
--to=rmacklem@uoguelph.ca \
--cc=bfields@fieldses.org \
--cc=brambi@gmail.com \
--cc=chuck.lever@oracle.com \
--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;
as well as URLs for NNTP newsgroup(s).