From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2] tst_test: using SIGTERM to terminate process
Date: Fri, 17 Sep 2021 10:50:52 +0200 [thread overview]
Message-ID: <YURW7NKNSSr0J6pL@yuki> (raw)
In-Reply-To: <YUJ7SC/FoA8wTaf2@pevik>
Hi!
> setup()
> {
> tst_brk TCONF "quit now!"
> }
>
> do_test()
> {
> tst_res TPASS "pass :)"
> }
>
> tst_run
> EOF
>
> # while true; do ./debug.sh; done
I managed to reproduce this in dash. I bet that this is a bug where
signal handler inside dash is temporarily disabled when we install the
trap and if we manage to hit that window the signal is discarded. At
least that is my working theory. After I've installed debug prints, in
the cases where it hangs the signal was sent just before have installed
the trap. And in some cases when the signal arrives the timer process is
killed but the trap is not invoked. So it really looks like signal
handling in dash is simply broken. Not sure what we can do about bugs
like this apart from switching to a real programming language.
--
Cyril Hrubis
chrubis@suse.cz
WARNING: multiple messages have this Message-ID (diff)
From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it, Joerg Vehlow <joerg.vehlow@aox-tech.de>
Subject: Re: [LTP] [PATCH v2] tst_test: using SIGTERM to terminate process
Date: Fri, 17 Sep 2021 10:50:52 +0200 [thread overview]
Message-ID: <YURW7NKNSSr0J6pL@yuki> (raw)
Message-ID: <20210917085052.fKdcS5fkC4BjlgsTL7zj8xDkMeZOsoOLRJK_Wxjokco@z> (raw)
In-Reply-To: <YUJ7SC/FoA8wTaf2@pevik>
Hi!
> setup()
> {
> tst_brk TCONF "quit now!"
> }
>
> do_test()
> {
> tst_res TPASS "pass :)"
> }
>
> tst_run
> EOF
>
> # while true; do ./debug.sh; done
I managed to reproduce this in dash. I bet that this is a bug where
signal handler inside dash is temporarily disabled when we install the
trap and if we manage to hit that window the signal is discarded. At
least that is my working theory. After I've installed debug prints, in
the cases where it hangs the signal was sent just before have installed
the trap. And in some cases when the signal arrives the timer process is
killed but the trap is not invoked. So it really looks like signal
handling in dash is simply broken. Not sure what we can do about bugs
like this apart from switching to a real programming language.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2021-09-17 8:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-19 8:58 [LTP] [PATCH v2] tst_test: using SIGTERM to terminate process Li Wang
2021-05-19 9:21 ` Joerg Vehlow
2021-05-27 4:11 ` Li Wang
2021-05-31 9:25 ` Li Wang
2021-09-15 22:40 ` Petr Vorel
2021-09-15 22:40 ` Petr Vorel
2021-09-15 23:01 ` Petr Vorel
2021-09-15 23:01 ` Petr Vorel
2021-09-17 8:50 ` Cyril Hrubis [this message]
2021-09-17 8:50 ` Cyril Hrubis
2021-09-17 9:17 ` Petr Vorel
2021-09-17 9:17 ` Petr Vorel
2021-09-17 10:18 ` Petr Vorel
2021-09-17 10:18 ` Petr Vorel
2021-09-17 10:59 ` Cyril Hrubis
2021-09-17 10:59 ` Cyril Hrubis
2021-09-17 11:03 ` Petr Vorel
2021-09-17 11:03 ` 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=YURW7NKNSSr0J6pL@yuki \
--to=chrubis@suse.cz \
--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.