[Lldb-commits] [lldb] New ThreadPlanSingleThreadTimeout to resolve potential deadlock in single thread stepping (PR #90930)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 14 12:28:20 PDT 2024
jeffreytan81 wrote:
The GDB packet log is very useful (especially with a good run log at the top to compare).
I read with @clayborg . The log indicates that "self.thread.StepOver(lldb.eOnlyThisThread)" sent a "$vCont;c:p1a24.1a24" to continue single thread at the end but lacking a "\x03" async interrupt packet (which can be found in the good log at the top). The async interrupt should be sent by `ThreadPlanSingleThreadTimeout::TimeoutThreadFunc()` timer thread after timeout. Further reading the code, we found that there is a potential race that timer thread checks the m_isAlive flag before it was initialized.
Created https://github.com/llvm/llvm-project/pull/104195 to fix the race.
https://github.com/llvm/llvm-project/pull/90930
More information about the lldb-commits
mailing list