Re: [lldb-dev] lldb::SBDebugger::Terminate() hangs in deadlock
You are missing a call to the initialize function: lldb::SBDebugger::Initialize(); > On Sep 28, 2015, at 1:12 AM, Stefan Kratochwil via lldb-dev > wrote: > > Hi, > > I've got a problem with lldb deadlocking upon a call to > lldb::SBDebugger::Terminate(). > > I am currently using svn revision 247535 of llvm and lldb, and I know that my > code was working with svn revision 229496. > > In short, I am doing the following steps: > > lldb_debugger = lldb::SBDebugger::Create() > lldb_debugger.SetAsync(true) > lldb_target = lldb_debugger.CreateTarget() > lldb_process = lldb_target.AttachToProcessWithID() > ... (doing stuff with modules) > lldb::SBDebugger::Terminate() > > The last call results in a deadlock. > > I enabled the DEBUG_LOG and ENABLE_MUTEX_ERROR_CHECKING macros within > Mutex.cpp and found out that a mutex is getting locked whose ID never came up > in the log before. This mutex has no owner, so it should be lockable - but it > isn't... > > A gdb backtrace with the last few debug messages can be found here: > http://pastebin.com/Kv4EidHx > > > Does anyone have an idea what is going on here? Am I missing something? > > Thanks in advance! > > > Cheers, > Stefan Kratochwil > ___ > lldb-dev mailing list > lldb-dev@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev ___ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
Re: [lldb-dev] lldb::SBDebugger::Terminate() hangs in deadlock
Hi Pavel, thanks for your quick reply. I filed a bug at https://llvm.org/bugs/show_bug.cgi?id=24958. I'll try to determine a more precise revision range for that issue. I am currently using svn (checking out lldb manually into llvm/tools). Do you have a recommended workflow for git in such a situation? git bisect with subtree / submodule? Cheers, Stefan On 09/28/2015 10:24 AM, Pavel Labath wrote: Hi, Thanks for the report. Since you are suspecting a deadlock, could you post a backtrace of all the threads (thread apply all backtrace). It would be best to move this discussion to a bug in llvm.org/bugs. I am currently using svn revision 247535 of llvm and lldb, and I know that my code was working with svn revision 229496 This sounds like a pretty big revision range. It would help if you could narrow it down a bit. pl On 28 September 2015 at 09:12, Stefan Kratochwil via lldb-dev wrote: Hi, I've got a problem with lldb deadlocking upon a call to lldb::SBDebugger::Terminate(). I am currently using svn revision 247535 of llvm and lldb, and I know that my code was working with svn revision 229496. In short, I am doing the following steps: lldb_debugger = lldb::SBDebugger::Create() lldb_debugger.SetAsync(true) lldb_target = lldb_debugger.CreateTarget() lldb_process = lldb_target.AttachToProcessWithID() ... (doing stuff with modules) lldb::SBDebugger::Terminate() The last call results in a deadlock. I enabled the DEBUG_LOG and ENABLE_MUTEX_ERROR_CHECKING macros within Mutex.cpp and found out that a mutex is getting locked whose ID never came up in the log before. This mutex has no owner, so it should be lockable - but it isn't... A gdb backtrace with the last few debug messages can be found here: http://pastebin.com/Kv4EidHx Does anyone have an idea what is going on here? Am I missing something? Thanks in advance! Cheers, Stefan Kratochwil ___ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev ___ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
Re: [lldb-dev] lldb::SBDebugger::Terminate() hangs in deadlock
Hi, Thanks for the report. Since you are suspecting a deadlock, could you post a backtrace of all the threads (thread apply all backtrace). It would be best to move this discussion to a bug in llvm.org/bugs. > I am currently using svn revision 247535 of llvm and lldb, and I know that my > code was working with svn revision 229496 This sounds like a pretty big revision range. It would help if you could narrow it down a bit. pl On 28 September 2015 at 09:12, Stefan Kratochwil via lldb-dev wrote: > Hi, > > I've got a problem with lldb deadlocking upon a call to > lldb::SBDebugger::Terminate(). > > I am currently using svn revision 247535 of llvm and lldb, and I know that > my code was working with svn revision 229496. > > In short, I am doing the following steps: > > lldb_debugger = lldb::SBDebugger::Create() > lldb_debugger.SetAsync(true) > lldb_target = lldb_debugger.CreateTarget() > lldb_process = lldb_target.AttachToProcessWithID() > ... (doing stuff with modules) > lldb::SBDebugger::Terminate() > > The last call results in a deadlock. > > I enabled the DEBUG_LOG and ENABLE_MUTEX_ERROR_CHECKING macros within > Mutex.cpp and found out that a mutex is getting locked whose ID never came > up in the log before. This mutex has no owner, so it should be lockable - > but it isn't... > > A gdb backtrace with the last few debug messages can be found here: > http://pastebin.com/Kv4EidHx > > > Does anyone have an idea what is going on here? Am I missing something? > > Thanks in advance! > > > Cheers, > Stefan Kratochwil > ___ > lldb-dev mailing list > lldb-dev@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev ___ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev