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: stuck on "Setting up workspace: Loading packages..." #42255

Closed
mxpaspa opened this issue Oct 28, 2020 · 23 comments
Closed

x/tools/gopls: stuck on "Setting up workspace: Loading packages..." #42255

mxpaspa opened this issue Oct 28, 2020 · 23 comments

Comments

@mxpaspa
Copy link

@mxpaspa mxpaspa commented Oct 28, 2020

  • go version- 1.15.3
  • vs code version 1.50.1
  • extension version 0.18.0
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/maxpaspa@ibm.com/Library/Caches/go-build"
GOENV="/Users/maxpaspa@ibm.com/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/maxpaspa@ibm.com/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/maxpaspa@ibm.com/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.15.3/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.15.3/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/maxpaspa@ibm.com/go/src/github.com/redhat-marketplace-operator/go.mod"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/c1/ym_2q3ls1z5gfcylg1dcb_240000gn/T/go-build950413556=/tmp/go-build -gno-record-gcc-switches -fno-c
    "go.alternateTools": {
        "go-langserver": "gopls"
      },
      "go.languageServerFlags": [
        "serve",
        "-rpc.trace",
        "--debug=localhost:6060",
      ],
      "go.languageServerExperimentalFeatures": {
        "autoComplete": true,
        "documentSymbols": true,
        "findReferences": true,
        "goToDefinition": true,
        "goToTypeDefinition": true,
        "hover": true,
        "signatureHelp": true,
        "rename": true,
        "workspaceSymbols": true,
    },
    "go.formatTool": "goimports",
    "go.autocompleteUnimportedPackages": false,
    "go.buildOnSave": "on",
    "go.vetOnSave": "off",
    "go.useCodeSnippetsOnFunctionSuggest": true,
    "go.useCodeSnippetsOnFunctionSuggestWithoutType": true,
    "go.useLanguageServer": true,

Describe the bug

I upgraded to go 1.15.3, updated golang tools including the Go extension and the extension is stuck on "Loading packages..."

Screenshots or recordings

If applicable, add screenshots or recordings to help explain your problem.
image

@stamblerre stamblerre transferred this issue from golang/vscode-go Oct 28, 2020
@stamblerre stamblerre changed the title Go extension stuck on: "Setting up workspace: Loading packages..." x/tools/gopls: stuck on "Setting up workspace: Loading packages..." Oct 28, 2020
@gopherbot gopherbot added this to the Unreleased milestone Oct 28, 2020
@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Oct 28, 2020

Thanks for the report! Can you please share the gopls log from when you see this happen? See https://github.com/golang/tools/blob/master/gopls/doc/troubleshooting.md#capturing-logs for instructions on how to capture the log.

@mxpaspa
Copy link
Author

@mxpaspa mxpaspa commented Oct 28, 2020

Thanks for the report! Can you please share the gopls log from when you see this happen? See https://github.com/golang/tools/blob/master/gopls/doc/troubleshooting.md#capturing-logs for instructions on how to capture the log.

Thanks for the quick reply. @stamblerre Here is the output:

[Trace - 11:34:51.308 AM] Sending request 'initialize - (0)'.
Params: {"processId":1631,"clientInfo":{"name":"vscode","version":"1.50.1"},"rootPath":"/Users/maxpaspa@ibm.com/go/src/github.com/redhat-marketplace-operator","rootUri":"file:///Users/maxpaspa%40ibm.com/go/src/github.com/redhat-marketplace-operator","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional"},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"executeCommand":{"dynamicRegistration":true},"configuration":true,"workspaceFolders":true},"textDocument":{"publishDiagnostics":{"relatedInformation":true,"versionSupport":false,"tagSupport":{"valueSet":[1,2]},"complexDiagnosticCodeSupport":true},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true,"tagSupport":{"valueSet":[1]},"insertReplaceSupport":true,"resolveAdditionalTextEditsSupport":true},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true},"activeParameterSupport":true},"contextSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true,"tagSupport":{"valueSet":[1]}},"codeAction":{"dynamicRegistration":true,"isPreferredSupport":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"selectionRange":{"dynamicRegistration":true},"callHierarchy":{"dynamicRegistration":true},"semanticTokens":{"dynamicRegistration":true,"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","member","macro","keyword","modifier","comment","string","number","regexp","operator"],"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"formats":["relative"],"requests":{"range":true,"full":{"delta":true}}}},"window":{"workDoneProgress":true}},"initializationOptions":{},"trace":"off","workspaceFolders":[{"uri":"file:///Users/maxpaspa%40ibm.com/go/src/github.com/redhat-marketplace-operator","name":"redhat-marketplace-operator"}]}


[Trace - 11:34:51.310 AM] Received response 'initialize - (0)' in 1ms.
Result: {"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{}},"completionProvider":{"triggerCharacters":["."]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"typeDefinitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":{"codeActionKinds":["quickfix","refactor.extract","refactor.rewrite","source.fixAll","source.organizeImports"]},"codeLensProvider":{},"documentLinkProvider":{},"workspaceSymbolProvider":true,"documentFormattingProvider":true,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":""},"renameProvider":{"prepareProvider":true},"foldingRangeProvider":true,"executeCommandProvider":{"commands":["generate","fill_struct","regenerate_cgo","test","tidy","undeclared_name","upgrade_dependency","vendor","extract_variable","extract_function","gc_details","generate_gopls_mod"]},"callHierarchyProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"}}},"serverInfo":{"name":"gopls","version":"Build info\n----------\ngolang.org/x/tools/gopls v0.5.1\n    golang.org/x/tools/gopls@v0.5.1 h1:AF3Uh7HF08SZpKFfgJO6zfF3bbxyDXWqdkK4kMXiQ1o=\n    github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=\n    github.com/google/go-cmp@v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=\n    github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=\n    golang.org/x/mod@v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=\n    golang.org/x/sync@v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=\n    golang.org/x/tools@v0.0.0-20200930165741-f1523d29dbb9 h1:1R38tQp22dcHpTKJPjgVa16FhlDy/kHEaCM/ndi/FIc=\n    golang.org/x/xerrors@v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=\n    honnef.co/go/tools@v0.0.1-2020.1.5 h1:nI5egYTGJakVyOryqLs1cQO5dO0ksin5XXs2pspk75k=\n    mvdan.cc/gofumpt@v0.0.0-20200802201014-ab5a8192947d h1:t8TAw9WgTLghti7RYkpPmqk4JtQ3+wcP5GgZqgWeWLQ=\n    mvdan.cc/xurls/v2@v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=\n"}}


[Trace - 11:34:51.312 AM] Sending notification 'initialized'.
Params: {}


[Trace - 11:34:51.313 AM] Received request 'window/workDoneProgress/create - (1)'.
Params: {"token":"5577006791947779410"}


[Trace - 11:34:51.313 AM] Sending response 'window/workDoneProgress/create - (1)' in 0ms.
Result: 


[Trace - 11:34:51.313 AM] Received notification '$/progress'.
Params: {"token":"5577006791947779410","value":{"kind":"begin","title":"Setting up workspace","message":"Loading packages..."}}


[Trace - 11:34:51.313 AM] Received request 'workspace/configuration - (2)'.
Params: {"items":[{"scopeUri":"file:///Users/maxpaspa@ibm.com/go/src/github.com/redhat-marketplace-operator","section":"gopls"},{"scopeUri":"file:///Users/maxpaspa@ibm.com/go/src/github.com/redhat-marketplace-operator","section":"gopls-redhat-marketplace-operator"}]}


[Trace - 11:34:51.316 AM] Sending response 'workspace/configuration - (2)' in 2ms.
Result: [null,null]


[Trace - 11:34:51.376 AM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/10/28 11:34:51 go env for /Users/maxpaspa@ibm.com/go/src/github.com/redhat-marketplace-operator\n(root /Users/maxpaspa@ibm.com/go/src/github.com/redhat-marketplace-operator)\n(go version go version go1.15.3 darwin/amd64\n)\n(valid build configuration = true)\n(build flags: [])\nGOROOT=/usr/local/Cellar/go/1.15.3/libexec\nGOINSECURE=\nGONOSUMDB=\nGOPRIVATE=\nGO111MODULE=\nGOFLAGS=\nGOMOD=/Users/maxpaspa@ibm.com/go/src/github.com/redhat-marketplace-operator/go.mod\nGOSUMDB=sum.golang.org\nGONOPROXY=\nGOMODCACHE=/Users/maxpaspa@ibm.com/go/pkg/mod\nGOPATH=/Users/maxpaspa@ibm.com/go\nGOPROXY=https://proxy.golang.org,direct\nGOCACHE=/Users/maxpaspa@ibm.com/Library/Caches/go-build\n\n"}


[Trace - 11:34:51.376 AM] Received request 'client/registerCapability - (3)'.
Params: {"registrations":[{"id":"workspace/didChangeWatchedFiles-0","method":"workspace/didChangeWatchedFiles","registerOptions":{"watchers":[{"globPattern":"**/*.{go,mod,sum}","kind":7},{"globPattern":"/Users/maxpaspa@ibm.com/go/src/github.com/redhat-marketplace-operator/**/*.{go,mod,sum}","kind":7}]}}]}


[Info  - 11:34:51 AM] 2020/10/28 11:34:51 go env for /Users/maxpaspa@ibm.com/go/src/github.com/redhat-marketplace-operator
(root /Users/maxpaspa@ibm.com/go/src/github.com/redhat-marketplace-operator)
(go version go version go1.15.3 darwin/amd64
)
(valid build configuration = true)
(build flags: [])
GOROOT=/usr/local/Cellar/go/1.15.3/libexec
GOINSECURE=
GONOSUMDB=
GOPRIVATE=
GO111MODULE=
GOFLAGS=
GOMOD=/Users/maxpaspa@ibm.com/go/src/github.com/redhat-marketplace-operator/go.mod
GOSUMDB=sum.golang.org
GONOPROXY=
GOMODCACHE=/Users/maxpaspa@ibm.com/go/pkg/mod
GOPATH=/Users/maxpaspa@ibm.com/go
GOPROXY=https://proxy.golang.org,direct
GOCACHE=/Users/maxpaspa@ibm.com/Library/Caches/go-build


[Trace - 11:34:51.377 AM] Sending response 'client/registerCapability - (3)' in 0ms.
Result: 


[Trace - 11:34:51.377 AM] Received request 'client/registerCapability - (4)'.
Params: {"registrations":[{"id":"workspace/didChangeConfiguration","method":"workspace/didChangeConfiguration"},{"id":"workspace/didChangeWorkspaceFolders","method":"workspace/didChangeWorkspaceFolders"}]}


[Trace - 11:34:51.377 AM] Sending response 'client/registerCapability - (4)' in 0ms.
Result: 
@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Oct 28, 2020

Is there anything more after the registerCapability? These requests are part of the gopls initialization, so I'd expect to see a bit more here.

@mxpaspa
Copy link
Author

@mxpaspa mxpaspa commented Oct 28, 2020

I'm not seeing anything past that:
image

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Oct 28, 2020

Thanks for clarifying. A few things to try, suggested by @hyangah:

  1. Can you try downgrading your version of the VS Code Go extension to 0.17.x? Does that change anything?
  2. Can you try running the "Developer: Open Process Explorer" command to see what gopls is doing? You can access the command through the Command Palette (Ctrl + Shift + P).
  3. Can you try adding more verbose logging on the gopls side? There is a "verboseOutput" configuration you can add:
"gopls": {
     "verboseOutput": true
}
  1. Can you look in the gopls output channel? (Not gopls (server).) These are the client-side logs.
@mxpaspa
Copy link
Author

@mxpaspa mxpaspa commented Oct 28, 2020

  • here is the output from process explorer:
CPU %	Memory (MB)	PID	Name
6	98	1762	code main
4	66	1809	     gpu-process
0	16	1810	     utility
0	66	1851	     shared-process
2	229	1997	     window (/Users/maxpaspa@ibm.com/Library/Application Support/Code/User/settings.json)
0	131	2000	         extensionHost
0	66	2008	             /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Renderer).app/Contents/MacOS/Code Helper (Renderer) /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=2000
0	49	2013	             electron_node server.js 
0	16	3695	             /Users/maxpaspa@ibm.com/go/bin/gopls -mode=stdio serve -rpc.trace --debug=localhost:6060
99	3441	3699	                 go list -modfile=/var/folders/c1/ym_2q3ls1z5gfcylg1dcb_240000gn/T/go.9a4c4fe73e77b55a9304b88458b00ac8455523fe3e0a9246b1cbcd42034adf7c.443595658.mod -e -json -compiled=true -test=true -export=false -deps=true -find=false -- builtin github.com/redhat-marketplace/redhat-marketplace-operator/...
0	49	2001	         watcherService
0	0	3009	         /bin/zsh -l
0	0	3070	             /bin/zsh -l
0	82	3706	     window (Process Explorer)
0	0	3868	     /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command=
  • I actually tried the previous version of the extension and go, but neither seemed to have an affect.
@mxpaspa
Copy link
Author

@mxpaspa mxpaspa commented Oct 28, 2020

am I adding this to settings.json in vscode ?

"gopls": {
     "verboseOutput": true
}

In any case there is no output for "gopls"

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Oct 28, 2020

am I adding this to settings.json in vscode ?

"gopls": {
     "verboseOutput": true
}

Yep, that's correct.

But thanks for the output of the process explorer command. I tried to reproduce with the same repository, and it did take a long time for the packages to be loaded. How long are you waiting before looking at the logs?

@mxpaspa
Copy link
Author

@mxpaspa mxpaspa commented Oct 28, 2020

I've let it run for 30 mins minimum and have had it run for up to an an hour.

How long did it take for you ?

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Oct 28, 2020

Ah, it only took me a minute or two with a clean module cache. Have you tried "Developer: Reload Window" to try restarting it?

@mxpaspa
Copy link
Author

@mxpaspa mxpaspa commented Oct 28, 2020

yea, I've retried restarting the window, a system restart as well...any other ideas ?

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Oct 28, 2020

One last thing to try might be go clean -modcache and then reloading the window.

It does seem like you may have run into something similar to #42132. I would make sure you kill the gopls and go list processes above (PIDs 3695 and 3699 from your screenshot above) before reloading.

/cc @heschik

@mxpaspa
Copy link
Author

@mxpaspa mxpaspa commented Oct 29, 2020

I tried running the command from process 3699 and it's just never returning, so I think you may be right on the similarity to 42132
image

@heschik
Copy link
Contributor

@heschik heschik commented Oct 29, 2020

If you can reliably reproduce the problem that's pretty interesting. Please run the command with -x and upload the logs. If it hangs for a long time with no output, send it a SIGQUIT with kill -QUIT <pid of "go"> and upload the resulting stack trace too.

cc @bcmills @jayconrod

@mxpaspa
Copy link
Author

@mxpaspa mxpaspa commented Oct 29, 2020

@heschik I tried using gopls version 0.5.0 to no avail. go list ... still hangs:

With version 0.5.0, the process explorer output

CPU %	Memory (MB)	PID	Name
3	98	1574	code main
3	66	1621	     gpu-process
0	16	1623	     utility
0	98	1676	     shared-process
2	246	5276	     window (/Users/maxpaspa@ibm.com/Library/Application Support/Code/User/settings.json)
0	147	5279	         extensionHost
0	82	5287	             /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Renderer).app/Contents/MacOS/Code Helper (Renderer) /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=5279
0	49	5290	             electron_node server.js 
0	16	6236	             /Users/maxpaspa@ibm.com/go/bin/gopls -mode=stdio serve -rpc.trace --debug=localhost:6060
107	279	6241	                 go list -modfile=/var/folders/c1/ym_2q3ls1z5gfcylg1dcb_240000gn/T/go.9a4c4fe73e77b55a9304b88458b00ac8455523fe3e0a9246b1cbcd42034adf7c.538504595.mod -e -json -compiled=true -test=true -export=false -deps=true -find=false -modfile=/var/folders/c1/ym_2q3ls1z5gfcylg1dcb_240000gn/T/go.9a4c4fe73e77b55a9304b88458b00ac8455523fe3e0a9246b1cbcd42034adf7c.538504595.mod -- ./... builtin
0	49	5280	         watcherService
0	0	5973	         /bin/zsh -l
0	0	6034	             /bin/zsh -l
0	66	6245	     window (Process Explorer)
0	0	6253	     /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command=

running comand in terminal:
go list -modfile=/var/folders/c1/ym_2q3ls1z5gfcylg1dcb_240000gn/T/go.9a4c4fe73e77b55a9304b88458b00ac8455523fe3e0a9246b1cbcd42034adf7c.538504595.mod -e -json -compiled=true -test=true -export=false -deps=true -find=false -modfile=/var/folders/c1/ym_2q3ls1z5gfcylg1dcb_240000gn/T/go.9a4c4fe73e77b55a9304b88458b00ac8455523fe3e0a9246b1cbcd42034adf7c.538504595.mod -- ./... builtin -x

killed process of go list -modfile...:

SIGQUIT: quit
PC=0x7fff6f296882 m=0 sigcode=0

goroutine 0 [idle]:
runtime.pthread_cond_wait(0x19dc0e0, 0x19dc0a0, 0x0)
	/usr/local/Cellar/go/1.15.3/libexec/src/runtime/sys_darwin.go:414 +0x39
runtime.semasleep(0xffffffffffffffff, 0x1040465)
	/usr/local/Cellar/go/1.15.3/libexec/src/runtime/os_darwin.go:63 +0x8d
runtime.notesleep(0x19dbea8)
	/usr/local/Cellar/go/1.15.3/libexec/src/runtime/lock_sema.go:181 +0xe7
runtime.stopm()
	/usr/local/Cellar/go/1.15.3/libexec/src/runtime/proc.go:1910 +0xc5
runtime.findrunnable(0xc000046000, 0x0)
	/usr/local/Cellar/go/1.15.3/libexec/src/runtime/proc.go:2471 +0xa7f
runtime.schedule()
	/usr/local/Cellar/go/1.15.3/libexec/src/runtime/proc.go:2669 +0x2d7
runtime.park_m(0xc000402300)
	/usr/local/Cellar/go/1.15.3/libexec/src/runtime/proc.go:2837 +0x9d
runtime.mcall(0x106a6b6)
	/usr/local/Cellar/go/1.15.3/libexec/src/runtime/asm_amd64.s:318 +0x5b

goroutine 1 [running]:
	goroutine running on other thread; stack unavailable

rax    0x104
rbx    0x2
rcx    0x7ffeefbff158
rdx    0x8cfc00
rdi    0x19dc0e0
rsi    0x8cfc01008cfd00
rbp    0x7ffeefbff1f0
rsp    0x7ffeefbff158
r8     0x0
r9     0xa0
r10    0x0
r11    0x202
r12    0x19dc0e0
r13    0x16
r14    0x8cfc01008cfd00
r15    0x95a3dc0
rip    0x7fff6f296882
rflags 0x203
cs     0x7
fs     0x0
gs     0x0
@heschik
Copy link
Contributor

@heschik heschik commented Oct 29, 2020

Ugh. goroutine 1 is, of course, the one we need. Sorry, but can you run the go list command with GOTRACEBACK=crash and then kill it again?

Can you check that you don't have any strange symlinks set up, or huge directories inside the module?

@mxpaspa
Copy link
Author

@mxpaspa mxpaspa commented Oct 29, 2020

do you run that command with GOTRACEBACK... like this ?

env GOTRACEBACK=crash go list -modfile=/var/folders ...

That gave a long output. Do you want the whole thing ?

@heschik
Copy link
Contributor

@heschik heschik commented Oct 29, 2020

If it succeeded, it's not interesting. That environment setting should allow us to get a full traceback using kill -QUIT, but if it doesn't hang there's nothing to see.

@mxpaspa
Copy link
Author

@mxpaspa mxpaspa commented Oct 29, 2020

I'm saying when I killed it, it gave a long output...

@heschik
Copy link
Contributor

@heschik heschik commented Oct 29, 2020

Oh. Yes, I want the whole thing, please. Upload it to a gist if it's really huge?

@mxpaspa
Copy link
Author

@mxpaspa mxpaspa commented Oct 29, 2020

@heschik I just nuked the repo and cloned again. gopls is working fine now...Sorry if that ruins the test.

If it starts hanging again, I'll ping you. Thanks for the help.

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Oct 30, 2020

I'm glad it's working again. It sounds like the deadline suggested in #42132 might solve the issue of go list hanging once, but if it gets into a state where it always hangs, I'm not sure that gopls could handle that.

Since things are working again, I'm going to go ahead and close this as a duplicate of #42132, but please open a new issue if you see this again and can reproduce it.

@stamblerre stamblerre closed this Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants