<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">LLDB, connected to a stub I'm building, is trying to produce a stack trace of my stopped program but deadlocks instead:<div><br></div><div><div>#0<span class="Apple-tab-span" style="white-space:pre"> </span>__psynch_mutexwait ()<br>#1<span class="Apple-tab-span" style="white-space:pre"> </span>pthread_mutex_lock ()<br>#2<span class="Apple-tab-span" style="white-space:pre"> </span>lldb_private::Mutex::Lock() at lldb/source/Host/common/Mutex.cpp:281<br>#3<span class="Apple-tab-span" style="white-space:pre"> </span>lldb_private::Mutex::Locker::Lock(lldb_private::Mutex&) at lldb/source/Host/common/Mutex.cpp:152<br>#4<span class="Apple-tab-span" style="white-space:pre"> </span>lldb_private::Mutex::Locker::Locker(lldb_private::Mutex&) at lldb/source/Host/common/Mutex.cpp:112<br>#5<span class="Apple-tab-span" style="white-space:pre"> </span>lldb_private::Mutex::Locker::Locker(lldb_private::Mutex&) at lldb/source/Host/common/Mutex.cpp:113<br><b>#6<span class="Apple-tab-span" style="white-space:pre"> </span>lldb_private::Unwind::GetFrameCount() at lldb/include/lldb/Target/Unwind.h:51</b><br>#7<span class="Apple-tab-span" style="white-space:pre"> </span>UnwindMacOSXFrameBackchain::DoGetFrameInfoAtIndex(unsigned int, unsigned long long&, unsigned long long&) at lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp:59<br><b>#8<span class="Apple-tab-span" style="white-space:pre"> </span>lldb_private::Unwind::GetFrameInfoAtIndex(unsigned int, unsigned long long&, unsigned long long&) at lldb/include/lldb/Target/Unwind.h:78</b><br>#9<span class="Apple-tab-span" style="white-space:pre"> </span>lldb_private::StackFrameList::GetFramesUpTo(unsigned int) at lldb/source/Target/StackFrameList.cpp:304<br>#10<span class="Apple-tab-span" style="white-space:pre"> </span>lldb_private::StackFrameList::ResetCurrentInlinedDepth() at lldb/source/Target/StackFrameList.cpp:110<br>#11<span class="Apple-tab-span" style="white-space:pre"> </span>lldb_private::StackFrameList::CalculateCurrentInlinedDepth() at lldb/source/Target/StackFrameList.cpp:79<br>#12<span class="Apple-tab-span" style="white-space:pre"> </span>lldb_private::Thread::ShouldStop(lldb_private::Event*) at lldb/source/Target/Thread.cpp:752<br>#13<span class="Apple-tab-span" style="white-space:pre"> </span>lldb_private::ThreadList::ShouldStop(lldb_private::Event*) at lldb/source/Target/ThreadList.cpp:298<br>#14<span class="Apple-tab-span" style="white-space:pre"> </span>lldb_private::Process::ShouldBroadcastEvent(lldb_private::Event*) at lldb/source/Target/Process.cpp:3707<br>#15<span class="Apple-tab-span" style="white-space:pre"> </span>lldb_private::Process::HandlePrivateEvent(std::__1::shared_ptr<lldb_private::Event>&) at lldb/source/Target/Process.cpp:3936<br>#16<span class="Apple-tab-span" style="white-space:pre"> </span>lldb_private::Process::ConnectRemote(lldb_private::Stream*, char const*) at lldb/source/Target/Process.cpp:3257<br>#17<span class="Apple-tab-span" style="white-space:pre"> </span>CommandObjectProcessConnect::DoExecute(lldb_private::Args&, lldb_private::CommandReturnObject&) at lldb/source/Commands/CommandObjectProcess.cpp:1173<br>#18<span class="Apple-tab-span" style="white-space:pre"> </span>lldb_private::CommandObjectParsed::Execute(char const*, lldb_private::CommandReturnObject&) at lldb/source/Interpreter/CommandObject.cpp:1038<br>#19<span class="Apple-tab-span" style="white-space:pre"> </span>lldb_private::CommandInterpreter::HandleCommand(char const*, lldb_private::LazyBool, lldb_private::CommandReturnObject&, lldb_private::ExecutionContext*, bool, bool) at lldb/source/Interpreter/CommandInterpreter.cpp:1825<br>#20<span class="Apple-tab-span" style="white-space:pre"> </span>lldb_private::CommandObjectRegexCommand::DoExecute(char const*, lldb_private::CommandReturnObject&) at lldb/source/Interpreter/CommandObjectRegexCommand.cpp:89<br>#21<span class="Apple-tab-span" style="white-space:pre"> </span>lldb_private::CommandObjectRaw::Execute(char const*, lldb_private::CommandReturnObject&) at lldb/source/Interpreter/CommandObject.cpp:1064<br>#22<span class="Apple-tab-span" style="white-space:pre"> </span>lldb_private::CommandInterpreter::HandleCommand(char const*, lldb_private::LazyBool, lldb_private::CommandReturnObject&, lldb_private::ExecutionContext*, bool, bool) at lldb/source/Interpreter/CommandInterpreter.cpp:1825<br>#23<span class="Apple-tab-span" style="white-space:pre"> </span>lldb::SBCommandInterpreter::HandleCommand(char const*, lldb::SBCommandReturnObject&, bool) at lldb/source/API/SBCommandInterpreter.cpp:122<br>#24<span class="Apple-tab-span" style="white-space:pre"> </span>Driver::HandleIOEvent(lldb::SBEvent const&) at lldb/tools/driver/Driver.cpp:1083<br>#25<span class="Apple-tab-span" style="white-space:pre"> </span>Driver::MainLoop() at lldb/tools/driver/Driver.cpp:1556<br>#26<span class="Apple-tab-span" style="white-space:pre"> </span>main at lldb/tools/driver/Driver.cpp:1727<br>#27<span class="Apple-tab-span" style="white-space:pre"> </span>start ()<br><br></div></div><div>#8 locks m_unwind_mutex and #6 tries to do the same thing.</div><div><br></div><div>The code path is unconditional (calling GetFrameInfoAtIndex with a UnwindMacOSXFrameBackchain can only end in a deadlock, from what I can see), so I'm not sure how I can prevent this from happening.</div><div><br></div><div>Félix</div></body></html>