mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: "Mickaël Salaün" <mic@digikod.net>
Cc: "Christian Brauner" <brauner@kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Kees Cook" <keescook@chromium.org>,
	"Linus Torvalds" <torvalds@linux-foundation.org>,
	"Sasha Levin" <sashal@kernel.org>,
	"Sean Christopherson" <seanjc@google.com>,
	"Shengyu Li" <shengyu.li.evgeny@gmail.com>,
	"Shuah Khan" <shuah@kernel.org>,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	"Bagas Sanjaya" <bagasdotme@gmail.com>,
	"Brendan Higgins" <brendanhiggins@google.com>,
	"David Gow" <davidgow@google.com>,
	"David S . Miller" <davem@davemloft.net>,
	"Florian Fainelli" <florian.fainelli@broadcom.com>,
	"Günther Noack" <gnoack@google.com>,
	"Jon Hunter" <jonathanh@nvidia.com>, "Ron Economos" <re@w6rz.net>,
	"Ronald Warsow" <rwarsow@gmx.de>,
	"Stephen Rothwell" <sfr@canb.auug.org.au>,
	"Will Drewry" <wad@chromium.org>,
	"kernel test robot" <oliver.sang@intel.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org, netdev@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH v7 04/10] selftests/harness: Fix interleaved scheduling leading to race conditions
Date: Mon, 27 May 2024 20:07:31 +0100	[thread overview]
Message-ID: <9341d4db-5e21-418c-bf9e-9ae2da7877e1@sirena.org.uk> (raw)
In-Reply-To: <20240511171445.904356-5-mic@digikod.net>

[-- Attachment #1: Type: text/plain, Size: 4628 bytes --]

On Sat, May 11, 2024 at 07:14:39PM +0200, Mickaël Salaün wrote:

> Fix a race condition when running several FIXTURE_TEARDOWN() managing
> the same resource.  This fixes a race condition in the Landlock file
> system tests when creating or unmounting the same directory.

> Using clone3() with CLONE_VFORK guarantees that the child and grandchild
> test processes are sequentially scheduled.  This is implemented with a
> new clone3_vfork() helper replacing the fork() call.

This is now in mainline and appears to be causing several tests (at
least the ptrace vmaccess global_attach test on arm64, possibly also
some of the epoll tests) that previously were timed out by the harness
to to hang instead.  A bisect seems to point at this patch in
particular, there was a bunch of discussion of the fallout of these
patches but I'm afraid I lost track of it, is there something in flight
for this?  -next is affected as well from the looks of it.

Log of the ptrace issue (not that it's useful, the job just gets killed
by the test runner):

   https://lava.sirena.org.uk/scheduler/job/307984

Bisect log:

git bisect start
# status: waiting for both good and bad commits
# good: [e8f897f4afef0031fe618a8e94127a0934896aba] Linux 6.8
git bisect good e8f897f4afef0031fe618a8e94127a0934896aba
# status: waiting for bad commit, 1 good commit known
# bad: [a38297e3fb012ddfa7ce0321a7e5a8daeb1872b6] Linux 6.9
git bisect bad a38297e3fb012ddfa7ce0321a7e5a8daeb1872b6
# good: [480e035fc4c714fb5536e64ab9db04fedc89e910] Merge tag 'drm-next-2024-03-13' of https://gitlab.freedesktop.org/drm/kernel
git bisect good 480e035fc4c714fb5536e64ab9db04fedc89e910
# good: [2ac2b1665d3fbec6ca709dd6ef3ea05f4a51ee4c] Merge tag 'hwlock-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux
git bisect good 2ac2b1665d3fbec6ca709dd6ef3ea05f4a51ee4c
# good: [e858beeddfa3a400844c0e22d2118b3b52f1ea5e] bcachefs: If we run merges at a lower watermark, they must be nonblocking
git bisect good e858beeddfa3a400844c0e22d2118b3b52f1ea5e
# good: [e43afae4a335ac0bf54c7a8f23ed65dd55449649] Merge tag 'powerpc-6.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
git bisect good e43afae4a335ac0bf54c7a8f23ed65dd55449649
# good: [09e10499ee6a5a89fc352f25881276398a49596a] Merge tag 'drm-misc-fixes-2024-05-02' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes
git bisect good 09e10499ee6a5a89fc352f25881276398a49596a
# good: [3c15237018eb8a9a56bb49a5dbf4d8eeb154b5cc] Merge tag 'usb-6.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
git bisect good 3c15237018eb8a9a56bb49a5dbf4d8eeb154b5cc
# good: [62788b0f225da1837ad38101112e2c49123470ee] Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux
git bisect good 62788b0f225da1837ad38101112e2c49123470ee
# good: [ed44935c330a2633440e8d2660db3c7538eeaf10] Merge tag 'spi-fix-v6.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
git bisect good ed44935c330a2633440e8d2660db3c7538eeaf10
# good: [c22c3e0753807feee1391a22228b0d5e6ba39b74] Merge tag 'mm-hotfixes-stable-2024-05-10-13-14' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
git bisect good c22c3e0753807feee1391a22228b0d5e6ba39b74
# good: [b61821bb32c5577272408e1b05e6a0879a64257f] Merge tag 'drm-misc-fixes-2024-05-10' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes
git bisect good b61821bb32c5577272408e1b05e6a0879a64257f
# bad: [323feb3bdb67649bfa5614eb24ec9cb92a60cf33] selftests/harness: Handle TEST_F()'s explicit exit codes
git bisect bad 323feb3bdb67649bfa5614eb24ec9cb92a60cf33
# bad: [323feb3bdb67649bfa5614eb24ec9cb92a60cf33] selftests/harness: Handle TEST_F()'s explicit exit codes
git bisect bad 323feb3bdb67649bfa5614eb24ec9cb92a60cf33
# bad: [3656bc23429a4d539c81b5cb8f17ceeeeca8901a] selftests/landlock: Do not allocate memory in fixture data
git bisect bad 3656bc23429a4d539c81b5cb8f17ceeeeca8901a
# good: [7e4042abe2ee7c0977fd8bb049a6991b174a5e6f] selftests/landlock: Fix FS tests when run on a private mount point
git bisect good 7e4042abe2ee7c0977fd8bb049a6991b174a5e6f
# bad: [a86f18903db9211e265cc130b61adb175b7a4c42] selftests/harness: Fix interleaved scheduling leading to race conditions
git bisect bad a86f18903db9211e265cc130b61adb175b7a4c42
# good: [fff37bd32c7605d93bf900c4c318d56d12000048] selftests/harness: Fix fixture teardown
git bisect good fff37bd32c7605d93bf900c4c318d56d12000048
# first bad commit: [a86f18903db9211e265cc130b61adb175b7a4c42] selftests/harness: Fix interleaved scheduling leading to race conditions

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2024-05-27 19:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-11 17:14 [PATCH v7 00/10] Fix Kselftest's vfork() side effects Mickaël Salaün
2024-05-11 17:14 ` [PATCH v7 01/10] selftests/pidfd: Fix config for pidfd_setns_test Mickaël Salaün
2024-05-11 17:14 ` [PATCH v7 02/10] selftests/landlock: Fix FS tests when run on a private mount point Mickaël Salaün
2024-05-11 17:14 ` [PATCH v7 03/10] selftests/harness: Fix fixture teardown Mickaël Salaün
2024-05-11 17:14 ` [PATCH v7 04/10] selftests/harness: Fix interleaved scheduling leading to race conditions Mickaël Salaün
2024-05-27 19:07   ` Mark Brown [this message]
2024-06-03 16:27     ` Mark Brown
2024-06-03 17:22       ` Mark Brown
2024-06-04 16:06         ` Mickaël Salaün
2024-06-04 16:18           ` Mark Brown
2024-05-11 17:14 ` [PATCH v7 05/10] selftests/landlock: Do not allocate memory in fixture data Mickaël Salaün
2024-05-11 17:14 ` [PATCH v7 06/10] selftests/harness: Constify fixture variants Mickaël Salaün
2024-05-11 17:14 ` [PATCH v7 07/10] selftests/pidfd: Fix wrong expectation Mickaël Salaün
2024-05-11 17:14 ` [PATCH v7 08/10] selftests/harness: Share _metadata between forked processes Mickaël Salaün
2024-05-11 17:14 ` [PATCH v7 09/10] selftests/harness: Fix vfork() side effects Mickaël Salaün
2024-05-11 17:14 ` [PATCH v7 10/10] selftests/harness: Handle TEST_F()'s explicit exit codes Mickaël Salaün

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=9341d4db-5e21-418c-bf9e-9ae2da7877e1@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=bagasdotme@gmail.com \
    --cc=brauner@kernel.org \
    --cc=brendanhiggins@google.com \
    --cc=davem@davemloft.net \
    --cc=davidgow@google.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=gnoack@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jonathanh@nvidia.com \
    --cc=keescook@chromium.org \
    --cc=kuba@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mic@digikod.net \
    --cc=netdev@vger.kernel.org \
    --cc=oliver.sang@intel.com \
    --cc=re@w6rz.net \
    --cc=rwarsow@gmx.de \
    --cc=sashal@kernel.org \
    --cc=seanjc@google.com \
    --cc=sfr@canb.auug.org.au \
    --cc=shengyu.li.evgeny@gmail.com \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=wad@chromium.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

all inboxes | Powered by JetHome®