From: Christian Brauner <brauner@kernel.org>
To: Morten Hein Tiljeset <morten@tiljeset.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Debugging stuck mount
Date: Fri, 9 Aug 2024 14:41:52 +0200 [thread overview]
Message-ID: <20240809-marsch-kreis-1323acfac954@brauner> (raw)
In-Reply-To: <dc25520d-e068-49bd-9faa-07c6f6928c35@app.fastmail.com>
On Fri, Aug 09, 2024 at 09:39:41AM GMT, Morten Hein Tiljeset wrote:
> > The file descriptor could already be closed but the task could be stuck
> > exiting and so queued task work including destroying files wouldn't be
> > done yet. You could also try and see if you can figure out what tasks
> > require your workload to do a lazy umount in the first place. That might
> > bring you closer to the root cause.
> >
> > What kernel version are you running anyway?
> That's an interesting idea about the stuck task, I'll try looking into that. We're not
> doing lazy unmounts on purpose -- I'm only concluding that it must be happening based on
> the mount namespace being NULL. I wonder if the lazy unmount could happen implicitly
> as a consequence of some other operation?
You don't need a lazy umount for this. You could also just have a
container or service exiting that uses a mount namespace. In that case
the last exiting task will close all of its open files and then put the
mount namespace. The mount namespace will unmount all mounts that were
still around NULLing the mntns.
Say P1 has somehow managed to get hold of a file descriptor in some
other mount namespace M1 and holds a file descriptor referring to some
mount in there. Now the last process pinning M1 exists and puts all
mounts associated with M1. Now P1 holds a file descriptor pointing to a
mount that has a NULL mount namespace.
A task could hang running task work because of some device file or
whatever that it's closing. Or it could hang exiting namespaces. I
vaguely remember that years ago on earlier kernels we had some issues
there.
prev parent reply other threads:[~2024-08-09 12:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-08 9:40 Debugging stuck mount Morten Hein Tiljeset
2024-08-08 12:32 ` Christian Brauner
2024-08-08 14:20 ` Morten Hein Tiljeset
2024-08-08 14:58 ` Christian Brauner
2024-08-09 7:39 ` Morten Hein Tiljeset
2024-08-09 12:41 ` Christian Brauner [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=20240809-marsch-kreis-1323acfac954@brauner \
--to=brauner@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=morten@tiljeset.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