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

Closed
mxschmitt opened this issue Aug 15, 2020 · 3 comments
Closed

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

mxschmitt opened this issue Aug 15, 2020 · 3 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.
Milestone

Comments

@mxschmitt
Copy link

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:
image
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 -- github.com/mxschmitt/playwright-golang

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 Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Aug 15, 2020
@gopherbot gopherbot added this to the Unreleased milestone Aug 15, 2020
@stamblerre
Copy link
Contributor

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 github.com/mxschmitt/playwright-golang package exist?

@mxschmitt
Copy link
Author

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 👍

@stamblerre stamblerre modified the milestones: Unreleased, gopls/v.0.5.0 Aug 15, 2020
@stamblerre stamblerre added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Aug 15, 2020
@mxschmitt
Copy link
Author

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!

@golang golang locked and limited conversation to collaborators Aug 18, 2021
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