-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Navigating the stack in a coredump resulting from a stack overflow is slow #3809
Comments
Yes, making a stack trace takes linear time (and, currently, memory) in the depth you ask for and there is no caching layer. |
Although I'm surprised that it takes minutes, how deep into the stack are you going? |
Pretty deep, millions of frames.
Does |
Yes, because there is no caching layer.
For up yes, for down probably not because it would introduce other problems. For your problem however, you would be better off doing a huge stack trace of 10 million frames and just look at that, instead of using up. It's still going to be slower than it should be but it's more tempting to optimized huge stack traces (possibly add something for infinite stack traces) than making up fast. |
Making a huge stack trace sadly won't work for my use case, since I need to print local variables/arguments in the bottom frames. |
I was debugging a coredump produced by a stack overflow recently, and I noticed that Delve gets increasingly slower as I go up the stack. I suspect that stack navigation commands in Delve (
up
,down
etc) could be linear in stack size. Does that sound right?I usually need to go to the top of the stack to understand what caused the stack overflow, and that easily takes minutes, because each step along the stack is slow (and is only getting slower).
I assume this should be fairly easy to reproduce, but let me know if you need more details.
What version of Delve are you using (
dlv version
)?1.23.0
What version of Go are you using? (
go version
)?go1.23-20240626-RC01
What operating system and processor architecture are you using?
Linux, x64
The text was updated successfully, but these errors were encountered: