All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kinglong Mee <kinglongmee@gmail.com>
To: Christoph Hellwig <hch@lst.de>
Cc: "J. Bruce Fields" <bfields@fieldses.org>,
	Eric Sandeen <sandeen@sandeen.net>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	xfs@oss.sgi.com
Subject: Re: panic on 4.20 server exporting xfs filesystem
Date: Fri, 20 Mar 2015 12:06:18 +0800	[thread overview]
Message-ID: <CAB6yy341fvF8Bsg0_hViQm+zRLVdJ2WOE9duDwdU+S0CkOEpbg@mail.gmail.com> (raw)
In-Reply-To: <20150305131731.GA16235@lst.de>

On Thu, Mar 5, 2015 at 9:17 PM, Christoph Hellwig <hch@lst.de> wrote:
> On Wed, Mar 04, 2015 at 11:08:49PM -0500, J. Bruce Fields wrote:
>> Ah-hah:
>>
>>       static void
>>       nfsd4_cb_layout_fail(struct nfs4_layout_stateid *ls)
>>       {
>>               ...
>>               nfsd4_cb_layout_fail(ls);
>>
>> That'd do it!
>>
>> Haven't tried to figure out why exactly that's getting called, and why
>> only rarely.  Some intermittent problem with the callback path, I guess.
>>
>> Anyway, I think that solves most of the mystery....
>
> Ooops, that was a nasty git merge error in the last rebase, see the fix
> below.  But I really wonder if we need to make the usage of pnfs explicit
> after all, othterwise we'll always hand out layouts on any XFS-exported
> filesystems, which can't be used and will eventually need to be recalled.
>
> ---
> From ad592590cce9f7441c3cd21d030f3a986d8759d7 Mon Sep 17 00:00:00 2001
> From: Christoph Hellwig <hch@lst.de>
> Date: Thu, 5 Mar 2015 06:12:29 -0700
> Subject: nfsd: don't recursively call nfsd4_cb_layout_fail
>
> Due to a merge error when creating c5c707f9 ("nfsd: implement pNFS
> layout recalls"), we recursivelt call nfsd4_cb_layout_fail from itself,
> leading to stack overflows.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  fs/nfsd/nfs4layouts.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/fs/nfsd/nfs4layouts.c b/fs/nfsd/nfs4layouts.c
> index 3c1bfa1..1028a06 100644
> --- a/fs/nfsd/nfs4layouts.c
> +++ b/fs/nfsd/nfs4layouts.c
> @@ -587,8 +587,6 @@ nfsd4_cb_layout_fail(struct nfs4_layout_stateid *ls)
>
>         rpc_ntop((struct sockaddr *)&clp->cl_addr, addr_str, sizeof(addr_str));
>
> -       nfsd4_cb_layout_fail(ls);
> -

Maybe you want adding "trace_layout_recall_fail(&ls->ls_stid.sc_stateid);" here?
I think the following is better,

@@ -587,7 +587,7 @@ nfsd4_cb_layout_fail(struct nfs4_layout_stateid *ls)

        rpc_ntop((struct sockaddr *)&clp->cl_addr, addr_str, sizeof(addr_str));

-       nfsd4_cb_layout_fail(ls);
+       trace_layout_recall_fail(&ls->ls_stid.sc_stateid);

        printk(KERN_WARNING
                "nfsd: client %s failed to respond to layout recall. "

thanks,
Kinglong Mee

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

WARNING: multiple messages have this Message-ID (diff)
From: Kinglong Mee <kinglongmee@gmail.com>
To: Christoph Hellwig <hch@lst.de>
Cc: "J. Bruce Fields" <bfields@fieldses.org>,
	Dave Chinner <david@fromorbit.com>,
	Eric Sandeen <sandeen@sandeen.net>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	xfs@oss.sgi.com
Subject: Re: panic on 4.20 server exporting xfs filesystem
Date: Fri, 20 Mar 2015 12:06:18 +0800	[thread overview]
Message-ID: <CAB6yy341fvF8Bsg0_hViQm+zRLVdJ2WOE9duDwdU+S0CkOEpbg@mail.gmail.com> (raw)
In-Reply-To: <20150305131731.GA16235@lst.de>

On Thu, Mar 5, 2015 at 9:17 PM, Christoph Hellwig <hch@lst.de> wrote:
> On Wed, Mar 04, 2015 at 11:08:49PM -0500, J. Bruce Fields wrote:
>> Ah-hah:
>>
>>       static void
>>       nfsd4_cb_layout_fail(struct nfs4_layout_stateid *ls)
>>       {
>>               ...
>>               nfsd4_cb_layout_fail(ls);
>>
>> That'd do it!
>>
>> Haven't tried to figure out why exactly that's getting called, and why
>> only rarely.  Some intermittent problem with the callback path, I guess.
>>
>> Anyway, I think that solves most of the mystery....
>
> Ooops, that was a nasty git merge error in the last rebase, see the fix
> below.  But I really wonder if we need to make the usage of pnfs explicit
> after all, othterwise we'll always hand out layouts on any XFS-exported
> filesystems, which can't be used and will eventually need to be recalled.
>
> ---
> From ad592590cce9f7441c3cd21d030f3a986d8759d7 Mon Sep 17 00:00:00 2001
> From: Christoph Hellwig <hch@lst.de>
> Date: Thu, 5 Mar 2015 06:12:29 -0700
> Subject: nfsd: don't recursively call nfsd4_cb_layout_fail
>
> Due to a merge error when creating c5c707f9 ("nfsd: implement pNFS
> layout recalls"), we recursivelt call nfsd4_cb_layout_fail from itself,
> leading to stack overflows.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  fs/nfsd/nfs4layouts.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/fs/nfsd/nfs4layouts.c b/fs/nfsd/nfs4layouts.c
> index 3c1bfa1..1028a06 100644
> --- a/fs/nfsd/nfs4layouts.c
> +++ b/fs/nfsd/nfs4layouts.c
> @@ -587,8 +587,6 @@ nfsd4_cb_layout_fail(struct nfs4_layout_stateid *ls)
>
>         rpc_ntop((struct sockaddr *)&clp->cl_addr, addr_str, sizeof(addr_str));
>
> -       nfsd4_cb_layout_fail(ls);
> -

Maybe you want adding "trace_layout_recall_fail(&ls->ls_stid.sc_stateid);" here?
I think the following is better,

@@ -587,7 +587,7 @@ nfsd4_cb_layout_fail(struct nfs4_layout_stateid *ls)

        rpc_ntop((struct sockaddr *)&clp->cl_addr, addr_str, sizeof(addr_str));

-       nfsd4_cb_layout_fail(ls);
+       trace_layout_recall_fail(&ls->ls_stid.sc_stateid);

        printk(KERN_WARNING
                "nfsd: client %s failed to respond to layout recall. "

thanks,
Kinglong Mee

  parent reply	other threads:[~2015-03-20  4:06 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-03 22:10 panic on 4.20 server exporting xfs filesystem J. Bruce Fields
2015-03-03 22:10 ` J. Bruce Fields
2015-03-03 22:44 ` Dave Chinner
2015-03-03 22:44   ` Dave Chinner
2015-03-04  2:08   ` J. Bruce Fields
2015-03-04  2:08     ` J. Bruce Fields
2015-03-04  4:41     ` Dave Chinner
2015-03-04  4:41       ` Dave Chinner
2015-03-05 13:19       ` Christoph Hellwig
2015-03-05 13:19         ` Christoph Hellwig
2015-03-05 15:21         ` J. Bruce Fields
2015-03-05 15:21           ` J. Bruce Fields
2015-03-08 13:08         ` Tom Haynes
2015-03-08 13:08           ` Tom Haynes
2015-03-04 15:54     ` J. Bruce Fields
2015-03-04 15:54       ` J. Bruce Fields
2015-03-04 22:09       ` Dave Chinner
2015-03-04 22:09         ` Dave Chinner
2015-03-04 22:27         ` J. Bruce Fields
2015-03-04 22:27           ` J. Bruce Fields
2015-03-04 22:45           ` Dave Chinner
2015-03-04 22:45             ` Dave Chinner
2015-03-04 22:49             ` Eric Sandeen
2015-03-04 22:49               ` Eric Sandeen
2015-03-04 22:56               ` Dave Chinner
2015-03-04 22:56                 ` Dave Chinner
2015-03-05  4:08                 ` J. Bruce Fields
2015-03-05  4:08                   ` J. Bruce Fields
2015-03-05 13:17                   ` Christoph Hellwig
2015-03-05 13:17                     ` Christoph Hellwig
2015-03-05 15:01                     ` J. Bruce Fields
2015-03-05 15:01                       ` J. Bruce Fields
2015-03-05 17:02                       ` J. Bruce Fields
2015-03-05 17:02                         ` J. Bruce Fields
2015-03-05 20:47                         ` J. Bruce Fields
2015-03-05 20:47                           ` J. Bruce Fields
2015-03-05 20:59                           ` Dave Chinner
2015-03-05 20:59                             ` Dave Chinner
2015-03-06 20:47                             ` J. Bruce Fields
2015-03-06 20:47                               ` J. Bruce Fields
2015-03-19 17:27                               ` Christoph Hellwig
2015-03-19 17:27                                 ` Christoph Hellwig
2015-03-19 18:47                                 ` J. Bruce Fields
2015-03-19 18:47                                   ` J. Bruce Fields
2015-03-20  6:49                                   ` Christoph Hellwig
2015-03-20  6:49                                     ` Christoph Hellwig
2015-03-08 15:30                           ` Christoph Hellwig
2015-03-08 15:30                             ` Christoph Hellwig
2015-03-09 19:45                             ` J. Bruce Fields
2015-03-09 19:45                               ` J. Bruce Fields
2015-03-20  4:06                     ` Kinglong Mee [this message]
2015-03-20  4:06                       ` Kinglong Mee
2015-03-20  6:50                       ` Christoph Hellwig
2015-03-20  6:50                         ` Christoph Hellwig
2015-03-20  7:56                         ` [PATCH] NFSD: Fix infinite loop in nfsd4_cb_layout_fail() Kinglong Mee
2015-03-20  7:56                           ` Kinglong Mee
2015-03-15 12:58 ` panic on 4.20 server exporting xfs filesystem Christoph Hellwig
2015-03-15 12:58   ` Christoph Hellwig
2015-03-16 14:27   ` J. Bruce Fields
2015-03-16 14:27     ` J. Bruce Fields
2015-03-17 10:30     ` Christoph Hellwig
2015-03-17 10:30       ` Christoph Hellwig
2015-03-18 10:50     ` Christoph Hellwig
2015-03-18 10:50       ` Christoph Hellwig
2015-03-27 10:41 ` Christoph Hellwig
2015-03-27 14:50   ` Jeff Layton
2015-03-30 16:44     ` Christoph Hellwig
2015-03-27 15:13   ` J. Bruce Fields
2015-04-26 16:19   ` Christoph Hellwig

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=CAB6yy341fvF8Bsg0_hViQm+zRLVdJ2WOE9duDwdU+S0CkOEpbg@mail.gmail.com \
    --to=kinglongmee@gmail.com \
    --cc=bfields@fieldses.org \
    --cc=hch@lst.de \
    --cc=linux-nfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    --cc=xfs@oss.sgi.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.