x/tools/gopls: panic in analysis #60551
What did you do?
Tried to open VSCode
What did you expect to see?
Normal working VSCode
What did you see instead?
Nothing works, can't run tests, can't go to definition. In console I can see
goroutine 111 [running]:
Editor and settings
The text was updated successfully, but these errors were encountered:
This change documents and asserts a few invariants that should be maintained by the code. The crash in golang/go#60551 shows that they are not, but I still can't see the mistake in my proof. Updates golang/go#60551 Change-Id: I833f7575f1d7372837ab5d7ba5988c94650ce07f Reviewed-on: https://go-review.googlesource.com/c/tools/+/500055 Auto-Submit: Alan Donovan <firstname.lastname@example.org> Run-TryBot: Alan Donovan <email@example.com> gopls-CI: kokoro <firstname.lastname@example.org> Reviewed-by: Robert Findley <email@example.com> TryBot-Result: Gopher Robot <firstname.lastname@example.org>
@KaurkerDevourer, would you mind installing the latest prerelease which contains additional assertions for this issue, and report whether the crashes you see have changed?
I don't expect the change to fix the bug, but it should give us more information. Thanks!
Hello. Sorry, just noticed updates on this issue. Actually, yes, now you got some more info =)
panic: analyzeSummary.Actions["asmdecl"] = (nil, false); got map[ctrlflow:0xc0013ef6e0 printf:0xc0013ef740] (#60551)
Sadly, project is not public.
But above the error I can see
Seems like now panic is expected.
Every panic has the exact same - "asmdecl", ctrlflow, printf
Thanks @KaurkerDevourer! I'm still looking into this, but it's worth knowing that we just made a significant reorganization of the analysis driver (primarily a performance optimization), and it looks like it touched many of the same elements that I think are likely responsible for the bug you reported here. So you might want to try building the very latest gopls@master and see if it makes any difference. (How often does the problem strike? How long would it take for you to notice whether today's change had any benefit?)
We (@findleyr and I) have still had no luck trying to come up with a hypothesis for the main issue here, and not for lack of trying: every piece of the old implementation looks sound. Unsatisfying though it is, we recommend that you try building from master (or using today's https://github.com/golang/tools/releases/tag/gopls%2Fv0.12.3-pre.1) and see if the problem persists. Please do let us know what you find.
Request textDocument/semanticTokens/full failed.
goroutine 5245 [running]:
This is very strange. There's clearly some confusion about the set of analyzers associated with a root node: the final loop of (*snapshot).Analyze expects the