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/internal/lsp: gopls hangs in *cache.View.remove #31177

Closed
saibing opened this issue Apr 1, 2019 · 2 comments
Closed

x/tools/internal/lsp: gopls hangs in *cache.View.remove #31177

saibing opened this issue Apr 1, 2019 · 2 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@saibing
Copy link

saibing commented Apr 1, 2019

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

$ go version
go version go1.12.1 windows/amd64

Does this issue reproduce with the latest release?

yes

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

set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\d00257414\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=D:\git\go
set GOPROXY=http://goproxy.inhuawei.com:9090
set GORACE=
set GOROOT=D:\my\go
set GOTMPDIR=
set GOTOOLDIR=D:\my\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=NUL
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\D00257~1\AppData\Local\Temp\go-build130631910=/tmp/go-build -gno-record-gcc-switches

What did you do?

use vscode with gopls.

What did you expect to see?

gopls works well

What did you see instead?

The gopls has hung:

1 @ 0x55e1c1 0x5adb34 0x8acfe0 0x8acf2e 0x8acf2e 0x8acf2e 0x8acf2e 0x8acf2e 0x8acf2e 0x8acf2e 0x8acf2e 0x8acf2e 0x8acf2e 0x8acf2e 0x8acf2e 0x8acf2e 0x8acf2e 0x8acf2e 0x8acf2e 0x8acf2e 0x8acf2e 0x8acf2e 0x8acf2e 0x8acf2e 0x8acba9 0x8aead2 0x8ac95e 0x8a4f1c 0x8aa3a6 0x8b8ec3 0x8c25c2 0x5be303
#	0x55e1c0	path/filepath.ToSlash+0xa0						D:/my/go/src/path/filepath/path.go:165
#	0x5adb33	golang.org/x/tools/internal/span.FileURI+0x243				D:/git/go/source/tools/internal/span/uri.go:76
#	0x8acfdf	golang.org/x/tools/internal/lsp/cache.(*View).remove+0x21f		D:/git/go/source/tools/internal/lsp/cache/view.go:199
#	0x8acf2d	golang.org/x/tools/internal/lsp/cache.(*View).remove+0x16d		D:/git/go/source/tools/internal/lsp/cache/view.go:194
#	0x8acf2d	golang.org/x/tools/internal/lsp/cache.(*View).remove+0x16d		D:/git/go/source/tools/internal/lsp/cache/view.go:194
#	0x8acf2d	golang.org/x/tools/internal/lsp/cache.(*View).remove+0x16d		D:/git/go/source/tools/internal/lsp/cache/view.go:194
#	0x8acf2d	golang.org/x/tools/internal/lsp/cache.(*View).remove+0x16d		D:/git/go/source/tools/internal/lsp/cache/view.go:194
#	0x8acf2d	golang.org/x/tools/internal/lsp/cache.(*View).remove+0x16d		D:/git/go/source/tools/internal/lsp/cache/view.go:194
#	0x8acf2d	golang.org/x/tools/internal/lsp/cache.(*View).remove+0x16d		D:/git/go/source/tools/internal/lsp/cache/view.go:194
#	0x8acf2d	golang.org/x/tools/internal/lsp/cache.(*View).remove+0x16d		D:/git/go/source/tools/internal/lsp/cache/view.go:194
#	0x8acf2d	golang.org/x/tools/internal/lsp/cache.(*View).remove+0x16d		D:/git/go/source/tools/internal/lsp/cache/view.go:194
#	0x8acf2d	golang.org/x/tools/internal/lsp/cache.(*View).remove+0x16d		D:/git/go/source/tools/internal/lsp/cache/view.go:194
#	0x8acf2d	golang.org/x/tools/internal/lsp/cache.(*View).remove+0x16d		D:/git/go/source/tools/internal/lsp/cache/view.go:194
#	0x8acf2d	golang.org/x/tools/internal/lsp/cache.(*View).remove+0x16d		D:/git/go/source/tools/internal/lsp/cache/view.go:194
#	0x8acf2d	golang.org/x/tools/internal/lsp/cache.(*View).remove+0x16d		D:/git/go/source/tools/internal/lsp/cache/view.go:194
#	0x8acf2d	golang.org/x/tools/internal/lsp/cache.(*View).remove+0x16d		D:/git/go/source/tools/internal/lsp/cache/view.go:194
#	0x8acf2d	golang.org/x/tools/internal/lsp/cache.(*View).remove+0x16d		D:/git/go/source/tools/internal/lsp/cache/view.go:194
#	0x8acf2d	golang.org/x/tools/internal/lsp/cache.(*View).remove+0x16d		D:/git/go/source/tools/internal/lsp/cache/view.go:194
#	0x8acf2d	golang.org/x/tools/internal/lsp/cache.(*View).remove+0x16d		D:/git/go/source/tools/internal/lsp/cache/view.go:194
#	0x8acf2d	golang.org/x/tools/internal/lsp/cache.(*View).remove+0x16d		D:/git/go/source/tools/internal/lsp/cache/view.go:194
#	0x8acf2d	golang.org/x/tools/internal/lsp/cache.(*View).remove+0x16d		D:/git/go/source/tools/internal/lsp/cache/view.go:194
#	0x8acf2d	golang.org/x/tools/internal/lsp/cache.(*View).remove+0x16d		D:/git/go/source/tools/internal/lsp/cache/view.go:194
#	0x8acf2d	golang.org/x/tools/internal/lsp/cache.(*View).remove+0x16d		D:/git/go/source/tools/internal/lsp/cache/view.go:194
#	0x8acf2d	golang.org/x/tools/internal/lsp/cache.(*View).remove+0x16d		D:/git/go/source/tools/internal/lsp/cache/view.go:194
#	0x8acba8	golang.org/x/tools/internal/lsp/cache.(*View).applyContentChange+0x1a8	D:/git/go/source/tools/internal/lsp/cache/view.go:169
#	0x8aead1	golang.org/x/tools/internal/lsp/cache.(*View).SetContent.func1+0xa1	D:/git/go/source/tools/internal/lsp/cache/view.go:129
#	0x8ac95d	golang.org/x/tools/internal/lsp/cache.(*View).applyContentChanges+0x1cd	D:/git/go/source/tools/internal/lsp/cache/view.go:147
#	0x8a4f1b	golang.org/x/tools/internal/lsp/cache.(*View).parse+0xeb		D:/git/go/source/tools/internal/lsp/cache/check.go:27
#	0x8aa3a5	golang.org/x/tools/internal/lsp/cache.(*File).GetToken+0x145		D:/git/go/source/tools/internal/lsp/cache/file.go:65
#	0x8b8ec2	golang.org/x/tools/internal/lsp.newColumnMap+0x1b2			D:/git/go/source/tools/internal/lsp/format.go:60
#	0x8c25c1	golang.org/x/tools/internal/lsp.(*Server).CodeAction+0x121		D:/git/go/source/tools/internal/lsp/server.go:505
#	0x5be302	golang.org/x/tools/internal/lsp/protocol.serverHandler.func1+0x3d92	D:/git/go/source/tools/internal/lsp/protocol/server.go:283
@gopherbot gopherbot added this to the Unreleased milestone Apr 1, 2019
@saibing
Copy link
Author

saibing commented Apr 1, 2019

@stamblerre

@stamblerre stamblerre added the gopls Issues related to the Go language server, gopls. label Apr 1, 2019
@stamblerre stamblerre changed the title x/tools/internal/lsp: gopls long time no reponse x/tools/internal/lsp: gopls hangs in *cache.View.remove Apr 1, 2019
@gopherbot
Copy link

Change https://golang.org/cl/170182 mentions this issue: internal/lsp: avoid extra work in *cache.View.remove

@andybons andybons added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 1, 2019
@golang golang locked and limited conversation to collaborators Mar 31, 2020
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. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants