From: Trond Myklebust <trondmy@kernel.org>
To: Wang Yugui <wangyugui@e16-tech.com>,
Trond Myklebust <trondmy@hammerspace.com>
Cc: Charles Edward Lever <chuck.lever@oracle.com>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: a dead lock of 'umount.nfs4 /nfs/scratch -l'
Date: Fri, 13 Jan 2023 12:29:13 -0500 [thread overview]
Message-ID: <4dcdb8161d2590527610a18c92c9f64329709f8d.camel@kernel.org> (raw)
In-Reply-To: <20230114010628.D465.409509F4@e16-tech.com>
On Sat, 2023-01-14 at 01:06 +0800, Wang Yugui wrote:
> Hi,
>
> >
> > > On Jan 13, 2023, at 09:41, Chuck Lever III
> > > <chuck.lever@oracle.com> wrote:
> > >
> > >
> > >
> > > > On Jan 12, 2023, at 4:30 AM, Wang Yugui
> > > > <wangyugui@e16-tech.com> wrote:
> > > >
> > > > Hi,
> > > >
> > > > > Hi,
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > We noticed a dead lock of 'umount.nfs4 /nfs/scratch -l'
> > > > >
> > > > > reproducer:
> > > > >
> > > > > mount /dev/sda1 /mnt/test/
> > > > > mount /dev/sda2 /mnt/scratch/
> > > > > systemctl restart nfs-server.service
> > > > > mount.nfs4 127.0.0.1:/mnt/test/ /nfs/test/
> > > > > mount.nfs4 127.0.0.1:/mnt/scratch/ /nfs/scratch/
> > > > > systemctl stop nfs-server.service
> > > > > umount -l /nfs/scratch #OK
> > > > > umount -l /nfs/test #dead lock
> > > > >
> > > > > Best Regards
> > > > > Wang Yugui (wangyugui@e16-tech.com)
> > > > > 2023/01/11
> > > > >
> > > > > > kernel: 6.1.5-rc1
> > > >
> > > > This problem happen on kernel 6.2.0-rc3+(upstream) too.
> > >
> > > Can you clarify:
> > >
> > > - By "deadlock" do you mean the system becomes unresponsive, or
> > > that
> > > just the mount is stuck?
> > >
> > > - Can you reproduce in a non-loopback scenario: a separate client
> > > and
> > > server?
> > >
> >
> > I’m not seeing how the use of the ‘-l’ flag is at all relevant
> > here. The exact same thing will happen if you don’t use ‘-l’. All
> > the latter does is hide the fact that it is happening from user
> > space.
> >
> > As far as I’m concerned, this is pretty much expected behaviour
> > when you turn off the server before unmounting. It means that the
> > client can’t flush any remaining dirty data to the server and it
> > can’t clean up state. So just don’t do that?
>
> In the case, 'df -h' will fail to work without the 'umount -l'.
>
> so I thought we should make 'umount -l' to works.
>
The NFS filesystem doesn't know or care about the flags you use to call
the umount() system call. That's all handled by the VFS.
All NFS knows is that the VFS told it to clean up the super block
because it is no longer in use.
The calls to nfs4_proc_destroy_session() and nfs4_destroy_clientid()
will both eventually time out and allow the unmount to complete. So it
is not as if this is a permanent hang that forces you to reboot.
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com
next prev parent reply other threads:[~2023-01-13 17:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-11 8:59 a dead lock of 'umount.nfs4 /nfs/scratch -l' Wang Yugui
2023-01-11 9:35 ` Wang Yugui
2023-01-12 9:30 ` Wang Yugui
2023-01-13 14:41 ` Chuck Lever III
2023-01-13 15:37 ` Trond Myklebust
2023-01-13 17:06 ` Wang Yugui
2023-01-13 17:29 ` Trond Myklebust [this message]
2023-01-13 17:00 ` Wang Yugui
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=4dcdb8161d2590527610a18c92c9f64329709f8d.camel@kernel.org \
--to=trondmy@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trondmy@hammerspace.com \
--cc=wangyugui@e16-tech.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox