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
{{ message }}
Repository navigation
cmd/compile: "too many open files in system" on macos Ventura #54833
I'm running macOS Ventura and update to the latest beta build to test with Go 1.19. There could be a bug in Go reading files which might be affected when macOS Ventura is release to the public. Go 1.18.5 is working fine.
What version of Go are you using (go version)?
go version go1.19 darwin/arm64
Does this issue reproduce with the latest release?
Yes, 1.19
What operating system and processor architecture are you using (go env)?
macOS Ventura, M1 (arm)
What did you do?
Compiling a simple Go project and I get "too many open files in system".
What did you expect to see?
Able to compile as Go 1.18.5 which is working fine without error.
What did you see instead?
"... too many open files in system" appear in the terminal when ran "go build ." command.
🐚 ~/dev/ftl $ find /Users/alec/Library/Caches/go-build
🐚 ~/dev/ftl $ go build ./cmd/ftl-controller
../../Library/Caches/hermit/pkg/go-1.20.5/src/crypto/crypto.go:9:2: open /Users/alec/Library/Caches/hermit/pkg/go-1.20.5/src/hash: too many open files in system
🐚 ~/dev/ftl $ go env get GOCACHE
/Users/alec/Library/Caches/go-build
🐚 ~/dev/ftl $ rm -rf ~/Library/Caches/go-build aat/ingress-directive
🐚 ~/dev/ftl $ go build ./cmd/ftl-controller
🐚 ~/dev/ftl $
This sounds like a classic case of not closing a file somewhere?
An extra bit of potentially useful information is that it would always report this error on the exact same directory (open /Users/alec/Library/Caches/hermit/pkg/go-1.20.5/src/hash). I also did a bunch of lsofing, and checked the ulimits on my machine and couldn't see anything obviously misconfigured.
Also ran into this on darwin/amd64. I saw the error after I updated to Sonoma 14.4.1.
I tried updating the ulimit, but the problem persisted. It was fixed after running go clean -cache
Also ran into this on darwin/amd64. I saw the error after I updated to Sonoma 14.4.1. I tried updating the ulimit, but the problem persisted. It was fixed after running go clean -cache
Activity
[-]affected/package: Go 1.19 on macos Ventura[/-][+]cmd/compile: "too many open files in system" on macos Ventura[/+]heschi commentedon Sep 2, 2022
cc @golang/compiler
Please provide a full reproducer, log, and the output of
go env.jamesli2021 commentedon Sep 3, 2022
Here go env output:
gopherbot commentedon Oct 9, 2022
Timed out in state WaitingForInfo. Closing.
(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)
yyuyitian commentedon Dec 10, 2022
i meet the same problem with go version 1.19.2
sunznx commentedon Dec 15, 2022
I solved by remove
$GOCACHEdirtstarbow-sfdc commentedon Feb 22, 2023
Solved a similar issue for me.
alecthomas commentedon Jul 17, 2023
Same issue here, and same fix:
This sounds like a classic case of not closing a file somewhere?
ianlancetaylor commentedon Jul 18, 2023
@alecthomas Can you provide the
go envoutput on your system? Thanks.alecthomas commentedon Jul 18, 2023
For sure. I'm a bit annoyed that I didn't take a backup of the GOCACHE directory.
alecthomas commentedon Jul 18, 2023
An extra bit of potentially useful information is that it would always report this error on the exact same directory (
open /Users/alec/Library/Caches/hermit/pkg/go-1.20.5/src/hash). I also did a bunch of lsofing, and checked the ulimits on my machine and couldn't see anything obviously misconfigured.ianlancetaylor commentedon Jul 19, 2023
I note that the reports that provide the information are all darwin/arm64. Is anybody seeing this problem on a different system?
ncdc commentedon Jul 24, 2023
I just ran into it on darwin/amd64.
go clean -cachefixed it for me.xlanor commentedon Jul 25, 2023
ran into this on darwin/amd64 too, when my autogeneration failed midway. Likewise, go clean -cache fixed it.
My ulimit was originally at 256 but the problem persisted even after raising it to 10,000.
Am also on macos ventura.
m0jeda commentedon Apr 26, 2024
Also ran into this on darwin/amd64. I saw the error after I updated to Sonoma 14.4.1.
I tried updating the ulimit, but the problem persisted. It was fixed after running
go clean -cacheZippoLee12138 commentedon Aug 5, 2024
It's work for me
jacevys commentedon May 22, 2025
man, this worked for me, thanks!!!
jacevys commentedon May 22, 2025
man, this worked for me, thanks!!!