-
Notifications
You must be signed in to change notification settings - Fork 17.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
os/signal: spurious timeout in TestTerminalSignal #48906
Comments
See previously #22845. The race is probably the one here: go/src/os/signal/signal_cgo_test.go Lines 211 to 218 in 2ebe77a
The failure is logged here: go/src/os/signal/signal_cgo_test.go Lines 226 to 231 in 2ebe77a
It's not obvious to me why it inherently needs to be racy, though: why can't the |
If I run at commit 1242f43 just
The If run instead Buf if I run instead |
gdb backtrace, while the process waits for something:
|
ps -eF|grep go prints: root 1782885 1775890 0 324438 4924 7 21:38 pts/0 00:00:00 /tmp/go-build4124209783/b968/signal.test -test.testlogfile=/tmp/go-build4124209783/b968/testlog.txt -test.paniconexit0 -test.short=true -test.timeout=15h0m0s If I run signal.test; echo $? from /tmp/go-build4124209783/b968/signal.test it prints PASS 0.
so this test fails apparently only in combination with other tests on a Linux from Scratch system. |
The change below does not help, and the test fails always on my system. diff --git a/src/os/signal/signal_cgo_test.go b/src/os/signal/signal_cgo_test.go
--- a/src/os/signal/signal_cgo_test.go
+++ b/src/os/signal/signal_cgo_test.go
@@ -215,7 +215,7 @@ func TestTerminalSignal(t *testing.T) {
// look for to know that the program is running again.
// bash will print the program name, but that happens before it
// restarts the program.
- time.Sleep(10 * pause)
+ time.Sleep(10 * pause + 10 * time.Second)
// Write some data for the program to read,
// which should cause it to exit. |
This line in the output is not promising:
That is the response to sending this line on the pseudo-terminal:
We execute |
My login shell is |
After calling the test several times on 1.16 and 1.17 branch, I dare to say that TestTerminalSignal fails very rarely on 1.16 and very often on 1.17. I forgot to add, that I run the (terminal) tests in a TMUX session. |
Thanks for the binaries, but I'm not going to run them. When you run bash what happens if you type
? |
|
After deleting all files reported by |
I want go compile go 1.17 (commit 2ac3bdf) with “go version go1.16.5 gccgo (GCC) 11.2.1 20211010 linux/amd” on a relatively slow system. I call
which prints:
Any idea how can I fix this?
The text was updated successfully, but these errors were encountered: