rust-lang / miri

An interpreter for Rust's mid-level intermediate representation
Apache License 2.0
4.31k stars 327 forks source link

Improve deadlock diagnostics #3424

Closed RalfJung closed 4 months ago

RalfJung commented 5 months ago

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.