-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
runtime: 'fatal error: traceback did not unwind completely' in debugCall #71144
Comments
cc @golang/runtime @golang/tools-team (for VS Code) @aarzilli @derekparker (for Delve) Is the debugger you are using in VS Code? (Or is that Goland?). Under the hood I think both use Delve, but I'm not sure. From the stack trace, we can see that it is running the injected call (via runtime.debugCallV2). It isn't immediately clear to me why this call panics, or why unwinding breaks. On the latter point, I wouldn't be surprised if unwinding of panics within a debug call is just completely broken. |
I tried reproducing this with delve from the command line and couldn't (from the screenshot this happens in goland but it's delve either way). I get this:
Did I evaluate the right expression? I'm not sure what you mean by "When I use Evaluate Expression to execute time.Now().Sub(), the program crashes. However, if I create the object in advance, there is no such issue." I tried with go 1.23.4 and 1.23.0 and delve version 1.24.0, there were changes around call injection in delve recently so maybe that's why. Is this crash deterministic or not?
Call injection is a really weird thing, unless you use it on a production environment it won't happen. |
PS. goland uses its own copy of delve, if you want to try updating you have to replace the dlv binary somewhere inside goland's install directory (I don't remember where it is, sorry). |
Go version
go1.23.0/amd64
This issue also exists in the latest version.
Output of
go env
in your module/workspace:What did you do?
This is a reproducible piece of code.
When I use Evaluate Expression to execute time.Now().Sub(), the program crashes. However, if I create the object in advance, there is no such issue.
I suspect that using Evaluate Expression might disrupt the order of method chaining or trigger some strange garbage collection behavior.
What's even more bizarre is that the code works perfectly fine when run directly, and the problem only occurs in the Evaluate Expression environment.
What I'm concerned about now is whether such an issue could be triggered in a production environment. If it can, that would be really scary.
![image](https://private-user-images.githubusercontent.com/20551946/400605688-2404f501-e4c3-444c-a519-b36732719018.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzczNTUzMDIsIm5iZiI6MTczNzM1NTAwMiwicGF0aCI6Ii8yMDU1MTk0Ni80MDA2MDU2ODgtMjQwNGY1MDEtZTRjMy00NDRjLWE1MTktYjM2NzMyNzE5MDE4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAxMjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMTIwVDA2MzY0MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY5YzI5M2U5OTYzODU0ZjA4MzY3ZjAwODE3ZTRhMWVlNDM1MjRmNzQ0ZTQwNzAwNzg5MWQ4ZDhkOGYxMDk3YjYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.AMqdjQS35PMFQp-fNsQsWNiM-RrX-KT5D0OfE1QmK7k)
What did you see happen?
What did you expect to see?
The program crashes when this situation occurs
The text was updated successfully, but these errors were encountered: