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

x/tools/gopls: high memory consumption #45404

Closed
EgorRzh opened this issue Apr 6, 2021 · 2 comments
Closed

x/tools/gopls: high memory consumption #45404

EgorRzh opened this issue Apr 6, 2021 · 2 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@EgorRzh
Copy link

EgorRzh commented Apr 6, 2021

What version of Go are you using (go version)?

1.16

$ go version

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

Ubuntu 20.04

go env Output
$ go env

GO111MODULE="off"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/egor/.cache/go-build"
GOENV="/home/egor/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/egor/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/egor/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.16"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build638460739=/tmp/go-build -gno-record-gcc-switches"

What did you do?

I'am starting VSCode with installed Go extension. And gopls process use all memory (24Gb)

What did you expect to see?

What did you see instead?

Attached file with gopls logs

gopls.9316-14GiB-nonames.zip

@EgorRzh EgorRzh changed the title x/tools/gopls: <fill this in> x/tools/gopls: A lot of memory consumption Apr 6, 2021
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Apr 6, 2021
@gopherbot gopherbot added this to the Unreleased milestone Apr 6, 2021
@stamblerre
Copy link
Contributor

Thank you for filing this issue and attaching the memory zip. Based on the heap profile, we think that a package in your workspace might have really large byte slice literals, which are known to take up a lot of memory in the type checker. Is that possible? You can look at the heap profile with package names to identify which package that might be.

@stamblerre stamblerre changed the title x/tools/gopls: A lot of memory consumption x/tools/gopls: high memory consumption Apr 6, 2021
@stamblerre stamblerre changed the title x/tools/gopls: high memory consumption x/tools/gopls: high memory consumption Apr 6, 2021
@stamblerre stamblerre modified the milestones: Unreleased, gopls/unplanned Apr 6, 2021
@stamblerre stamblerre added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Apr 7, 2021
@gopherbot
Copy link

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.)

@stamblerre stamblerre removed this from the gopls/unplanned milestone May 10, 2021
@golang golang locked and limited conversation to collaborators May 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants