Skip to content

os: spurious SIGCHILD on running child process [1.23 backport] #71848

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

Closed
gopherbot opened this issue Feb 20, 2025 · 5 comments
Closed

os: spurious SIGCHILD on running child process [1.23 backport] #71848

gopherbot opened this issue Feb 20, 2025 · 5 comments
Labels
CherryPickApproved Used during the release process for point releases
Milestone

Comments

@gopherbot
Copy link
Contributor

@ianlancetaylor requested issue #71828 to be considered for backport to the next 1.23 minor release.

@gopherbot Please open backport issues.

This bug causes a spurious SIGCHLD signal the first time a process is executed when running on Linux systems. This is a regression from past behavior and from behavior on non-Linux systems. The patch is small and safe.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Feb 20, 2025
@gopherbot gopherbot added this to the Go1.23.7 milestone Feb 20, 2025
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/651055 mentions this issue: [release-branch.go1.23] syscall: don't send child signal when testing pidfd

@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/651495 mentions this issue: [release-branch.go1.23] runtime: use WCLONE when waiting on pidfd test child

@prattmic
Copy link
Member

https://go.dev/cl/651055 contains a bug which is fixed by https://go.dev/cl/651495, so both must be cherry-picked together.

@prattmic prattmic added the CherryPickApproved Used during the release process for point releases label Feb 26, 2025
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Feb 26, 2025
gopherbot pushed a commit that referenced this issue Feb 26, 2025
… 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>
gopherbot pushed a commit that referenced this issue Feb 26, 2025
…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
@gopherbot
Copy link
Contributor Author

Closed by merging CL 651055 (commit c57e2bd) to release-branch.go1.23.

@gopherbot
Copy link
Contributor Author

Closed by merging CL 651495 (commit acde84c) to release-branch.go1.23.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPickApproved Used during the release process for point releases
Projects
None yet
Development

No branches or pull requests

2 participants