From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: LTP List <ltp@lists.linux.it>, Martin Doucha <martin.doucha@suse.com>
Subject: Re: [LTP] 72b1728674 causing regressions [ [PATCH v2] Terminate leftover subprocesses when main test process crashes]
Date: Fri, 18 Feb 2022 15:48:34 +0100 [thread overview]
Message-ID: <Yg+xwn2UsG8CxmnQ@yuki> (raw)
In-Reply-To: <Yg+wPtDfI4+bn1ww@pevik>
Hi!
> > I guess that it's a race between the SETSID() and exit(0) in the
> > move_to_background() function. If the main test process calls exit(0)
> > before the newly forked child managed to do SETSID() it's killed by the
> > test library because it's still in the old process group.
>
> Thanks! Yep, it'll probably be a race.
>
> Your patch causes server being killed:
> tst_test.c:1511: TBROK: Test killed by SIGUSR1!
>
> (no big surprise)
Ah right, we have to set up a dummy handler for SIGUSR1 since default
handler for SIGUSR1 will terminate the process.
Or set the .needs_checkpoints in the tst_test structure and use WAKE and
WAIT pair to synchronize.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-02-18 14:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-11 11:44 [LTP] [PATCH v2] Terminate leftover subprocesses when main test process crashes Martin Doucha
2022-02-11 12:55 ` Cyril Hrubis
2022-02-11 13:29 ` Martin Doucha
2022-02-12 3:03 ` Li Wang
2022-02-18 12:30 ` [LTP] 72b1728674 causing regressions [ [PATCH v2] Terminate leftover subprocesses when main test process crashes] Petr Vorel
2022-02-18 12:42 ` Cyril Hrubis
2022-02-18 14:42 ` Petr Vorel
2022-02-18 14:48 ` Cyril Hrubis [this message]
2022-02-18 15:32 ` Petr Vorel
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=Yg+xwn2UsG8CxmnQ@yuki \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=martin.doucha@suse.com \
--cc=pvorel@suse.cz \
/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).