From: Yuwen Chen <ywen.chen@foxmail.com>
To: akpm@linux-foundation.org
Cc: andrealmeid@igalia.com, bigeasy@linutronix.de,
colin.i.king@gmail.com, dave@stgolabs.net, dvhart@infradead.org,
edliaw@google.com, justinstitt@google.com,
kernel-team@android.com, licayy@foxmail.com,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
luto@mit.edu, mingo@redhat.com, morbo@google.com,
nathan@kernel.org, ndesaulniers@google.com, peterz@infradead.org,
shuah@kernel.org, tglx@kernel.org, usama.anjum@collabora.com,
wakel@google.com, ywen.chen@foxmail.com
Subject: Re: [RESEND PATCH v3] selftests/futex: fix the failed futex_requeue test issue
Date: Wed, 6 May 2026 11:35:27 +0800 [thread overview]
Message-ID: <tencent_86DB55E71C2B0FEC8BAB8BA6C88E9B679C05@qq.com> (raw)
In-Reply-To: <20260430164127.b8d68639a5c1708411cf7508@linux-foundation.org>
on Thu, 30 Apr 2026 16:41:27 -0700, Andrew Morton wrote:
> So you're saying that this test is generally flakey and annoying?
Yes, this test item fails occasionally on the Android platform.
The following are some responses to the code review of AI :
> Does this leak the pthread_barrier_t resource? Since pthread_barrier_init()
> is called to synchronize the newly created thread, should there be a matching
> pthread_barrier_destroy() after the threads successfully rendezvous?
Yes, the resource was not reclaimed by calling pthread_barrier_destroy here,
and this issue has been resolved in the latest version.
> If thread creation fails, EXPECT_EQ logs a failure but permits the test
> execution to continue. This leaves the thread ID as 0, which would cause
> subsequent functions to operate on uninitialized state. Could this lead to
> cascading failures instead of safely halting the test, and should it remain
> an ASSERT_EQ?
Yes, this is a problem. It has also been resolved in the latest version.
> Is it safe to ignore the return value of futex_wait_for_thread() here?
> If the /proc filesystem is not mounted or accessible, opening
> /proc/[tid]/wchan fails and returns -EIO instantly. Because the return
> value is unhandled and the fallback sleep was removed, the parent thread
> could immediately proceed to futex_cmp_requeue().
> This seems to reintroduce the race condition the commit sought to fix. Should
> there be a check on the return value to ensure the test handles environments
> without /proc properly, or perhaps a fallback delay?
Yes, the situation when the /proc/[pid]/wchan file does not exist should be
taken into consideration.
yuwen
prev parent reply other threads:[~2026-05-06 3:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-28 7:16 [PATCH v3] selftests/futex: fix the failed futex_requeue test issue Yuwen Chen
2026-04-27 10:18 ` [RESEND PATCH " Yuwen Chen
2026-04-28 10:58 ` Sebastian Andrzej Siewior
2026-04-29 1:40 ` Yuwen Chen
2026-04-30 23:41 ` Andrew Morton
2026-05-06 3:35 ` Yuwen Chen [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=tencent_86DB55E71C2B0FEC8BAB8BA6C88E9B679C05@qq.com \
--to=ywen.chen@foxmail.com \
--cc=akpm@linux-foundation.org \
--cc=andrealmeid@igalia.com \
--cc=bigeasy@linutronix.de \
--cc=colin.i.king@gmail.com \
--cc=dave@stgolabs.net \
--cc=dvhart@infradead.org \
--cc=edliaw@google.com \
--cc=justinstitt@google.com \
--cc=kernel-team@android.com \
--cc=licayy@foxmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=luto@mit.edu \
--cc=mingo@redhat.com \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=peterz@infradead.org \
--cc=shuah@kernel.org \
--cc=tglx@kernel.org \
--cc=usama.anjum@collabora.com \
--cc=wakel@google.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