All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2] tst_test: using SIGTERM to terminate process
Date: Fri, 17 Sep 2021 11:17:37 +0200	[thread overview]
Message-ID: <YURdMRsvyGRcF77X@pevik> (raw)
In-Reply-To: <YURW7NKNSSr0J6pL@yuki>

Hi Cyril,

> 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.

Thanks for the debugging. *bash* is also affected, at least some releases.
I reproduced it also on some older SLES, with bash 4.4.

Kind regards,
Petr

WARNING: multiple messages have this Message-ID (diff)
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@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 11:17:37 +0200	[thread overview]
Message-ID: <YURdMRsvyGRcF77X@pevik> (raw)
Message-ID: <20210917091737.7BWBvdS3fr6Kx8eDkiX1or6YgooAK6VZOjUTl5LVAaQ@z> (raw)
In-Reply-To: <YURW7NKNSSr0J6pL@yuki>

Hi Cyril,

> 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.

Thanks for the debugging. *bash* is also affected, at least some releases.
I reproduced it also on some older SLES, with bash 4.4.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2021-09-17  9:17 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
2021-09-17  8:50       ` Cyril Hrubis
2021-09-17  9:17       ` Petr Vorel [this message]
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=YURdMRsvyGRcF77X@pevik \
    --to=pvorel@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.