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/exec: resource leak on exec failure [1.23 backport] #69402

Closed
gopherbot opened this issue Sep 11, 2024 · 3 comments
Closed

os/exec: resource leak on exec failure [1.23 backport] #69402

gopherbot opened this issue Sep 11, 2024 · 3 comments
Labels
CherryPickApproved Used during the release process for point releases
Milestone

Comments

@gopherbot
Copy link
Contributor

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

@gopherbot Please open a backport issue to 1.23.

This causes os/exec to leak file descriptors when used to run a non-existent file on Linux. There is no simple workaround.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Sep 11, 2024
@gopherbot gopherbot added this to the Go1.23.2 milestone Sep 11, 2024
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/613616 mentions this issue: [release-branch.go1.23] syscall: on exec failure, close pidfd

@cagedmantis
Copy link
Contributor

This is approved as it is a bug without a workaround.

@cagedmantis cagedmantis added the CherryPickApproved Used during the release process for point releases label Sep 18, 2024
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Sep 18, 2024
gopherbot pushed a commit that referenced this issue Sep 18, 2024
For #69284
Fixes #69402

Change-Id: I6350209302778ba5e44fa03d0b9e680d2b4ec192
Reviewed-on: https://go-review.googlesource.com/c/go/+/611495
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: roger peppe <rogpeppe@gmail.com>
Reviewed-by: Tim King <taking@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
(cherry picked from commit 8926ca9)
Reviewed-on: https://go-review.googlesource.com/c/go/+/613616
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
@gopherbot
Copy link
Contributor Author

Closed by merging CL 613616 (commit c8c6f9a) to release-branch.go1.23.

tgross added a commit to hashicorp/nomad that referenced this issue Oct 2, 2024
Picks up some small bug fixes but one especially relevant to Nomad is the
`os/exec` file descriptor, which could impact script check / change mode for
task drivers without isolated exec (ex. `raw_exec`).

Ref: https://github.com/golang/go/issues?q=milestone%3AGo1.23.2+label%3ACherryPickApproved
Ref: golang/go#69402
tgross added a commit to hashicorp/nomad that referenced this issue Oct 2, 2024
Picks up some small bug fixes but one especially relevant to Nomad is the
`os/exec` file descriptor, which could impact script check / change mode for
task drivers without isolated exec (ex. `raw_exec`).

Ref: https://github.com/golang/go/issues?q=milestone%3AGo1.23.2+label%3ACherryPickApproved
Ref: golang/go#69402
wyf9661 pushed a commit to wyf9661/go that referenced this issue Dec 16, 2024
For golang#69284
Fixes golang#69402

Change-Id: I6350209302778ba5e44fa03d0b9e680d2b4ec192
Reviewed-on: https://go-review.googlesource.com/c/go/+/611495
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: roger peppe <rogpeppe@gmail.com>
Reviewed-by: Tim King <taking@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
(cherry picked from commit 8926ca9)
Reviewed-on: https://go-review.googlesource.com/c/go/+/613616
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
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