Index: source/Commands/CommandObjectThread.cpp =================================================================== --- source/Commands/CommandObjectThread.cpp +++ source/Commands/CommandObjectThread.cpp @@ -72,15 +72,18 @@ else if (command.GetArgumentCount() == 1 && ::strcmp (command.GetArgumentAtIndex(0), "all") == 0) { Process *process = m_exe_ctx.GetProcessPtr(); - uint32_t idx = 0; - for (ThreadSP thread_sp : process->Threads()) + + // Manually iterate to avoid locking the threadlist, + // which can cause deadlocks when JIT-ing code + ThreadList thread_list = process->GetThreadList(); + for (uint32_t idx = 0; idx < thread_list.GetSize(); ++idx) { + ThreadSP thread_sp = thread_list.GetThreadAtIndex(idx); if (idx != 0 && m_add_return) result.AppendMessage(""); if (!HandleOneThread(*(thread_sp.get()), result)) return false; - ++idx; } } else