linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@hammerspace.com>
To: "adp@prgmr.com" <adp@prgmr.com>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: User process NFS write hang followed by automount hang requiring reboot
Date: Tue, 21 May 2019 15:46:03 +0000	[thread overview]
Message-ID: <c10084e889df77fc2b6a6c9a04b232faae3a80bc.camel@hammerspace.com> (raw)
In-Reply-To: <20190520223324.GL4158@turtle.email>

On Mon, 2019-05-20 at 16:33 -0600, Alan Post wrote:
> I'm working on a compute cluster with approximately 300 NFS
> client machines running Linux 4.19.28[1].  These machines accept
> user submitted jobs which access exported filesystems from
> approximately a dozen NFS servers mostly running Linux 4.4.0 but
> a couple running 4.19.28.  In all cases we mount with nfsvers=4.
> 
> From time to time one of these user submitted jobs hangs in
> uninterruptible sleep (D state) while performing a write to one or
> more of these NFS servers, and never complete.  Once this happens
> calls to sync will themselves hang in uninterruptible sleep.
> Eventually the same thing happens to automount/mount.nfs and by
> that point the host is completely irrecoverable.
> 
> The problem is more common on our NFS clients when they’re
> communicating with an NFS server running 4.19.28, but is not
> unique to that NFS server kernel version.
> 
> A representative sample of stack traces from hung user-submitted
> processes (jobs).  The first here is quite a lot more common than
> the later two:
> 
>     $ sudo cat /proc/197520/stack
>     [<0>] io_schedule+0x12/0x40
>     [<0>] nfs_lock_and_join_requests+0x309/0x4c0 [nfs]
>     [<0>] nfs_updatepage+0x2a2/0x8b0 [nfs]
>     [<0>] nfs_write_end+0x63/0x4c0 [nfs]
>     [<0>] generic_perform_write+0x138/0x1b0
>     [<0>] nfs_file_write+0xdc/0x200 [nfs]
>     [<0>] new_sync_write+0xfb/0x160
>     [<0>] vfs_write+0xa5/0x1a0
>     [<0>] ksys_write+0x4f/0xb0
>     [<0>] do_syscall_64+0x53/0x100
>     [<0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
>     [<0>] 0xffffffffffffffff
> 

Have you tried upgrading to 4.19.44? There is a fix that went in not
too long ago that deals with a request leak that can cause stack traces
like the above that wait forever.

By the way, the above stack trace with "nfs_lock_and_join_requests"
usually means that you are using a very small rsize or wsize (less than
4k). Is that the case? If so, you might want to look into just
increasing the I/O size.

-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com



  reply	other threads:[~2019-05-21 15:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-20 22:33 User process NFS write hang followed by automount hang requiring reboot Alan Post
2019-05-21 15:46 ` Trond Myklebust [this message]
2019-05-21 19:22   ` Alan Post
2019-05-30 18:39     ` J. Bruce Fields
2019-05-31  0:22       ` Alan Post
2019-05-24 17:31   ` Alan Post
2019-05-24 19:19     ` Trond Myklebust
2019-05-30  0:41     ` Alan Post
2019-05-30  1:09       ` Trond Myklebust
2019-06-04 17:44       ` Alan Post

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=c10084e889df77fc2b6a6c9a04b232faae3a80bc.camel@hammerspace.com \
    --to=trondmy@hammerspace.com \
    --cc=adp@prgmr.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).