You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure whether this can be considered a bug in Go, but let me explain. In my environment, rlim_max for RLIMIT_NOFILE is RLIM_INFINITY. This causes an overflow here:
As far as I could find out, on Linux it's not possible to set RLIMIT_NOFILE to anything greater than 0x7FFF_FFFF. So the overflow can't happen. I couldn't find out whether this is true for all Unix/POSIX systems supported by Go.
What version of Go are you using (go version)?
$ go version
go version go1.20.2 linux/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
No test because a test requires a system on which we can set RLIMIT_NOFILE
to RLIM_INFINITY, which we normally can't.
Fixesgolang#59242
Change-Id: I8fc30e4206bb2be46369b5342360de556ce75a96
Reviewed-on: https://go-review.googlesource.com/c/go/+/479436
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
I'm not sure whether this can be considered a bug in Go, but let me explain. In my environment, rlim_max for RLIMIT_NOFILE is RLIM_INFINITY. This causes an overflow here:
go/src/net/lookup_unix.go
Lines 148 to 151 in aee9a19
(rlim_cur has been set to rlimt_max here:
go/src/os/rlimit.go
Lines 27 to 30 in aee9a19
As far as I could find out, on Linux it's not possible to set RLIMIT_NOFILE to anything greater than 0x7FFF_FFFF. So the overflow can't happen. I couldn't find out whether this is true for all Unix/POSIX systems supported by Go.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Run this on a system/libOS where rlim_max for RLIMIT_NOFILE is RLIM_INFINITY and force cgo lookup (e.g., with env var
RES_OPTIONS=rotate
):What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: