bloomberg / memray

Memray is a memory profiler for Python
https://bloomberg.github.io/memray/
Apache License 2.0
13.36k stars 397 forks source link

attach: Wake up the process after lldb detaches #311

Closed godlygeek closed 1 year ago

godlygeek commented 1 year ago

lldb on Linux appears to have a bug causing it to sometimes leave a process stopped at a breakpoint even after the debugger has detached. Defend against this by sending a SIGCONT signal to the process after the debugger attaches. If the process was already resumed then it will just ignore this spurious signal, but if lldb had left it stopped this will rescue it.

Relates-to: https://github.com/llvm/llvm-project/issues/60408. Relates-to: #309