<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - deadlock when calling SBThread::GetSelectedFrame"
   href="https://llvm.org/bugs/show_bug.cgi?id=30526">30526</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>deadlock when calling SBThread::GetSelectedFrame
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lldb
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.9
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>lldb-dev@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>cc.tapa@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I have thread working with lldb events.

void LLDBRunner::eventsThread()
{
  while (1)
  {
    lldb::SBEvent ev;
    m_debugData->listener.WaitForEvent(UINT32_MAX, ev);

    lldb::SBThread thread = m_debugData->currentProcess.GetSelectedThread();
    lldb::SBFrame frame = thread.GetSelectedFrame();
  }
}

Sometimes(but not always) this thread hangs up when calling
thread.GetSelectedFrame();

Call stack:
    liblldb.dll!llvm::sys::MutexImpl::acquire() Line 41    C++
     liblldb.dll!llvm::sys::SmartMutex<0>::lock() Line 101    C++
    
liblldb.dll!llvm::sys::SmartScopedLock<0>::SmartScopedLock<0>(llvm::sys::SmartMutex<0>
& m) Line 147    C++
     liblldb.dll!lldb_private::ProcessWindowsLive::DoReadMemory(unsigned
__int64 vm_addr, void * buf, unsigned int size, lldb_private::Error & error)
Line 704    C++
     liblldb.dll!lldb_private::Process::ReadMemoryFromInferior(unsigned __int64
addr, void * buf, unsigned int size, lldb_private::Error & error) Line 2506   
C++
     liblldb.dll!lldb_private::MemoryCache::Read(unsigned __int64 addr, void *
dst, unsigned int dst_len, lldb_private::Error & error) Line 268    C++
     liblldb.dll!lldb_private::Process::ReadMemory(unsigned __int64 addr, void
* buf, unsigned int size, lldb_private::Error & error) Line 2355    C++
    
liblldb.dll!lldb_private::RegisterContext::ReadRegisterValueFromMemory(const
lldb_private::RegisterInfo * reg_info, unsigned __int64 src_addr, unsigned int
src_len, lldb_private::RegisterValue & reg_value) Line 409    C++
    
liblldb.dll!lldb_private::RegisterContextLLDB::ReadRegisterValueFromRegisterLocation(lldb_private::UnwindLLDB::RegisterLocation
regloc, const lldb_private::RegisterInfo * reg_info,
lldb_private::RegisterValue & value) Line 1083    C++
    
liblldb.dll!lldb_private::RegisterContextLLDB::ReadGPRValue(lldb::RegisterKind
register_kind, unsigned int regnum, unsigned __int64 & value) Line 1919    C++
     liblldb.dll!lldb_private::RegisterContextLLDB::ReadPC(unsigned __int64 &
pc) Line 2066    C++
     liblldb.dll!lldb_private::UnwindLLDB::GetOneMoreFrame(lldb_private::ABI *
abi) Line 265    C++
     liblldb.dll!lldb_private::UnwindLLDB::AddOneMoreFrame(lldb_private::ABI *
abi) Line 357    C++
    
liblldb.dll!lldb_private::UnwindLLDB::UpdateUnwindPlanForFirstFrameIfInvalid(lldb_private::ABI
* abi) Line 332    C++
     liblldb.dll!lldb_private::UnwindLLDB::AddFirstFrame() Line 118    C++
     liblldb.dll!lldb_private::UnwindLLDB::DoGetFrameInfoAtIndex(unsigned int
idx, unsigned __int64 & cfa, unsigned __int64 & pc) Line 422    C++
     liblldb.dll!lldb_private::Unwind::GetFrameInfoAtIndex(unsigned int
frame_idx, unsigned __int64 & cfa, unsigned __int64 & pc) Line 72    C++
     liblldb.dll!lldb_private::StackFrameList::GetFramesUpTo(unsigned int
end_idx) Line 299    C++
     liblldb.dll!lldb_private::StackFrameList::GetFrameAtIndex(unsigned int
idx) Line 541    C++
     liblldb.dll!lldb_private::Thread::GetSelectedFrame() Line 364    C++
     liblldb.dll!lldb::SBThread::GetSelectedFrame() Line 1471    C++
     ssl-rt.dll!Debugger::LLDBRunner::checkCurrentFunctionIsOkey() Line 143   
C++
     ssl-rt.dll!Debugger::LLDBRunner::eventsThread() Line 263    C++</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>