[Bug 23344] New: lldb (local debugging) hangs with no output if lldb-server exits during launch

Bug ID 23344
Summary lldb (local debugging) hangs with no output if lldb-server exits during launch
Product lldb
Version unspecified
Hardware PC
OS Linux
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@cs.uiuc.edu
Reporter vince@nethacker.com
Classification Unclassified

lldb waits forever for the lldb-server to reverse connect.

repro steps: hack lldb-server to return at start of main

OBSERVED (threads in lldb)

python [40725] [cores: 12,31]  
  Thread #1 [python] 40725 (Exiting) [core: 12] (Suspended : User Request)  
    pthread_join() at pthread_join.c:92 0x7fa90d93c66b  
    lldb_private::HostThreadPosix::Join() at 0x7fa908b1439c  
    lldb_private::HostThread::Join() at 0x7fa907c123cd  
   
lldb_private::process_gdb_remote::GDBRemoteCommunication::JoinListenThread() at
0x7fa907d80d46  
   
lldb_private::process_gdb_remote::GDBRemoteCommunication::StartDebugserverProcess()
at 0x7fa907d8296d  
   
lldb_private::process_gdb_remote::ProcessGDBRemote::LaunchAndConnectToDebugserver()
at 0x7fa907dabc40  
    lldb_private::process_gdb_remote::ProcessGDBRemote::DoLaunch() at
0x7fa907daf71b  
    lldb_private::Process::Launch() at 0x7fa907ebdfd2  
    lldb_private::platform_linux::PlatformLinux::DebugProcess() at
0x7fa908ab16ef  
    lldb_private::Target::Launch() at 0x7fa907ee1550  
    <...more frames...>  
  Thread #2 [1:0] 40781 [core: 31] (Suspended : Container)  
    accept4() at accept4.c:37 0x7fa90d669b1f  
    lldb_private::Socket::BlockingAccept() at 0x7fa907c1a2df  
    lldb_private::ConnectionFileDescriptor::SocketListenAndAccept() at
0x7fa908b12ab6  
    lldb_private::ConnectionFileDescriptor::Connect() at 0x7fa908b13007  
    lldb_private::process_gdb_remote::GDBRemoteCommunication::ListenThread() at
0x7fa907d80010  
    lldb_private::HostNativeThreadBase::ThreadCreateTrampoline() at
0x7fa907c11f56  
    start_thread() at pthread_create.c:312 0x7fa90d93b182  
    clone() at clone.S:111 0x7fa90d66847d  

EXPECTED:

lldb outputs a nice error message