[Lldb-commits] [PATCH] Fix deadlock in operation thread in NativeProcessLinux
ovyalov at google.com
Fri Mar 6 18:45:18 PST 2015
Comment at: source/Plugins/Process/Linux/NativeProcessLinux.cpp:3563
@@ -3558,3 +3562,3 @@
> ovyalov wrote:
> > Monitoring thread uses Cancel as well - should we redesign it for Android?
> In long run possibly yes, but it already have a lot of logic to stop it in different cases and I haven't seen a case when the cancel is actually have effect yet. I have a design to replace it on android but it is a bit nasty so I hold it back until it isn't cause any issue with the hope that we will find a better solution.
Monitoring thread cancellation definitely affects Detach request on Android - NativeProcessLinux::Detach after issuing PTRACE_DETACH calls StopMonitor and eventually becomes deadlocked on m_monitor_thread.Join(nullptr);
We should take care of this case since lldb on host side hangs in such situation - it's another issue why host lldb hangs forever in this case because detach seems to be timeout-based operation:
Quitting LLDB will detach from one or more processes. Do you really want to proceed: [Y/n] Y
Process::SetExitStatus (status=6 (0x00000006), description="failed to send the k packet")
Process::ControlPrivateStateThread (signal = 1)
Sending control event of type: 1.
Timed out responding to the control event, cancel got error: "(null)".
More information about the lldb-commits