[lldb-dev] [Bug 16229] New: waitpid fails after attach to processes that aren't group leaders

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jun 4 15:46:37 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=16229

            Bug ID: 16229
           Summary: waitpid fails after attach to processes that aren't
                    group leaders
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at cs.uiuc.edu
          Reporter: andrew.kaylor at intel.com
    Classification: Unclassified

On Linux, when LLDB attaches to a process that is not a group leader the
MonitorChildProcessThread will terminate prematurely.  This happens because the
call to waitpid(-1*pid,...) fails with an ECHILD error.

It is possible to avoid this error by passing just -1 to waitpid, but that
results in signals for all children (including LLDB threads) to be reported. 
More investigation is required to determine the feasibility of this solution.

One situation in which this condition occurs is when the process to which we
are attaching is launched from a Python script using the subprocess.Popen
constructor.  This failure is demonstrated in the
CreateAfterAttach.test_create_after_attach_with_dwarf_and_popen test case.  A
workaround is demonstrated by the
CreateAfterAttach.test_create_after_attach_with_dwarf_and_popen test case. 
Both are in test/functionalities/thread/create_after_attach.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130604/0a83c219/attachment.html>


More information about the lldb-dev mailing list