-
Notifications
You must be signed in to change notification settings - Fork 18k
os: spurious SIGCHILD on running child process #71828
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
Comments
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.) |
@prattmic @cherrymui It seems to have been added between Go 1.23.2 and 1.23.3. It might be related to the pidfd changes in this commit, where we added some pidfd feature checking (though I may be completely wrong -- this is just my best guess). |
The instructions don't seem sufficient to reproduce the issue, what's the environment it runs in? (os, distro, kernel, qemu?, etc) |
Tested on the You can also clone the repo to repro. |
As required by the ticket, I had posted the output of 'go env' already. Here's the output of 'uname -a' and 'lsb_release -a': Ubuntu-iMac:sigchld>uname -a Ubuntu-iMac:sigchld>lsb_release -a |
The problem is also reproducible on go version 1.24.0. Ubuntu-iMac:sigchld>go version Ubuntu-iMac:sigchld>go env Ubuntu-iMac:sigchld>go run sigchld.go goroutine 8 [running]: |
The problem is that with the new pidfd code, we run a test fork to see if pidfd works. That test fork winds up sending a |
@gopherbot Please open backport issues. This bug causes a spurious |
Backport issue(s) opened: #71848 (for 1.23), #71849 (for 1.24). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
Change https://go.dev/cl/650835 mentions this issue: |
Change https://go.dev/cl/651035 mentions this issue: |
Change https://go.dev/cl/651055 mentions this issue: |
Change https://go.dev/cl/651415 mentions this issue: |
As of CL 650835, the pidfd test child no longer sends SIGCHLD on exit. Per clone(2), "If [the child termination] signal is specified as anything other than SIGCHLD, then the parent process must specify the __WALL or __WCLONE options when waiting for the child with wait(2)." Align with this requirement. For #71828. Change-Id: I6a6a636c739e4a59abe1533fe429a433e8588939 Reviewed-on: https://go-review.googlesource.com/c/go/+/651415 Reviewed-by: Ian Lance Taylor <iant@golang.org> Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Change https://go.dev/cl/651495 mentions this issue: |
Change https://go.dev/cl/651476 mentions this issue: |
… pidfd Avoid a spurious SIGCHLD the first time we start a process. For #71828 Fixes #71848 Change-Id: I744100d21bf6aaaaafc99bc5eec9f9f807a50682 Reviewed-on: https://go-review.googlesource.com/c/go/+/651055 Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
…t child As of CL 650835, the pidfd test child no longer sends SIGCHLD on exit. Per clone(2), "If [the child termination] signal is specified as anything other than SIGCHLD, then the parent process must specify the __WALL or __WCLONE options when waiting for the child with wait(2)." Align with this requirement. For #71848. For #71828. Change-Id: I6a6a636c739e4a59abe1533fe429a433e8588939 Reviewed-on: https://go-review.googlesource.com/c/go/+/651415 Reviewed-by: Ian Lance Taylor <iant@golang.org> Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> (cherry picked from commit e1e65ae) Reviewed-on: https://go-review.googlesource.com/c/go/+/651495
… pidfd Avoid a spurious SIGCHLD the first time we start a process. For #71828 Fixes #71849 Change-Id: I744100d21bf6aaaaafc99bc5eec9f9f807a50682 Reviewed-on: https://go-review.googlesource.com/c/go/+/651035 Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com>
…t child As of CL 650835, the pidfd test child no longer sends SIGCHLD on exit. Per clone(2), "If [the child termination] signal is specified as anything other than SIGCHLD, then the parent process must specify the __WALL or __WCLONE options when waiting for the child with wait(2)." Align with this requirement. For #71849. For #71828. Change-Id: I6a6a636c739e4a59abe1533fe429a433e8588939 Reviewed-on: https://go-review.googlesource.com/c/go/+/651415 Reviewed-by: Ian Lance Taylor <iant@golang.org> Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> (cherry picked from commit e1e65ae) Reviewed-on: https://go-review.googlesource.com/c/go/+/651476
Go version
1.23.6
Output of
go env
in your module/workspace:What did you do?
The below program reproduces the bug. It panics when run with go 1.23.6 and runs fine with go 1.22.5:
What did you see happen?
What did you expect to see?
In the above program, there's only one child process. Yet in go 1.23.6, two SIGCHLD signals are received by the parent process.
The text was updated successfully, but these errors were encountered: