How to use absl::InstallFailureSignalHandler #1493
Replies: 2 comments
-
I think there are two issues here. The first issue is the file/line numbers. We don't currently have them. The signal handler needs to be async-signal-safe, and as far as a I know, we don't have an async-signal-safe way of getting them. The second issue is that I think this is trying to walk the stack though glibc (the failure is in |
Beta Was this translation helpful? Give feedback.
-
Thanks @derekmauro. A couple of questions
I am able to run addr2line on the addresses and get the file and line number information. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am calling the function
InstallFailureSignalHandler
in themain
function(in the first line itself)Here is the definition of
InstallFailureSignalHandler
I am expecting to see a helpful backtrace(just like gdb/lldb does with the core dump file)
However, the stacktrace I am getting is lacking in information. My binary is build with
-g
and-fno-omit-frame-pointer
. Here is the stacktrace I gotNotice that I am not able to see the file name, function and line numbers.
and here is the backtrace using gdb's
bt
on the coredumpMy system is Ubuntu 22.04 and I am using clang-17. In the build file I am adding a dependency upon
"@com_google_absl//absl/debugging:failure_signal_handler"
Am I using this tool correctly? Why I am not getting the full stacktrace(badFunction missing) and missing information?
Beta Was this translation helpful? Give feedback.
All reactions