2 ms·
The best way I've found is - patching LLVM's libunwind to make it fully async-signal safe, and sending the stack trace to another thread for symbolization. This
by zX41ZdbW 3y ago
The best way I've found is - patching LLVM's libunwind to make it fully async-signal safe, and sending the stack trace to another thread for symbolization. This is implemented in ClickHouse.
- einpoklum 3y ago1. Can you link to that? 2. Have these changes been offered as patch for libunwind or boost::stacktrace?
- zX41ZdbW 3y agohttps://github.com/ClickHouse/libunwind/ https://github.com/ClickHouse/libunwind/ There were multiple steps: 1. Avoid using malloc/free inside libunwind. 2. Avoid using FDECache that required a mutex. 3. Avoid using dl_iterate_phdr (a mutex inside libc). 4. Protection from dereferencing wrong pointers due to incorrect unwind tables. Most of the changes were integrated to libunwind, but not everything. Example: https://bugs.llvm.org/show_bug.cgi?id=48186 https://bugs.llvm.org/show_bug.cgi?id=48186