public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@redhat.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 0/3] nfsd: fix error handling in write_ports interfaces
Date: Wed, 9 Jun 2010 06:43:43 -0400	[thread overview]
Message-ID: <20100609064343.1f448bf2@corrin.poochiereds.net> (raw)
In-Reply-To: <20100609000002.GL26435@fieldses.org>

On Tue, 8 Jun 2010 20:00:03 -0400
"J. Bruce Fields" <bfields@fieldses.org> wrote:

> On Mon, Jun 07, 2010 at 11:33:17AM -0400, Jeff Layton wrote:
> > This patchset fixes some problems with refcounting when there are
> > problems starting up nfsd. The easiest way to reproduce this is to have
> > rpcbind down and then try to start nfsd. The write_ports calls will
> > generally return failure at that point due to the fact that lockd can't
> > register its ports. That leaves the nfsd_serv pointer set, with the
> > sv_threads count set at 0. The first two patches fix this problem.
> 
> Does this look like it's always been a problem, or was it introduced by
> recent changes?
> 
> (Just a question of priority and whether it should be fixed in -stable
> branches too.)
> 

I think it's a long-standing bug -- at least since 2006 or so when the
portlist file was added, but some recent changes made it easier to hit.

Our QA group has a test where they restart both the nfs "service" and
rpcbind. With the recent change to using TCP to do rpcbind
registrations, the kernel now can hold open a socket to rpcbind for a
little while after doing the registration.

If you restart rpcbind within that window, it can fail to bind to port
111 as it didn't use SO_REUSEADDR. I recently proposed a patch to
rpcbind to fix that:

http://sourceforge.net/mailarchive/forum.php?thread_name=1275575657-9666-1-git-send-email-jlayton%40redhat.com&forum_name=libtirpc-devel

...portmap has a similar bug, but I haven't gotten around to fixing it
there yet.

Due to that problem, our QA group ended up trying to start nfsd with
rpcbind non-functional. When they got rpcbind to start, then they still
couldn't bring up nfsd immediately since nfsd_serv had already been
created and write_versions failed. 

IMO, this set probably isn't stable material. It's a nuisance, but the
simple workaround is to just run "rpc.nfsd 0" and then you can start up
nfsd.

-- 
Jeff Layton <jlayton@redhat.com>

  reply	other threads:[~2010-06-09 10:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-07 15:33 [PATCH 0/3] nfsd: fix error handling in write_ports interfaces Jeff Layton
2010-06-07 15:33 ` [PATCH 1/3] nfsd: don't try to shut down nfs4 state handling unless it's up Jeff Layton
2010-06-08 23:58   ` J. Bruce Fields
2010-06-09 10:29     ` Jeff Layton
     [not found]       ` <20100609062922.4bae21ac-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2010-06-09 18:09         ` J. Bruce Fields
2010-06-09 18:29           ` Jeff Layton
     [not found]             ` <20100609142943.60d31a11-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-06-13 20:28               ` J. Bruce Fields
2010-06-15 17:36                 ` Jeff Layton
     [not found]                   ` <20100615133622.10dad9f2-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2010-06-15 17:36                     ` J. Bruce Fields
2010-06-26 15:53   ` J. Bruce Fields
     [not found]     ` <20100626155351.GA16951-+qGSg9AQ1cLTsXDwO4sDpg@public.gmane.org>
2010-06-27  1:08       ` Jeff Layton
2010-06-07 15:33 ` [PATCH 2/3] nfsd: fix error handling when starting nfsd with rpcbind down Jeff Layton
2010-06-07 15:33 ` [PATCH 3/3] nfsd: fix error handling in __write_ports_addxprt Jeff Layton
2010-06-09  0:00 ` [PATCH 0/3] nfsd: fix error handling in write_ports interfaces J. Bruce Fields
2010-06-09 10:43   ` Jeff Layton [this message]
2010-06-09  0:49 ` J. Bruce Fields
2010-06-09 10:55   ` Jeff Layton

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=20100609064343.1f448bf2@corrin.poochiereds.net \
    --to=jlayton@redhat.com \
    --cc=bfields@fieldses.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