[Lldb-commits] [PATCH] D21296: [lldb] Fixed race condition on private state thread exit, take 2

Cameron via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 14 09:13:22 PDT 2016

cameron314 added a comment.

Thanks everyone :-)

Ah, yeah, sorry if I gave the wrong impression, but that comment is not specific to Linux (in fact, I've only seen it once, on Windows). At one point the debugger had entered ControlPrivateStateThread on one thread to stop it, seen that the thread was already in an invalid state (it was), and assumed that meant that the thread was already exiting and did a join without sending the stop. But the state thread somehow wasn't on its way out yet, it was stuck waiting for a control event first (this is the part that I'm not sure should be possible, but empirically is). This caused a deadlock. So I changed my patch to always send the event if the thread is joinable, not just if its state is valid, and left that comment to explain why this must remain so.


More information about the lldb-commits mailing list