From: Li Wang <li.wang@linux.dev>
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: Linux Test Project <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH 1/2] pids: fix cleanup of orphaned pids_task1 children
Date: Tue, 16 Jun 2026 15:32:23 +0800 [thread overview]
Message-ID: <ajD8B3bQenC30Lp_@linux.dev> (raw)
In-Reply-To: <20260615-fix_pids_errors-v1-1-99a54a205180@suse.com>
> From: Andrea Cervesato <andrea.cervesato@suse.com>
>
> pids_task1 forks a child that calls pause(), then the parent exits.
> The orphaned child remains in the cgroup but gets reparented to init,
> so it is not a child of the test shell.
>
> stop_pids_tasks_path() reads cgroup.procs which includes this orphan.
> kill -9 succeeds but wait fails with 'not a child of this shell'.
> Using ROD for kill also unnecessarily aborts if the process is already
> dead.
>
> Fix by suppressing errors from both kill and wait, and add killall
> for pids_task1 in cleanup() to catch any remaining orphans.
>
> Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
Reviewed-by: Li Wang <li.wang@linux.dev>
--
Regards,
Li Wang
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-06-16 7:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-15 14:16 [LTP] [PATCH 0/2] Fix sporadic failures in pids shell tests Andrea Cervesato
2026-06-15 14:16 ` [LTP] [PATCH 1/2] pids: fix cleanup of orphaned pids_task1 children Andrea Cervesato
2026-06-15 14:40 ` [LTP] " linuxtestproject.agent
2026-06-16 7:32 ` Li Wang [this message]
2026-06-15 14:16 ` [LTP] [PATCH 2/2] tst_cgroup: tolerate ESRCH in cgroup_drain() Andrea Cervesato
2026-06-16 8:03 ` Li Wang
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=ajD8B3bQenC30Lp_@linux.dev \
--to=li.wang@linux.dev \
--cc=andrea.cervesato@suse.de \
--cc=ltp@lists.linux.it \
/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.