-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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/trace: "preempted" StateTransition sometimes has Stack of single zeroed StackFrame #68090
Comments
I have a suspicion as to how this is happening, but not a complete picture yet. The problematic transition you point out also happens from a thread stack. The two cases where such a transition may appear are I suspect that in one of these paths, |
#68093 may be related, but I suspect not. |
Here's a simple reproducer:
It disproves my theory about |
OK, I figured it out. It's that the stack trace has exactly 1 frame in it, but the In the reproducer, the victim goroutine is the GC mark worker (just like in the original post) and when I lower the skip count from 1 to 0, I see:
Unfortunately, there's still the question as to why the bottom frame in the mark worker isn't showing up. |
Go version
go version devel go1.23-477ad7dd51 Thu Jun 20 16:46:54 2024 +0000 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
What did you see happen?
Some StateTransition Events include a Stack and StateTransition.Stack that are not equal to NoStack, but which also don't contain a stack from the Event's goroutine. Instead, they yield a single zeroed StackFrame (PC of 0x0, Line of 0, File and Func of "").
I've only seen this on
Running->Runnable
transitions, withReason="preempted"
.It's also present in go1.22.4.
Here's the sort of stack I'd expect to see from that execution trace's view of goroutines 25, 26, and 2881:
What did you expect to see?
I expected the stack to be trace.NoStack when no stack was available, or for the stack to contain PC/Func/File/Line corresponding to code that the goroutine had on its stack. I should not see PC of 0x0.
CC @mknyszek @golang/runtime
The text was updated successfully, but these errors were encountered: