Skip to content
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

testing/synctest: "all goroutines in bubble are blocked" should list blocked goroutines #70911

Open
neild opened this issue Dec 18, 2024 · 1 comment

Comments

@neild
Copy link
Contributor

neild commented Dec 18, 2024

When all the goroutines in a synctest bubble are durably blocked and no progress can be made, synctest.Run panics. This is essentially a more limited version of the runtime's fatal error "all goroutines are asleep - deadlock!".

Currently, when this panic occurs in a test, by default you see a stack trace for the goroutine which called synctest.Run, but not for any other goroutines. This isn't especially useful. You can set GOTRACEBACK=all to see more stacks, but you shouldn't have to.

I think that ideally in this case you'd get stack traces for all goroutines in the bubble causing the panic, but not for anything else.

I'm not sure yet what the right way to implement this is: Should the panic from synctest.Run contain the relevant stack traces? Should synctest.Run print the stacks itself before panicing? Should the testing package detect the synctest.Run panic and handle printing the relevant stacks itself?

@gabyhelp
Copy link

Related Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants