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
syscall: TestRlimit fails on darwin amd64 #40564
Comments
According to man page,
RLIM_INFINITY is 0x7fffffffffffffff. Seems we should check whether set.Max is >= 0x7fffffffffffffff. Will send a CL. |
It's a little bit weird. I found that there's nothing about set.Max, but set.Cur. After I changed set.Cur to 4096, the test passed. Seems rlim_cur must be equal or lower than 4096, but I can't find any document about it. Does anyone know the reason?
will get
but if I change r.rlim_cur to 4096, everything is fine. |
On what version of macOS are you seeing this? Does this happen only sporadically (since you mentioned the test is flaky) or does it reproduce consistently? FWIW, I can't reproduce this here on macOS Catalina (10.15.6). |
@tklauser I can reproduce this consistently, the title is not accurate, I'll change it. |
@choleraehyq Can you try |
|
@choleraehyq thanks. Not sure why you're seeing these values, but the
Maybe we should check the value of |
Change https://golang.org/cl/246658 mentions this issue: |
Change https://golang.org/cl/250000 mentions this issue: |
On some machines, kern.maxfilesperproc is 4096. If Rlimit.Cur is larger than that, Setrlimit will get an errEINVAL. Same as CL 246658 did in package syscall. Updates golang/go#40564 Change-Id: I8c45a23352fa2039772e04205680640e8a0e1840 Reviewed-on: https://go-review.googlesource.com/c/sys/+/250000 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matt Layher <mdlayher@gmail.com>
It's more trouble than it's worth. New code should be using x/sys/unix anyhow. Fixes #40564 Fixes #51479 Change-Id: I1c0e13f494380c1565e98359f088af9f52790b79 Reviewed-on: https://go-review.googlesource.com/c/go/+/390020 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
It's more trouble than it's worth. New code should be using x/sys/unix anyhow. Fixes #40564 Fixes #51479 Change-Id: I1c0e13f494380c1565e98359f088af9f52790b79 Reviewed-on: https://go-review.googlesource.com/c/go/+/390020 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> (cherry picked from commit 1e122e3) Reviewed-on: https://go-review.googlesource.com/c/go/+/390022 Trust: Dmitri Shuralyov <dmitshur@golang.org> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
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?
GOROOT_BOOTSTRAP=~/Documents/gopath/go1.14.6 ./all.bash
What did you expect to see?
All test passed.
What did you see instead?
The text was updated successfully, but these errors were encountered: