I am trying to run LLDB from the 3.8.0 release on a Debian 8 system.
However, LLDB hangs during attach:

$ lldb /bin/ls
(lldb) target create "/bin/ls"
Current executable set to '/bin/ls' (x86_64).
(lldb) r

At which point it hangs. From another window:

$ ps -eLf|grep djones
djones   32218  7418 32218  3    3 10:33 pts/18   00:00:00 lldb /bin/ls
djones   32218  7418 32224  0    3 10:33 pts/18   00:00:00 lldb /bin/ls
djones   32218  7418 32225  0    3 10:34 pts/18   00:00:00 lldb /bin/ls

So three threads are created. I'm not sure how far LLDB got in creating its
target.

The 3.7 releases did this, on both Debian and Ubuntu 14.04LTS. However, the
3.8 release fixed this for Ubuntu. I had neglected to test this on Debian.

I am also using LLDB as a library in my own application. Tracing through
that, my app hangs in the call to SBTarget::AttachToProcessWithID.

strace -f provides insight:

[pid   532] write(2, ": CommandLine Error: Option '", 29) = 29
[pid   532] write(2, "debug", 5)        = 5
[pid   532] write(2, "' registered more than once!\n", 29) = 29
[pid   532] write(2, "LLVM ERROR: inconsistency in reg"..., 60) = 60
[pid   532] exit_group(1)               = ?
[pid   532] +++ exited with 1 +++
[pid   524] <... futex resumed> )       = ? ERESTARTSYS (To be restarted if
SA_RESTART is set)
[pid   533] <... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 1}],
__WALL, NULL) = 532
[pid   524] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=532,
si_uid=1500, si_status=1, si_utime=0, si_stime=0} ---
[pid   524] futex(0x7fed965909d0, FUTEX_WAIT, 531, NULL <unfinished ...>
[pid   533] madvise(0x7fed9558f000, 8368128, MADV_DONTNEED) = 0
[pid   533] _exit(0)                    = ?
[pid   533] +++ exited with 0 +++

It looks like the error message to the effect that an option was registered
more than once never makes it out, causes child death, and the parent hangs
waiting for a child that will never signal.

LLVM was built as follows:

tar xJf Downloads/llvm-3.8.0.src.tar.xz
tar xJf Downloads/cfe-3.8.0.src.tar.xz
tar xJf Downloads/lldb-3.8.0.src.tar.xz
cd llvm-3.8.0.src/tools
ln -s ../../cfe-3.8.0.src/ clang
ln -s ../../lldb-3.8.0.src/ lldb
cmake -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON
-DCMAKE_INSTALL_PREFIX=/tools/llvm/3.8.0dbg
-DLLVM_TARGETS_TO_BUILD="X86;CppBackend" -DCMAKE_BUILD_TYPE=Release
-DLLVM_ENABLE_ASSERTIONS=ON ..
cmake --build . -- -j4
sudo cmake --build . --target install

Is this a known issue?
_______________________________________________
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

Reply via email to