GNU bug report logs - #51793
FAIL: tests/misc/env-signal-handler

Previous Next

Package: coreutils;

Reported by: Andreas Schwab <schwab <at> linux-m68k.org>

Date: Fri, 12 Nov 2021 19:26:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 51793 in the body.
You can then email your comments to 51793 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#51793; Package coreutils. (Fri, 12 Nov 2021 19:26:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Schwab <schwab <at> linux-m68k.org>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Fri, 12 Nov 2021 19:26:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: bug-coreutils <at> gnu.org
Subject: FAIL: tests/misc/env-signal-handler
Date: Fri, 12 Nov 2021 20:25:39 +0100
--- exp-err6   2021-11-11 22:58:04.360716802 +0000
+++ err6       2021-11-11 22:58:04.752716821 +0000
@@ -1,2 +1 @@
 timeout: sending signal INT to command 'env'
-timeout: sending signal KILL to command 'env'
./tests/misc/env-signal-handler.sh: line 127: 26396 Killed                  env timeout --verbose --kill-after=.1 --signal=INT .1 env --ignore-signal sleep 10 > /dev/null 2> err7t
FAIL tests/misc/env-signal-handler.sh (exit status: 1)

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-coreutils <at> gnu.org:
bug#51793; Package coreutils. (Fri, 12 Nov 2021 22:35:02 GMT) Full text and rfc822 format available.

Message #8 received at 51793 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Andreas Schwab <schwab <at> linux-m68k.org>, 51793 <at> debbugs.gnu.org
Subject: Re: bug#51793: FAIL: tests/misc/env-signal-handler
Date: Fri, 12 Nov 2021 22:33:17 +0000
On 12/11/2021 19:25, Andreas Schwab wrote:
> --- exp-err6   2021-11-11 22:58:04.360716802 +0000
> +++ err6       2021-11-11 22:58:04.752716821 +0000
> @@ -1,2 +1 @@
>   timeout: sending signal INT to command 'env'
> -timeout: sending signal KILL to command 'env'

The above is for the previous command not the following.

> ./tests/misc/env-signal-handler.sh: line 127: 26396 Killed                  env timeout --verbose --kill-after=.1 --signal=INT .1 env --ignore-signal sleep 10 > /dev/null 2> err7t
> FAIL tests/misc/env-signal-handler.sh (exit status: 1)

Could you paste a bit more context from the previous command.
Specifically I'm wondering if the "Killed" message was displayed
(i.e. if the SIGKILL was actually sent).

I presume this is a race that you're seeing rarely.
I've never seen this, and I can't see the race.

What might be happening is the "sending signal KILL..."
message sent to stderr, is in a buffer somewhere,
which is dropped upon processing of SIGKILL.

What file system, kernel, shell are you using.

cheers,
Pádraig





Information forwarded to bug-coreutils <at> gnu.org:
bug#51793; Package coreutils. (Sat, 13 Nov 2021 09:32:01 GMT) Full text and rfc822 format available.

Message #11 received at 51793 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Pádraig Brady <P <at> draigBrady.com>
Cc: 51793 <at> debbugs.gnu.org
Subject: Re: bug#51793: FAIL: tests/misc/env-signal-handler
Date: Sat, 13 Nov 2021 10:30:59 +0100
On Nov 12 2021, Pádraig Brady wrote:

> On 12/11/2021 19:25, Andreas Schwab wrote:
>> --- exp-err6   2021-11-11 22:58:04.360716802 +0000
>> +++ err6       2021-11-11 22:58:04.752716821 +0000
>> @@ -1,2 +1 @@
>>   timeout: sending signal INT to command 'env'
>> -timeout: sending signal KILL to command 'env'
>
> The above is for the previous command not the following.
>
>> ./tests/misc/env-signal-handler.sh: line 127: 26396 Killed                  env timeout --verbose --kill-after=.1 --signal=INT .1 env --ignore-signal sleep 10 > /dev/null 2> err7t
>> FAIL tests/misc/env-signal-handler.sh (exit status: 1)
>
> Could you paste a bit more context from the previous command.

This is the complete output.

> I presume this is a race that you're seeing rarely.

Yes.

> I've never seen this, and I can't see the race.

Try adding load to the system.

> What file system, kernel, shell are you using.

https://build.opensuse.org/package/live_build_log/home:Andreas_Schwab:Factory/coreutils/r/riscv64

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-coreutils <at> gnu.org:
bug#51793; Package coreutils. (Sat, 13 Nov 2021 09:37:02 GMT) Full text and rfc822 format available.

Message #14 received at 51793 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Pádraig Brady <P <at> draigBrady.com>
Cc: 51793 <at> debbugs.gnu.org
Subject: Re: bug#51793: FAIL: tests/misc/env-signal-handler
Date: Sat, 13 Nov 2021 10:36:36 +0100
https://build.opensuse.org/package/live_build_log/home:Andreas_Schwab:Factory/coreutils/s/s390x

./tests/misc/env-signal-handler.sh: line 91:  8508 Killed                  env timeout --verbose --kill-after=.1 --signal=INT .1 sleep 10 > /dev/null 2> err5
--- exp-err5    2021-11-13 09:14:29.837716890 +0000
+++ err5        2021-11-13 09:14:29.767716890 +0000
@@ -1 +1,2 @@
 timeout: sending signal INT to command 'sleep'
+timeout: sending signal KILL to command 'sleep'
./tests/misc/env-signal-handler.sh: line 111:  8525 Killed                  env timeout --verbose --kill-after=.1 --signal=INT .1 env --ignore-signal=INT sleep 10 > /dev/null 2> err6t
./tests/misc/env-signal-handler.sh: line 127:  8551 Killed                  env timeout --verbose --kill-after=.1 --signal=INT .1 env --ignore-signal sleep 10 > /dev/null 2> err7t
FAIL tests/misc/env-signal-handler.sh (exit status: 1)

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-coreutils <at> gnu.org:
bug#51793; Package coreutils. (Sat, 13 Nov 2021 09:47:01 GMT) Full text and rfc822 format available.

Message #17 received at 51793 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Pádraig Brady <P <at> draigBrady.com>
Cc: 51793 <at> debbugs.gnu.org
Subject: Re: bug#51793: FAIL: tests/misc/env-signal-handler
Date: Sat, 13 Nov 2021 10:46:36 +0100
On Nov 12 2021, Pádraig Brady wrote:

> I've never seen this, and I can't see the race.

There is an obvious race: if env needs more than .1 seconds to set the
SIGINT handler.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Reply sent to Pádraig Brady <P <at> draigBrady.com>:
You have taken responsibility. (Sat, 13 Nov 2021 12:20:01 GMT) Full text and rfc822 format available.

Notification sent to Andreas Schwab <schwab <at> linux-m68k.org>:
bug acknowledged by developer. (Sat, 13 Nov 2021 12:20:01 GMT) Full text and rfc822 format available.

Message #22 received at 51793-done <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 51793-done <at> debbugs.gnu.org
Subject: Re: bug#51793: FAIL: tests/misc/env-signal-handler
Date: Sat, 13 Nov 2021 12:18:39 +0000
[Message part 1 (text/plain, inline)]
On 13/11/2021 09:46, Andreas Schwab wrote:
> On Nov 12 2021, Pádraig Brady wrote:
> 
>> I've never seen this, and I can't see the race.
> 
> There is an obvious race: if env needs more than .1 seconds to set the
> SIGINT handler.

Indeed.

That fits the pattern where we need a certain delay to pass.
So we can use our retry_delay_ helper here.
I'll apply the attached later.

thanks,
Pádraig
[test-env-race.patch (text/x-patch, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 11 Dec 2021 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 98 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.