All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Andrew Dixie <andrew-0FSrDVjkvKm9koe0gwxAeg@public.gmane.org>
Cc: Trond Myklebust <trond.myklebust@netapp.com>,
	linux-nfs@vger.kernel.org,
	maximilian attems <max-U9r9yeDMy7A@public.gmane.org>
Subject: Re: (fwd) nfs hang on 2.6.24
Date: Wed, 6 Feb 2008 16:45:08 -0500	[thread overview]
Message-ID: <20080206214508.GO5342@fieldses.org> (raw)
In-Reply-To: <37673.203.167.214.129.1202332746.squirrel-pmwrj2wvkLORZ0GbGNPwb6VXKuFTiq87@public.gmane.org>

On Thu, Feb 07, 2008 at 10:19:06AM +1300, Andrew Dixie wrote:
> 
> > Oh, right, I was confusing client and server reboot and assuming the
> > client would forget the uniquifier on server reboot.  That's obviously
> > wrong!  The client will forget its own uniquifier on client reboot, but
> > that's alright since it's happy enough just to let that old state time
> > out at that point.  So the only possible problem is suboptimal behavior
> > when the client reboot time is less than the lease time.
> 
> There is one client, a stable connection between client and server, and
> neither client or server are being rebooted.
> Are the "string in use by client" messages still expected?

Assuming the client creates and destroys clientid's on demand, as
they're needed for opens, and uses whatever user credential it has at
hand to do so, then I think a sequence of alternating opens and closes
as different users could produce this.

But no, it doesn't indicate any real problem on its own.

> Below is a program that attempts to open a file that is contained in a
> directory that has been deleted by another client.
> 
> I'm not sure these are conditions that are normally occuring, it's just
> something I encountered trying to reproduce the hang.
> 
> This reliably reproduces:
> Feb  7 09:55:01 devfile kernel: NFSD: preprocess_seqid_op: bad seqid
> (expected 20, got 22)

That's a bug though, either on the client or server side.

--b.

> 
> And about 1 in 10 times it also reproduces:
> Feb  7 09:55:01 devfile kernel: NFSD: setclientid: string in use by
> client(clientid 47a627bd/0000044b)
> 
> The server is 2.6.18-5 from debian.
> 
> ---
> 
> #include <string.h>
> #include <stdio.h>
> #include <unistd.h>
> #include <errno.h>
> #include <fcntl.h>
> #include <sys/stat.h>
> #include <stdlib.h>
> 
> #define ASSERT(x) \
>         if (!(x)) { fprintf(stderr, "%s:%i:assert:" #x "\n", __FILE__,
> __LINE__); abort(); }
> 
> #define testdir "/home/andrewd/testdir"
> #define testfile testdir "/fred"
> 
> int main(int argc, char *argv[])
> {
>         int fd;
>         int rv;
> 
>         rv = mkdir(testdir,0777);
>         ASSERT(rv == 0 || errno == EEXIST);
> 
>         fd = open(testfile, O_CREAT|O_WRONLY);
>         ASSERT(fd != -1);
>         rv = write(fd, "stuff\n", 6);
>         ASSERT(rv == 6);
>         close(fd);
> 
>         rv = access(testfile, 0);
>         ASSERT(rv == 0);
> 
>         // Remove directory via another client (nfsv3)
>         system("ssh devlin7 rm -r "testdir);
> 
>         // Try to open file
>         fd = open(testfile, O_RDONLY);
>         printf("got fd:%i errno:%i\n", fd, errno);
>         // fd == -1, errno = ENOENT
>         // This is expected, error on nfs server is not.
>         return 0;
> }
> 
> 

  parent reply	other threads:[~2008-02-06 21:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-05  9:01 (fwd) nfs hang on 2.6.24 maximilian attems
     [not found] ` <20080205090132.GA8286-U9r9yeDMy7A@public.gmane.org>
2008-02-05 22:02   ` Trond Myklebust
2008-02-06  6:24     ` Andrew Dixie
2008-02-06 15:00       ` Trond Myklebust
     [not found]         ` <1202310021.12647.6.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-02-06 15:07           ` J. Bruce Fields
2008-02-06 15:15             ` Trond Myklebust
     [not found]               ` <1202310924.12647.24.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-02-06 17:23                 ` J. Bruce Fields
2008-02-06 17:52                   ` Trond Myklebust
     [not found]                     ` <1202320337.14889.18.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-02-06 18:31                       ` J. Bruce Fields
2008-02-06 21:19                         ` Andrew Dixie
     [not found]                           ` <37673.203.167.214.129.1202332746.squirrel-pmwrj2wvkLORZ0GbGNPwb6VXKuFTiq87@public.gmane.org>
2008-02-06 21:45                             ` J. Bruce Fields [this message]
2008-02-06 22:40           ` Andrew Dixie
     [not found]             ` <55598.203.167.214.129.1202337638.squirrel-pmwrj2wvkLORZ0GbGNPwb6VXKuFTiq87@public.gmane.org>
2008-02-06 22:58               ` Trond Myklebust
     [not found]                 ` <1202338699.8549.42.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-02-08  0:05                   ` Andrew Dixie

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=20080206214508.GO5342@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=andrew-0FSrDVjkvKm9koe0gwxAeg@public.gmane.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=max-U9r9yeDMy7A@public.gmane.org \
    --cc=trond.myklebust@netapp.com \
    /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.