From: John Kacur <jkacur@redhat.com>
To: Derek Barbosa <debarbos@redhat.com>
Cc: williams@redhat.com, linux-rt-users@vger.kernel.org,
crwood@redhat.com, oleg@redhat.com, shichen@redhat.com
Subject: Re: [PATCH v3] ssdd: mitigate tracee starvation
Date: Fri, 26 Sep 2025 13:16:43 -0400 (EDT) [thread overview]
Message-ID: <f39ff2a8-452f-8239-2809-0b30ca67eea9@redhat.com> (raw)
In-Reply-To: <3yq34kwrfmwvhy5la5wutnmbdd6pf4rwnvnvnapegvx7acq7xu@pghcpahcvndz>
On Fri, 19 Sep 2025, Derek Barbosa wrote:
> When ssdd is invoked with nforks > 100 && niters == 10000 on a tuned,
> realtime kernel, the following error messages can be seen:
>
> EXITING, ERROR: wait on PTRACE_SINGLESTEP #385: no SIGCHLD seen (signal count == 0), signo 5
> EXITING, ERROR: wait on PTRACE_SINGLESTEP #398: no SIGCHLD seen (signal count == 0), signo 5
> EXITING, ERROR: wait on PTRACE_SINGLESTEP #385: no SIGCHLD seen (signal count == 0), signo 5
> ...
>
> This behavior is caused by ptrace_stop() being unable to sleep after
> taking tasklist_lock().
>
> As forktest() generates "niter" PTRACE_SINGLESTEP's for nforks, in the
> rare event where nforks exceeds the defaults by a large order of
> magnitude, the sporadic test failures caused by missing SIGCHLDs
> indicates that the tracees are unable to effectively wait for their
> asynchronous signals to arrive --as denoted in the previous sleeps for
> check_sigchld().
>
> Therefore, by performing an sigtimedwait() in check_sigchld(), we
> give the tracee enough CPU time to call
> do_notify_parent_cldstop()->send_signal_locked().
>
> The observed behavior after appling this patch mitigates the
> aforementioned issue in scenarios with a high number of nforks.
>
> Suggested-by: Oleg Nesterov <oleg@redhat.com>
> Suggested-by: Crystal Wood <crwood@redhat.com>
> Signed-off-by: Derek Barbosa <debarbos@redhat.com>
> ---
> V1 -> V2: Addressed review comments, removed usleep() in favor of
> sigtimedwait().
> V2 -> V3: Addressed checkpatch.pl complaints.
>
> src/ssdd/ssdd.c | 65 ++++++++++++++++++++++++++++++++++++-------------
> 1 file changed, 48 insertions(+), 17 deletions(-)
>
Signed-off-by: John Kacur <jkacur@redhat.com>
prev parent reply other threads:[~2025-09-26 17:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-19 18:11 [PATCH v3] ssdd: mitigate tracee starvation Derek Barbosa
2025-09-19 18:58 ` John Kacur
2025-09-19 19:14 ` Crystal Wood
2025-09-26 17:16 ` John Kacur [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=f39ff2a8-452f-8239-2809-0b30ca67eea9@redhat.com \
--to=jkacur@redhat.com \
--cc=crwood@redhat.com \
--cc=debarbos@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=shichen@redhat.com \
--cc=williams@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;
as well as URLs for NNTP newsgroup(s).