From: "Michal Koutný" <mkoutny@suse.com>
To: Waiman Long <longman@redhat.com>
Cc: Tejun Heo <tj@kernel.org>, Johannes Weiner <hannes@cmpxchg.org>,
Shuah Khan <shuah@kernel.org>,
cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v2] selftests/cgroup: Fix intermittent test_cgfreezer_ptrace test failures
Date: Wed, 15 Jul 2026 11:36:34 +0200 [thread overview]
Message-ID: <aldSsQAboD6g2Sso@localhost.localdomain> (raw)
In-Reply-To: <20260715035446.565625-1-longman@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1282 bytes --]
Hi.
On Tue, Jul 14, 2026 at 11:54:46PM -0400, Waiman Long <longman@redhat.com> wrote:
> It is found that the test_cgfreezer_ptrace test of test_freezer can
> intermittently fail on some architectures like arm64 and ppc64.
>
> After further tracing of the mechanics of the test_cgfreezer_ptrace test,
> it is found that the ptrace(PTRACE_DETACH) call will spawn another process
> to perform the detach
I'm reading kernel/ptrace.c and cannot find a new task creation.
I'm curious what is this "another process"?
(Or is it referring to the child_fn() process from
test_cgfreezer_ptrace()? Then I'm suspicous about the transitional
unfreezing of it after PTRACE_DETACH. Wasn't it rightful expectation of
the test that the cgroup remains contiguously frozen?)
> by temporarily unfreezes the cgroup and then freezes
> it again afterward during the detaching process. The reading of the
> frozen flag from cgroup.events is done by the main test_freezer process
> running probably on a different CPU. As a result, racing is possible and
> the intermediate unfrozen state can be read leading to occasional test
> failures especially on architectures with a weak memory model like arm64.
What state would the task be in during this window?
Thanks,
Michal
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 265 bytes --]
next prev parent reply other threads:[~2026-07-15 9:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-15 3:54 [PATCH v2] selftests/cgroup: Fix intermittent test_cgfreezer_ptrace test failures Waiman Long
2026-07-15 9:36 ` Michal Koutný [this message]
2026-07-15 15:47 ` Waiman Long
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=aldSsQAboD6g2Sso@localhost.localdomain \
--to=mkoutny@suse.com \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=longman@redhat.com \
--cc=shuah@kernel.org \
--cc=tj@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.