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

runtime: automatically bump RLIMIT_NOFILE on Unix [1.19 backport] #59063

Closed
gopherbot opened this issue Mar 15, 2023 · 3 comments
Closed

runtime: automatically bump RLIMIT_NOFILE on Unix [1.19 backport] #59063

gopherbot opened this issue Mar 15, 2023 · 3 comments
Labels
CherryPickApproved Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link

@ianlancetaylor requested issue #46279 to be considered for backport to the next 1.19 minor release.

@gopherbot Please open backport issues.

CL 393354, which first appeared in Go one point nineteen, causes Go programs that start other non-Go programs to lose the soft NOFILES rlimit. This breaks programs that care about that. CLs 476096 and 476097 fix the problem by changing the syscall fork and exec functions to restore the original soft rlimit if appropriate. This is a request to backport those changes to the currently supported releases.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Mar 15, 2023
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Mar 15, 2023
@gopherbot gopherbot added this to the Go1.19.8 milestone Mar 15, 2023
@heschi heschi added the CherryPickApproved Used during the release process for point releases label Mar 22, 2023
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Mar 22, 2023
@heschi
Copy link
Contributor

heschi commented Mar 22, 2023

Fix CL seems largeish but harmless; as long as the backport CLs aren't more complicated, approved.

@gopherbot
Copy link
Author

Change https://go.dev/cl/478660 mentions this issue: [release-branch.go1.19] syscall: restore original NOFILE rlimit in child process

@mknyszek mknyszek modified the milestones: Go1.19.8, Go1.19.9 Apr 4, 2023
gopherbot pushed a commit that referenced this issue Apr 14, 2023
…ild process

If we increased the NOFILE rlimit when starting the program,
restore the original rlimit when forking a child process.

In CL 393354 the os package was changed to raise the open file rlimit
at program start. That code is not inherently tied to the os package.
This CL moves it into the syscall package.

This is a backport of CLs 476096 and 476097 from trunk.

For #46279
Fixes #59063

Change-Id: I9be6ecc52d4f82eb226907611aec9df808e1da84
Reviewed-on: https://go-review.googlesource.com/c/go/+/478660
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
@gopherbot
Copy link
Author

Closed by merging 130a7f8 to release-branch.go1.19.

@golang golang locked and limited conversation to collaborators Apr 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

3 participants