-
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: TestTerminalSignal
failing on linux-s390x-ibm
as of CL 440220
#56233
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
TestTerminalSignal
failing on linux-s390x-ibm
as of CL 440220TestTerminalSignal
failing on linux-s390x-ibm
and linux-mips-rtrk
as of CL 440220
Change https://go.dev/cl/443066 mentions this issue: |
I tried to take a quick look at this on a linux-s390x gomote, but that builder apparently doesn't have strace installed. :( |
@prattmic I've installed strace on all the s390x builders if you can try again |
Awesome, thanks. @bcmills was right that the ioctl argument is incorrect (at least on s390x, still waiting on mips buildlet):
Is there an ABI difference for ioctl arguments on s390x? That seems like the most obvious cause, though I don't see evidence of that in ioctl calls in I'm going to send a CL to skip this test on s390x for now. |
This comment was marked as off-topic.
This comment was marked as off-topic.
For #37329. For #56233. Change-Id: Iafcddaddafd2d27fa5d535b57aaefec387f0b3f0 Reviewed-on: https://go-review.googlesource.com/c/go/+/443066 Run-TryBot: Michael Pratt <mpratt@google.com> Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
TestTerminalSignal
failing on linux-s390x-ibm
and linux-mips-rtrk
as of CL 440220TestTerminalSignal
failing on linux-s390x-ibm
as of CL 440220
This comment was marked as off-topic.
This comment was marked as off-topic.
@prattmic it looks like this is an endian issue on s390x. If I cast the pids to int32 it passes for me locally. Not sure if int32 is correct for all platforms this test runs on. diff --git a/src/os/signal/signal_cgo_test.go b/src/os/signal/signal_cgo_test.go
index 3625637432..086d56a251 100644
--- a/src/os/signal/signal_cgo_test.go
+++ b/src/os/signal/signal_cgo_test.go
@@ -279,7 +279,7 @@ func runSessionLeader(pause time.Duration) {
}
// Take TTY.
- pgrp := syscall.Getpgrp()
+ pgrp := int32(syscall.Getpgrp())
_, _, errno = syscall.Syscall(syscall.SYS_IOCTL, ptyFD, syscall.TIOCSPGRP, uintptr(unsafe.Pointer(&pgrp)))
if errno != 0 {
return fmt.Errorf("error setting tty process group: %w", errno)
@@ -290,7 +290,7 @@ func runSessionLeader(pause time.Duration) {
time.Sleep(pause)
// Give TTY back.
- pid := uint64(cmd.Process.Pid)
+ pid := int32(cmd.Process.Pid)
_, _, errno = syscall.Syscall(syscall.SYS_IOCTL, ptyFD, syscall.TIOCSPGRP, uintptr(unsafe.Pointer(&pid)))
if errno != 0 {
return fmt.Errorf("error setting tty process group back: %w", errno) |
The code is passing the address of a Go |
Change https://go.dev/cl/443175 mentions this issue: |
For golang#37329. For golang#56233. Change-Id: Iafcddaddafd2d27fa5d535b57aaefec387f0b3f0 Reviewed-on: https://go-review.googlesource.com/c/go/+/443066 Run-TryBot: Michael Pratt <mpratt@google.com> Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Fixes golang#56233 Change-Id: I1cf176bc2f39c5e41d5a390ec6893426cdd39be0 Reviewed-on: https://go-review.googlesource.com/c/go/+/443175 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Joel Sing <joel@sing.id.au> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
https://build.golang.org/log/59c45ddde98d0d3c660c381aa819fa1a5b85e154:
TestTerminalSignal
was rewritten in https://go.dev/cl/440220 to make direct system calls.It appears that the call that is failing is an
ioctl
with argumentTIOCSPGRP
.It could possibly be caused by an invalid return from
syscall.Getpgrp()
.(attn @golang/s390x; CC @prattmic)
The text was updated successfully, but these errors were encountered: