[llvm-bugs] [Bug 37199] New: Unable to attach, detach, and attach to the same PID. The second attach command fails.

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Apr 22 13:03:45 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37199

            Bug ID: 37199
           Summary: Unable to attach, detach, and attach to the same PID.
                    The second attach command fails.
           Product: lldb
           Version: 6.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: mewbaz at gmail.com
                CC: llvm-bugs at lists.llvm.org

Problem description:
It is possible to attach to a process, detach from that process, but upon a
subsequent attempt to attach to the same process (after detaching), the attach
command fails, with "error: no error returned from Target::Attach, and target
has no process".



u at x220 ~> lldb --version
lldb version 6.0.0



u at x220 ~> sudo lldb
(lldb) attach 9594
Process 9594 stopped
* thread #1, name = 'target', stop reason = signal SIGSTOP
    frame #0: 0x00007f11ca4ccb10 libc.so.6`__GI___nanosleep + 64
libc.so.6`__GI___nanosleep:
->  0x7f11ca4ccb10 <+64>: cmpq   $-0x1000, %rax            ; imm = 0xF000 
    0x7f11ca4ccb16 <+70>: ja     0x7f11ca4ccb42            ; <+114>
    0x7f11ca4ccb18 <+72>: movl   %edx, %edi
    0x7f11ca4ccb1a <+74>: movl   %eax, 0xc(%rsp)
  thread #2, name = 'target', stop reason = signal SIGSTOP
    frame #0: 0x00007f11ca4ccb10 libc.so.6`__GI___nanosleep + 64
libc.so.6`__GI___nanosleep:
->  0x7f11ca4ccb10 <+64>: cmpq   $-0x1000, %rax            ; imm = 0xF000 
    0x7f11ca4ccb16 <+70>: ja     0x7f11ca4ccb42            ; <+114>
    0x7f11ca4ccb18 <+72>: movl   %edx, %edi
    0x7f11ca4ccb1a <+74>: movl   %eax, 0xc(%rsp)

Executable module set to "/home/u/Desktop/ptrace-call-userspace/target".
Architecture set to: x86_64-pc-linux.
(lldb) c
Process 9594 resuming
(lldb) detach
Process 9594 detached
(lldb) attach 9594
error: no error returned from Target::Attach, and target has no process

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180422/d518bad0/attachment.html>


More information about the llvm-bugs mailing list