On 25/01/2021 12:41 pm, Yasumasa Suenaga wrote:
Hi all,
Chris and I discussed about fixing JDK-8245234 to see all mixed stacks
via `jhsdb jstack --mixed`.
In the discussion, we agree to use stack unwinder, but we haven't yet
decided which library to use.
Can you suggest the stack unwinder for SA?
I fixed similar issue in JDK-8234624 to understand DWARF in SA for
Linux, however it does not support DWARF completely because it is too
complex to implement by scratch.
AMD64 SysV ABI [1] says DWARF is used for stack unwinding. So we need to
support DWARF completely if we want to unwind.
There are some stack unwinder. I think libunwind [2] is suitable for
this purpose, however I'm not sure it is the best solution.
And also I saw similar issue on Windows because we cannot depend on base
pointer (like SA) in Windows x64 [3]. So I want to use the library which
is support both Linux and Windows.
We also think introducing stack unwinder helps improving native call
stacks in hs_err log. It will help troubleshooters.
Immediate reaction to this part is that I would not want third-party
libraries getting involved in hs_err file generation. Given we often do
this from a signal handling context, it would be far too risky IMO.
Cheers,
David
-----
I want to hear your opinions!
Thanks,
Yasumasa
[1]
https://software.intel.com/sites/default/files/article/402129/mpx-linux64-abi.pdf
[2] https://github.com/libunwind/libunwind
[3]
https://docs.microsoft.com/en-us/cpp/build/exception-handling-x64#unwind-procedure