From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: zlang@redhat.com, fstests@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 06/34] common/rc: revert recursive unmount in _clear_mount_stack
Date: Wed, 5 Feb 2025 11:07:26 +1100 [thread overview]
Message-ID: <Z6KrvoW3kgLJeZuP@dread.disaster.area> (raw)
In-Reply-To: <173870406199.546134.3521494633346683975.stgit@frogsfrogsfrogs>
On Tue, Feb 04, 2025 at 01:23:51PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Zorro complained about the following regression in generic/589 that I
> can't reproduce here on Debian 12:
....
> > Orignal _clear_mount_stack trys to umount all of them. But Dave gave -R option to
> > umount command, so
> > `umount -R /mnt/test/589-dst/201227_mpC` and `umount -R /mnt/test/589-src/201227_mpA`
> > already umount /mnt/test/589-dst and /mnt/test/589-src. recursively.
> > Then `umount -R /mnt/test/589-dst` shows "not mounted".
>
> I /think/ this is a result of commit 4c6bc4565105e6 performing this
> "conversion" in _clear_mount_stack:
>
> - $UMOUNT_PROG $MOUNTED_POINT_STACK
> + _unmount -R $MOUNTED_POINT_STACK
>
> This is not a 1:1 conversion here -- previously there was no
> -R(ecursive) unmount option, and now there is. It looks as though
> umount parses /proc/self/mountinfo to figure out what to unmount, and
> maybe on Zorro's system it balks if the argument passed is not present
> in that file? Debian 12's umount doesn't care.
Ah, I think I added that whilst trying to work out the weird
shenanigans that the mount namespace cloning that these tests did
caused. It was cloning a shared mount namespace that many tests
interacted and so any changes to the mount namespace inside that
test were visible everywhere.
If two of these mount namespace tests ran at the same time, they
stepped on each other and they failed to unmount their own stack
cleanly because of "mount busy at unmount" errors. This would then
cascade into other test failures because the test/scratch devices
couldn't be unmounted.
The fix I came up with was to run a recursive unmount for the stack,
which seemed to clear all the mounts the test made regardless of
whatever other test could see them. It didn't through any errors on
my test machines (debian unstable) so I promptly forgot about it.
> Regardless, there was no justification for this change in behavior that
> was buried in what is otherwise a hoist patch, so revert it. The author
> can resubmit the change with proper documentation.
I suspect that changes made later on (i.e. private mount namespaces
per runner instance) fixed the underlying namespace interaction
problem and made the recursive unmount unnecessary. The lack of
errors from it meant I likely forgot about it before I posted the
initial RFC that was merged...
>
> Cc: <fstests@vger.kernel.org> # v2024.12.08
> Fixes: 4c6bc4565105e6 ("fstests: clean up mount and unmount operations")
> Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
> ---
> common/rc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
> diff --git a/common/rc b/common/rc
> index 4658e3b8be747f..07646927bad523 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -334,7 +334,7 @@ _put_mount()
> _clear_mount_stack()
> {
> if [ -n "$MOUNTED_POINT_STACK" ]; then
> - _unmount -R $MOUNTED_POINT_STACK
> + _unmount $MOUNTED_POINT_STACK
> fi
> MOUNTED_POINT_STACK=""
> }
<tests>
That doesn't appear to cause any problems on my current
check-parallel stack, so I think the above explains how it got
there.
Reviewed-by: Dave Chinner <dchinner@redhat.com>
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2025-02-05 0:07 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-04 21:22 [PATCHSET v2] fstests: random fixes for v2025.02.02 Darrick J. Wong
2025-02-04 21:22 ` [PATCH 01/34] generic/476: fix fsstress process management Darrick J. Wong
2025-02-04 21:22 ` [PATCH 02/34] metadump: make non-local function variables more obvious Darrick J. Wong
2025-02-04 21:23 ` [PATCH 03/34] metadump: fix cleanup for v1 metadump testing Darrick J. Wong
2025-02-04 21:23 ` [PATCH 04/34] generic/019: don't fail if fio crashes while shutting down Darrick J. Wong
2025-02-04 21:23 ` [PATCH 05/34] fuzzy: do not set _FSSTRESS_PID when exercising fsx Darrick J. Wong
2025-02-04 21:23 ` [PATCH 06/34] common/rc: revert recursive unmount in _clear_mount_stack Darrick J. Wong
2025-02-05 0:07 ` Dave Chinner [this message]
2025-02-04 21:24 ` [PATCH 07/34] common/dump: don't replace pids arbitrarily Darrick J. Wong
2025-02-05 0:09 ` Dave Chinner
2025-02-04 21:24 ` [PATCH 08/34] common/populate: correct the parent pointer name creation formulae Darrick J. Wong
2025-02-04 21:24 ` [PATCH 09/34] generic/759,760: fix MADV_COLLAPSE detection and inclusion Darrick J. Wong
2025-02-04 21:24 ` [PATCH 10/34] generic/759,760: skip test if we can't set up a hugepage for IO Darrick J. Wong
2025-02-05 18:06 ` Darrick J. Wong
2025-02-04 21:25 ` [PATCH 11/34] common/rc: create a wrapper for the su command Darrick J. Wong
2025-02-05 0:14 ` Dave Chinner
2025-02-04 21:25 ` [PATCH 12/34] fuzzy: kill subprocesses with SIGPIPE, not SIGINT Darrick J. Wong
2025-02-05 0:16 ` Dave Chinner
2025-02-05 17:38 ` Darrick J. Wong
2025-02-04 21:25 ` [PATCH 13/34] common/rc: hoist pkill to a helper function Darrick J. Wong
2025-02-05 0:17 ` Dave Chinner
2025-02-04 21:25 ` [PATCH 14/34] common: fix pkill by running test program in a separate session Darrick J. Wong
2025-02-05 0:23 ` Dave Chinner
2025-02-05 17:43 ` Darrick J. Wong
2025-02-04 21:26 ` [PATCH 15/34] check: run tests in a private pid/mount namespace Darrick J. Wong
2025-02-05 0:37 ` Dave Chinner
2025-02-05 18:00 ` Darrick J. Wong
2025-02-05 18:19 ` Darrick J. Wong
2025-02-05 21:15 ` Dave Chinner
2025-02-05 21:25 ` Darrick J. Wong
2025-02-05 21:13 ` Dave Chinner
2025-02-04 21:26 ` [PATCH 16/34] check: deprecate using process sessions to isolate test instances Darrick J. Wong
2025-02-05 0:38 ` Dave Chinner
2025-02-04 21:26 ` [PATCH 17/34] common/rc: don't copy fsstress to $TEST_DIR Darrick J. Wong
2025-02-04 21:27 ` [PATCH 18/34] unmount: resume logging of stdout and stderr for filtering Darrick J. Wong
2025-02-04 21:27 ` [PATCH 19/34] mkfs: don't hardcode log size Darrick J. Wong
2025-02-05 0:40 ` Dave Chinner
2025-02-04 21:27 ` [PATCH 20/34] common/rc: return mount_ret in _try_scratch_mount Darrick J. Wong
2025-02-05 0:42 ` Dave Chinner
2025-02-05 18:03 ` Darrick J. Wong
2025-02-04 21:27 ` [PATCH 21/34] preamble: fix missing _kill_fsstress Darrick J. Wong
2025-02-04 21:28 ` [PATCH 22/34] generic/650: revert SOAK DURATION changes Darrick J. Wong
2025-02-05 0:43 ` Dave Chinner
2025-02-04 21:28 ` [PATCH 23/34] generic/032: fix pinned mount failure Darrick J. Wong
2025-02-04 21:28 ` [PATCH 24/34] fuzzy: stop __stress_scrub_fsx_loop if fsx fails Darrick J. Wong
2025-02-05 0:44 ` Dave Chinner
2025-02-04 21:28 ` [PATCH 25/34] fuzzy: don't use readarray for xfsfind output Darrick J. Wong
2025-02-04 21:29 ` [PATCH 26/34] fuzzy: always stop the scrub fsstress loop on error Darrick J. Wong
2025-02-05 0:45 ` Dave Chinner
2025-02-04 21:29 ` [PATCH 27/34] fuzzy: port fsx and fsstress loop to use --duration Darrick J. Wong
2025-02-05 0:50 ` Dave Chinner
2025-02-05 18:08 ` Darrick J. Wong
2025-02-04 21:29 ` [PATCH 28/34] fix _require_scratch_duperemove ordering Darrick J. Wong
2025-02-05 0:51 ` Dave Chinner
2025-02-04 21:29 ` [PATCH 29/34] fsstress: fix a memory leak Darrick J. Wong
2025-02-05 0:54 ` Dave Chinner
2025-02-04 21:30 ` [PATCH 30/34] fsx: fix leaked log file pointer Darrick J. Wong
2025-02-05 0:57 ` Dave Chinner
2025-02-04 21:30 ` [PATCH 31/34] misc: don't put nr_cpus into the fsstress -n argument Darrick J. Wong
2025-02-05 1:00 ` Dave Chinner
2025-02-04 21:30 ` [PATCH 32/34] common/config: add $here to FSSTRESS_PROG Darrick J. Wong
2025-02-05 1:00 ` Dave Chinner
2025-02-04 21:30 ` [PATCH 33/34] config: add FSX_PROG variable Darrick J. Wong
2025-02-05 1:04 ` Dave Chinner
2025-02-04 21:31 ` [PATCH 34/34] build: initialize stack variables to zero by default Darrick J. Wong
2025-02-05 1:05 ` Dave Chinner
2025-02-05 12:46 ` [PATCHSET v2] fstests: random fixes for v2025.02.02 Amir Goldstein
-- strict thread matches above, loose matches on Subject: below --
2025-02-12 3:30 [PATCHSET v3] " Darrick J. Wong
2025-02-12 3:32 ` [PATCH 06/34] common/rc: revert recursive unmount in _clear_mount_stack Darrick J. Wong
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=Z6KrvoW3kgLJeZuP@dread.disaster.area \
--to=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=zlang@redhat.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