-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: crash in analysisNode.typeCheck #64227
Comments
Hi, thanks very much for the report. Is this reproducible on your end, or did restarting the language server make it go away? |
Hi, |
Hi, reopening since all crashes warrant investigation. If it didn't reoccur upon restart, that may just suggest that there is an internal race that is rare. |
@adonovan the crash is on this line: In Therefore, it seems that it must be the case that the |
How can I help with your investigation? |
@husamettinarabaci do you happen to use Bazel/rules_go in the project that was having this issue? |
@JamyDev https://bazel.build/ did you mean this? |
Yeah, I mentioned this because we had the exact same error with the bazel toolchain active. But if you're not using it, it's unlikely to be the root cause. |
EDIT: nevermind, I see now that that was addressed in bazel-contrib/rules_go#3777 |
The possible dup at golang/vscode-go#3126 raises the question of whether this is a package cycle that somehow slipped through the cycle breaking in detectImportCycles. |
So, one observation: the repro in golang/vscode-go#3126 had a self-cycle, and detectImportCycles/breakImportCycles appears not to work for 1-cycles. Furthermore, If (1) go/packages could be tricked to return a 1-cycle, or (2) we somehow got a self reference in the export data manifest, it would result in this crash. But of course I only need such a long explanation because I don't have a repro, despite my attempts. |
Change https://go.dev/cl/560463 mentions this issue: |
This change causes the metadata graph to assert that it is acyclic before applying the updates. This should be an invariant, but the attached issues make us skeptical. Updates golang/go#64227 Updates golang/vscode-go#3126 Change-Id: I40b4fd06fcf2c64594b34b8c300f20ca0676d0fa Reviewed-on: https://go-review.googlesource.com/c/tools/+/560463 Reviewed-by: Robert Findley <rfindley@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Change https://go.dev/cl/622038 mentions this issue: |
gopls version: v0.14.1 (go1.21.3)
gopls flags:
update flags: proxy
extension version: 0.39.1
go version: 1.21.3
environment: code-server linux
initialization error: undefined
issue timestamp: Mon, 06 Nov 2023 07:04:10 GMT
restart history:
Mon, 06 Nov 2023 07:03:37 GMT: activation (enabled: true)
ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.
Describe what you observed.
OPTIONAL: If you would like to share more information, you can attach your complete gopls logs.
NOTE: THESE MAY CONTAIN SENSITIVE INFORMATION ABOUT YOUR CODEBASE.
DO NOT SHARE LOGS IF YOU ARE WORKING IN A PRIVATE REPOSITORY.
<OPTIONAL: ATTACH LOGS HERE>
The text was updated successfully, but these errors were encountered: