[lldb-dev] Attaching to a stopped (cored) process hangs lldb-server

Mark Chandler via lldb-dev lldb-dev at lists.llvm.org
Mon Nov 2 17:54:10 PST 2015


So im trying to write a core handler program and use lldb to attach and dump important information about it. This works if a use my tool to attach to an existing one but I found that lldb-server will hang in a waitpid call if the kernel has invoked the tool after another process has cored.

Example:

*         /proc/sys/kernel/core_pattern is set to |/opt/core_tool

*         Run a.out and it segfaults

*         Kernel invokes core_tool that uses lldb AttachToProcess and a.out is in state "S+"

*         lldb-server hangs in source\Plugins\Process\Linux\NativeProcessLinux.cpp:867

*         if I remove the waitpid it doesn't hang but fails to attach

Looks like gdb had a similar problem as well: http://www.sourceware.org/ml/gdb-patches/2008-04/msg00224.html
Any ideas on how to fix this?

Mark Chandler
Battle.Net Engineering Systems | Blizzard Entertainment
(P) 949-955-1380 x15353

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20151103/f303af1b/attachment.html>


More information about the lldb-dev mailing list