-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: Out of Memory Error in Go 1.21.1 when running go get -d -t ./... #63113
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
Comments
What In general you will want it to be at least |
How many packages does How many modules does |
thanks for the quick follow-up!
go list all | wc -l
48669
❯ go list -m all
go: can't compute 'all' using the vendor directory
(Use -mod=mod or -mod=readonly to bypass.) go list -m -mod=mod all | wc -l
1331 |
48669 packages on 16GiB would be around ~350 kiB per package, which does seem a little high. Can you try using Barring that, unfortunately I think we would to build |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
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.) |
What version of Go are you using (
go version
)?go version go1.21.1 linux/amd64
Does this issue reproduce with the latest release?
Currently on the latest release.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I'm currently using Renovate to update our Go modules. Under the hood (reference), Renovate modifies
github.com/stretchr/testify v1.8.3
togithub.com/stretchr/testify v1.8.4
(just an example, it happens to other Go packages too) in the monorepo rootgo.mod
file before runninggo get -d -t ./...
.Running
go get -d -t ./...
brings us toruntime: out of memory error
in Go 1.21.1. FWIW, we've been on the same type of machine, Renovate version, Go commands, etc. to update our Go modules since go1.18
(no issue with go1.19
,1.20
too).Occasionally, I see the same
runtime: out of memory error
happens when I rungo mod tidy -e
(we run this as the next step ifgo get
succeeded)For the full stacktrace, please refer to the
go get -d -t ./... Output
section below.Additional Info
go.mod
files; 60k+ directories; 60+ GiB in total uncompressed size)go.work
go.mod
in the subdirectories have no issue.go.mod
.This command is ran on one of our GitLab runners which is on Ubuntu 22.04.2 LTS using a EC2 r2a.large instance with 16 GiB of RAM
What have I tried:
runtime: out of memory
inruntime.sysMapOS
#53576What did you expect to see?
No errors. Running
go get
should have made the necessary changes togo.sum
file.What did you see instead?
go get -d -t ./...
OutputThe text was updated successfully, but these errors were encountered: