Skip to content
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-mips as of CL 440220 #56239

Open
bcmills opened this issue Oct 14, 2022 · 1 comment
Open

os/signal: TestTerminalSignal failing on linux-mips as of CL 440220 #56239

bcmills opened this issue Oct 14, 2022 · 1 comment
Assignees
Labels
arch-mips compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@bcmills
Copy link
Member

bcmills commented Oct 14, 2022

https://build.golang.org/log/b10d790868d55f5ab0c97753619052684ef73a92:

session leader error: error setting tty process group back: no such processerror running second subprocess: error setting tty process group back: no such process
--- FAIL: TestTerminalSignal (0.06s)
    signal_cgo_test.go:186: Sending ^Z...
    signal_cgo_test.go:195: error reading readiness: EOF
FAIL
FAIL	os/signal	3.224s

TestTerminalSignal was rewritten in https://go.dev/cl/440220 to make direct system calls.

#56233 shows a somewhat different failure mode on s390x.

(attn @golang/mips)

@bcmills bcmills added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. arch-mips labels Oct 14, 2022
@bcmills bcmills added this to the Go1.20 milestone Oct 14, 2022
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Oct 14, 2022
@bcmills
Copy link
Member Author

bcmills commented Oct 14, 2022

Per @prattmic in #56233 (comment):

On MIPS, this failure actually occurs on the second ioctl call, the first is fine. On that buildlet, strace doesn't know how to read the argument, but it looks like it is correct:

16007 1665778506.336427 write(2, "child pid: 16014 0x910000\n", 26 <unfinished ...>
16007 1665778506.336497 <... write resumed> ) = 26
16007 1665778506.336578 ioctl(3, TIOCSPGRP, 0x910000) = -1 ESRCH (No such process)
16007 1665778506.336837 write(2, "session leader error: error setting tty process group back: no such process\n", 76) = 76
16007 1665778506.336963 kill(16014, SIGKILL) = 0
16019 1665778506.337100 +++ killed by SIGKILL +++
16018 1665778506.337130 +++ killed by SIGKILL +++
16015 1665778506.337163 +++ killed by SIGKILL +++
16017 1665778506.337188 +++ killed by SIGKILL +++
16007 1665778506.337221 waitid(P_PID, 16014,  <unfinished ...>
16016 1665778506.338067 +++ killed by SIGKILL +++
16014 1665778506.338121 +++ killed by SIGKILL +++
16007 1665778506.338145 <... waitid resumed> {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=16014, si_uid=0, si_status=SIGKILL, si_utime=0, si_stime=0}, WEXITED|WNOWAIT, NULL) = 0
16007 1665778506.338224 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=16014, si_uid=0, si_status=SIGKILL, si_utime=0, si_stime=0} ---

0x910000 is the address of pgid 16014, so that seems OK.

PID 16014 clearly exists, given that we successfully kill it, though perhaps it isn't a valid PGID, but it looks like it should:

16014 1665778506.195828 setpgid(0, 0 <unfinished ...>
16014 1665778506.195873 <... setpgid resumed> ) = 0

man 2 setpgid: "setpgid() sets the PGID of the process specified by pid to pgid. If pid is zero, then the process ID of the calling process is used. If pgid is zero, then the PGID of the process specified by pid is made the same as its process ID."

Thus, I think this is a different bug from s390x.

@mknyszek mknyszek changed the title os/signal: TestTerminalSignal failing on linux-s390x-ibm as of CL 440220 os/signal: TestTerminalSignal failing on linux-mips as of CL 440220 Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-mips compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
Status: Todo
Development

No branches or pull requests

5 participants