Linux crash native stacks only have 1 line
Alexander Miloslavskiy
alexandr.miloslavskiy at gmail.com
Wed Apr 8 17:53:24 UTC 2020
On 08.04.2020 19:32, Florian Weimer wrote:
> Not really. You need libgcc_s. You can link the unwinder statically,
> but you really, really do not want to do that because sometimes, the
> operating system has newer unwinding information than what is understood
> by the statically linked copy of the unwinder. Having multiple copies
> of the unwinder in the same process can cause issues as well (but the
> way OpenJDK uses hidden symbols tends to reduce that particular risk).
Right, I actually meant that. I am going to implement it similar to
libc [1] where it uses dlopen(LIBGCC_S_SO).
> Some distributions build with -fno-unwind-tables, or do not patch GCC to
> generate the tables by default. I expect you will get very different
> results on such distributions. But if the tables are there, the
> unwinder (whether used via backtrace or directly via the_Unwind_*
> functions) gives very good results for valid call stacks.
Solving the problem on a majority of systems will already be a
significant improvement compared to how currently it fails on the
majority of systems.
[1] https://github.com/bminor/glibc/blob/master/debug/backtrace.c
More information about the hotspot-dev
mailing list