-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime: does not traceback goroutine in systemstack #10546
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
Comments
/cc @rsc @RLH @aclements |
freezetheworld can't force a return from the system stack. The signal handler runs on the same M as the user code, so the user code can't make any forward progress. A simple fix to this problem is to print the stack if the G's M is identical to the caller's M. The G can't be running, and crucially modifying its stack, if that is the case. (Unless of course the two Gs are identical, but we already skip printing in that case.) |
CL https://golang.org/cl/9435 mentions this issue. |
I still got "goroutine running on other thread; stack unavailable" 2 times out of 6. |
CL https://golang.org/cl/9551 mentions this issue. |
Run the following program:
and kill it with SIGABRT. Most of the it crashes as follows. I.e. stack of the main goroutine is not unwound.
The main goroutine is actually at this point:
This makes it very hard to debug hanging programs. The stack must be unwound.
We leave g in running status during systemstack. This is probably part of the problem. Another part is why the goroutine does not return from systemstack during freezetheworld.
The text was updated successfully, but these errors were encountered: