Skip to content

Improve deadlock diagnostics #3424

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

Closed
RalfJung opened this issue Mar 27, 2024 · 0 comments · Fixed by #3472
Closed

Improve deadlock diagnostics #3424

RalfJung opened this issue Mar 27, 2024 · 0 comments · Fixed by #3472
Labels
A-concurrency Area: affects our concurrency (multi-thread) support A-diagnostics errors and warnings emitted by miri C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement E-good-first-issue A good way to start contributing, mentoring is available

Comments

@RalfJung
Copy link
Member

We only report a deadlock when all threads are blocked. But we only show a backtrace of the last thread that took a step, which may even be the empty backtrace if that thread is now done.

We should probably show a backtrace of all remaining (non-terminated) threads instead. And maybe we can even show what they are blocked on. That will require tracking a bit more information in the thread state -- but doing so would be good anyway as it can help sanity-check that on unblockng we are talking about the right thread.

@RalfJung RalfJung added C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement A-diagnostics errors and warnings emitted by miri labels Mar 27, 2024
@RalfJung RalfJung added the A-concurrency Area: affects our concurrency (multi-thread) support label Mar 27, 2024
@RalfJung RalfJung added the E-good-first-issue A good way to start contributing, mentoring is available label Apr 9, 2024
bors added a commit that referenced this issue Apr 16, 2024
deadlock: show backtrace for all threads

Fixes #3424
@bors bors closed this as completed in bdfc0b6 Apr 16, 2024
RalfJung pushed a commit to RalfJung/rust that referenced this issue Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-concurrency Area: affects our concurrency (multi-thread) support A-diagnostics errors and warnings emitted by miri C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement E-good-first-issue A good way to start contributing, mentoring is available
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant