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: "go list" leaks in CPU usage #40813

mxschmitt opened this issue Aug 15, 2020 · 3 comments

x/tools/gopls: "go list" leaks in CPU usage #40813

mxschmitt opened this issue Aug 15, 2020 · 3 comments


Copy link

@mxschmitt mxschmitt commented Aug 15, 2020

Issue Type: Bug

Happens over time, not sure how to reproduce it currently. I will see in the next few days if its reproducible. Happened since a few weeks, so the last VSCode update is not causing it.

Extension version: 0.16.1
VS Code version: Code 1.48.0 (db40434f562994116e5b21c24015a2e40b2504e6, 2020-08-13T08:03:27.059Z)
OS version: Darwin x64 19.6.0

System Info
Item Value
CPUs Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz (8 x 2400)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) 3, 3, 3
Memory (System) 16.00GB (1.69GB free)
Process Argv -psn_0_143415485
Screen Reader no
VM 0%

See htop:
The full command which is causing the high CPU usage

go list -modfile=/var/folders/nq/zpr698s164v26n4v45mfkzw80000gq/T/go.3ca87dc125e97a69f07220750af22332c34224f1.022321034.mod -e -json -compiled=true -test=true -export=false -deps=true -find=false -modfile=/var/folders/nq/zpr698s164v26n4v45mfkzw80000gq/T/go.3ca87dc125e97a69f07220750af22332c34224f1.022321034.mod --

Go version: 1.14.7 darwin/amd64

Since the process is directly launched under launchd - and by that not a subprocess, I'm not fully sure if this is related to this Visual Studio Code extension. Also if I close it, it stays open. I don't use any other Go editor, only command line tools for "go run" and "go test".

Related: #39116

@stamblerre stamblerre transferred this issue from golang/vscode-go Aug 15, 2020
@stamblerre stamblerre changed the title "go list" leaks in CPU usage x/tools/gopls: "go list" leaks in CPU usage Aug 15, 2020
@gopherbot gopherbot added this to the Unreleased milestone Aug 15, 2020
Copy link

@stamblerre stamblerre commented Aug 15, 2020

This go list call looks like it's coming from the language server, so transferring this issue to that issue tracker.
The next time you see this, please upload your gopls logs as well. Instructions on how to capture them here.
In this case, did the package exist?

Copy link

@mxschmitt mxschmitt commented Aug 15, 2020

Thanks! Yep it does exist on my local machine. I enabled debug logs on the language server and upgraded additionally to Go 1.15. I keep you updated here in this issue 👍

Copy link

@mxschmitt mxschmitt commented Aug 18, 2020

I'll close it for now, seems like the newest update has fixed it (worked around 3 working days with it without any issues). Thanks!

@mxschmitt mxschmitt closed this Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants