-
Notifications
You must be signed in to change notification settings - Fork 732
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
gopls: crash with test variant of command-line-arguments package #3207
Comments
Hi @findleyr, thanks for your reply. Here is the panicking stack, please let me know if you need further information.
|
Thanks very much and... wow. Are you by any chance working in open source, so that we could reproduce this crash in your workspace? This is a very strange failure mode (for a bit of context, somehow gopls is loading a test package for a "script"). This panic does not occur with gopls@v0.14.2, I assume? In that case, can you try adding |
I'm using I'm contributing to k8s test infra as well but I'm not sure if there are any steps that I can reproduce it on purpose. what is your suggestion to investigate more on the reason of this issue? |
Update: I have tried different cases and seems this issue only happens when I open the go-test file and only in one newly created git branch and other branches are working correctly, I'm not sure where is the source of this issue but I would be happy to help on investigate more and solve it. |
Thanks @amirrmonfared. We will definitely fix this one way or another (we can always avoid the panic), but we'd really like to understand it, as it violates several core assumptions:
So this sounds like a bug in go/packages. Is the repo that reproduces this bug open source? If not, can you say more about the diff on the branch that reproduces the bug? Are there any files with build tags ("//go:build ...")? Is there anything special, in particular, about the go test file that causes the crash? If possible, could you share just the header of that file: the package declaration and imports? (feel free to redact or obfuscate any proprietary import names). Since this is reproducible I can also put together a patched gopls with more debugging output that can help narrow down the problem. However, today is a Google holiday so I won't be able to do that until Monday. Interestingly, golang/go#66109 is a dupe with the exact same package ID in the panic, so it may be something special about the easyjson package that exacerbates this bug. |
Thanks a lot @findleyr for your support, as it's a duplicate of golang/go#66109 let's close it and follow up on this issue there |
gopls version: v0.15.1/go1.21.6
gopls flags:
update flags: proxy
extension version: 0.41.1
environment: Visual Studio Code darwin
initialization error: undefined
issue timestamp: Thu, 29 Feb 2024 12:47:42 GMT
restart history:
Thu, 29 Feb 2024 09:27:35 GMT: activation (enabled: true)
ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.
Describe what you observed.
Basically every time I do git pull or checkout this will happen
Please attach the stack trace from the crash.
A window with the error message should have popped up in the lower half of your screen.
Please copy the stack trace and error messages from that window and paste it in this issue.
Failed to auto-collect gopls trace: incomplete panic trace.
gopls stats -anon
{ "DirStats": { "Files": 11852, "TestdataFiles": 52, "GoFiles": 6693, "ModFiles": 4, "Dirs": 1641 }, "GOARCH": "arm64", "GOOS": "darwin", "GOPACKAGESDRIVER": "", "GOPLSCACHE": "", "GoVersion": "go1.21.6", "GoplsVersion": "v0.15.1", "InitialWorkspaceLoadDuration": "2.430264625s", "MemStats": { "HeapAlloc": 329135272, "HeapInUse": 401940480, "TotalAlloc": 2201666424 }, "WorkspaceStats": { "Files": { "Total": 6942, "Largest": 7361676, "Errs": 0 }, "Views": [ { "GoCommandVersion": "go1.21.6", "AllPackages": { "Packages": 1421, "LargestPackage": 214, "CompiledGoFiles": 8340, "Modules": 177 }, "WorkspacePackages": { "Packages": 593, "LargestPackage": 214, "CompiledGoFiles": 4090, "Modules": 1 }, "Diagnostics": 0 } ] } }The text was updated successfully, but these errors were encountered: