Skip to content

gopls is causing termination of vscode window with no prompt or warning #2625

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

Closed
sheldonhull opened this issue Jan 25, 2023 · 2 comments
Closed
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@sheldonhull
Copy link

I was able to find the Go extension causing this by running vscode extension bisect.

What version of Go, VS Code & VS Code Go extension are you using?

Version Information
  • Run go version to get version of Go from the VS Code integrated terminal.
    • go version go1.19.3 darwin/amd64
  • Run gopls -v version to get version of Gopls from the VS Code integrated terminal.

Build info
----------
golang.org/x/tools/gopls v0.11.0
    golang.org/x/tools/gopls@v0.11.0 h1:/nvKHdTtePQmrv9XN3gIUN9MOdUrKzO/dcqgbG6x8EY=
    github.com/BurntSushi/toml@v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
    github.com/google/go-cmp@v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
    github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
    golang.org/x/exp@v0.0.0-20221031165847-c99f073a8326 h1:QfTh0HpN6hlw6D3vu8DAwC8pBIwikq0AI1evdm+FksE=
    golang.org/x/exp/typeparams@v0.0.0-20221031165847-c99f073a8326 h1:fl8k2zg28yA23264d82M4dp+YlJ3ngDcpuB1bewkQi4=
    golang.org/x/mod@v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA=
    golang.org/x/sync@v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
    golang.org/x/sys@v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=
    golang.org/x/text@v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=
    golang.org/x/tools@v0.3.1-0.20221213193459-ca17b2c27ca8 h1:7/HkGkN/2ktghBCSRRgp31wAww4syfsW52tj7yirjWk=
    golang.org/x/vuln@v0.0.0-20221109205719-3af8368ee4fe h1:qptQiQwEpETwDiz85LKtChqif9xhVkAm8Nhxs0xnTww=
    honnef.co/go/tools@v0.3.3 h1:oDx7VAwstgpYpb3wv0oxiZlxY+foCpRAwY7Vk6XpAgA=
    mvdan.cc/gofumpt@v0.4.0 h1:JVf4NN1mIpHogBj7ABpgOyZc65/UUOkKQFkoURsz4MM=
    mvdan.cc/xurls/v2@v2.4.0 h1:tzxjVAj+wSBmDcF6zBB7/myTy3gX9xvi8Tyr28AuQgc=
go: go1.19.2
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders.
1.74.3
97dec172d3256f8ca4bfb2143f3f76b503ca0534
x64
  • Check your installed extensions to get the version of the VS Code Go extension
    • v0.37.1
  • Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > Go: Locate Configured Go Tools command.
Checking configured tools....
GOBIN: undefined
toolsGopath: 
gopath: /Users/myuser/go
GOROOT: /Users/myuser/.local/share/aquaproj-aqua/pkgs/http/golang.org/dl/go1.19.3.darwin-amd64.tar.gz/go
PATH: /Users/myuser/go/bin:/Users/myuser/Library/Caches/fnm_multishells/87650_1674594318104/bin:/usr/local/bin:/usr/local/sbin:/Users/myuser/Library/Caches/antidote/romkatv/zsh-bench:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Applications/Little Snitch.app/Contents/Components:/Users/myuser/.local/share/whalebrew:/Users/myuser/.cargo/bin:/usr/local/sbin:/Users/myuser/.serverless/bin:/Users/myuser/bin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/gnu-sed/libexec/gnubin:/Users/myuser/.local/share/aquaproj-aqua/bin:/Users/myuser/.dotnet/tools:/Users/myuser/.pulumi/bin

	go:	/Users/myuser/.local/share/aquaproj-aqua/bin/go: go version go1.19.3 darwin/amd64

	gotests:	/Users/myuser/go/bin/gotests	(version: v1.6.0 built with go: go1.19.2)
	gomodifytags:	/Users/myuser/go/bin/gomodifytags	(version: v1.16.0 built with go: go1.19.2)
	impl:	/Users/myuser/go/bin/impl	(version: v1.2.0 built with go: go1.19.2)
	goplay:	/Users/myuser/go/bin/goplay	(version: v1.0.0 built with go: go1.19.2)
	dlv:	/Users/myuser/go/bin/dlv	(version: v1.20.1 built with go: go1.19.2)
	golangci-lint:	/Users/myuser/go/bin/golangci-lint	(version: v1.50.1 built with go: go1.19.2)
	gopls:	/Users/myuser/go/bin/gopls	(version: v0.11.0 built with go: go1.19.2)

go env
Workspace Folder (api-bambe): /Users/me/myrepo
	GO111MODULE=""
	GOARCH="amd64"
	GOBIN=""
	GOCACHE="/Users/myuser/Library/Caches/go-build"
	GOENV="/Users/myuser/Library/Application Support/go/env"
	GOEXE=""
	GOEXPERIMENT=""
	GOFLAGS=""
	GOHOSTARCH="amd64"
	GOHOSTOS="darwin"
	GOINSECURE=""
	GOMODCACHE="/Users/myuser/go/pkg/mod"
	GONOPROXY="dev.azure.com"
	GONOSUMDB="dev.azure.com"
	GOOS="darwin"
	GOPATH="/Users/myuser/go"
	GOPRIVATE="dev.azure.com"
	GOPROXY="https://proxy.golang.org,direct"
	GOROOT="/Users/myuser/.local/share/aquaproj-aqua/pkgs/http/golang.org/dl/go1.19.3.darwin-amd64.tar.gz/go"
	GOSUMDB="sum.golang.org"
	GOTMPDIR=""
	GOTOOLDIR="/Users/myuser/.local/share/aquaproj-aqua/pkgs/http/golang.org/dl/go1.19.3.darwin-amd64.tar.gz/go/pkg/tool/darwin_amd64"
	GOVCS=""
	GOVERSION="go1.19.3"
	GCCGO="gccgo"
	GOAMD64="v1"
	AR="ar"
	CC="clang"
	CXX="clang++"
	CGO_ENABLED="1"
	GOMOD="/Users/myuser/git/myrepo/go.mod"
	GOWORK=""
	CGO_CFLAGS="-g -O2"
	CGO_CPPFLAGS=""
	CGO_CXXFLAGS="-g -O2"
	CGO_FFLAGS="-g -O2"
	CGO_LDFLAGS="-g -O2"
	PKG_CONFIG="pkg-config"
	GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/5w/983nypt55nd_z63r96n23t5c0000gp/T/go-build3418556913=/tmp/go-build -gno-record-gcc-switches -fno-common"

Share the Go related settings you have added/edited

Run Preferences: Open Settings (JSON) command to open your settings.json file.
Share all the settings with the go. or ["go"] or gopls prefixes.

Describe the bug

I ran through vscode bisect and identified that the Go extension was causing vscode to terminate.
Other than a gif of the behavior (which is just typing "package main" and then vscode is terminated) not sure what else I can provide initially.

Steps to reproduce the behavior:

I'm not sure yet how to reproduce in any other public repos, but will update this issue as soon as I can.

I was able to see a few prefacing steps on the gopls (server) output window right before the crash.

unable to to compute positions for type errors: type error ("package ; expected main", code 3, go116=true) without position
	package="myrepo/magefiles"

I used the Go tools command to install the latest version of Gopls using vscode directly instead of my preferred aqua-proj tool installer. When running from my terminal which -a gopls I confirmed the highest ranking item in my path was the go/bin directory and not the other tool. The behavior was still the same.

@gopherbot gopherbot added this to the Untriaged milestone Jan 25, 2023
@hyangah
Copy link
Contributor

hyangah commented Jan 25, 2023

Gopls or extension causing the whole vscode window to crash is strange.

Gopls calls go commands many times, and the type errors is likely from the go command.
I guess that the go command (/Users/myuser/.local/share/aquaproj-aqua/bin/go) is still aqua managed. We've seen multiple aqua users who reported vscode window crashes, but the underlying issue for the previous cases should be fixed with aqua v1.6.0, aqua-proxy v1.1.0 (aqua #710). What is the version of Aqua?

@findleyr findleyr added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Jan 26, 2023
@gopherbot
Copy link
Collaborator

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

@golang golang locked and limited conversation to collaborators Feb 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants