From: Trond Myklebust <trondmy@hammerspace.com>
To: "bfields@redhat.com" <bfields@redhat.com>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH v2] nfsd: Don't release the callback slot unless it was actually held
Date: Mon, 8 Apr 2019 18:07:42 +0000 [thread overview]
Message-ID: <8b39dd2556fe80970d1c43fa2225a6345f6b849c.camel@hammerspace.com> (raw)
In-Reply-To: <20190408164109.GA18799@parsley.fieldses.org>
On Mon, 2019-04-08 at 12:41 -0400, J. Bruce Fields wrote:
> On Mon, Apr 08, 2019 at 03:20:48PM +0000, Trond Myklebust wrote:
> > On Fri, 2019-04-05 at 08:54 -0700, Trond Myklebust wrote:
> > > If there are multiple callbacks queued, waiting for the callback
> > > slot when the callback gets shut down, then they all currently
> > > end up acting as if they hold the slot, and call
> > > nfsd4_cb_sequence_done() resulting in interesting side-effects.
> > >
> > > In addition, the 'retry_nowait' path in nfsd4_cb_sequence_done()
> > > causes a loop back to nfsd4_cb_prepare() without first freeing
> > > the
> > > slot, which causes a deadlock when nfsd41_cb_get_slot() gets
> > > called
> > > a second time.
> > >
> > > This patch therefore adds a boolean to track whether or not the
> > > callback did pick up the slot, so that it can do the right thing
> > > in these 2 cases.
> > >
> > > Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
> > > ---
> > > v2: try to restart the callback if we hit
> > > nfsd4_cb_sequence_done()
> > > without a slot.
> > >
> > >
> >
> > Hi Bruce,
> >
> > Should this patch perhaps be considered for stable? The callback
> > slot
> > leak is permanent (or at least for the lifetime of the
> > nfs4_client).
>
> Makes sense to me; I'll queue it up for 5.1 and stable.
>
> What were the original symptoms that prompted this?
>
We were using the NFSv4.2 client for doing CLONE against a knfsd
server, and eventually ended up with a bunch of CB_RECALL requests that
were seen hanging forever on the server.
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com
prev parent reply other threads:[~2019-04-08 18:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-05 15:54 [PATCH v2] nfsd: Don't release the callback slot unless it was actually held Trond Myklebust
2019-04-08 15:20 ` Trond Myklebust
2019-04-08 16:41 ` J. Bruce Fields
2019-04-08 18:07 ` Trond Myklebust [this message]
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=8b39dd2556fe80970d1c43fa2225a6345f6b849c.camel@hammerspace.com \
--to=trondmy@hammerspace.com \
--cc=bfields@redhat.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