Linux crash native stacks only have 1 line

Volker Simonis volker.simonis at gmail.com
Mon Apr 6 13:42:21 UTC 2020


Hi Alexander,

one of the problems may be that the native code you're crashed in was
compiled with "-fomit-frame-pointer" which means that the frame pointer
register can't be used for unwinding. gdb can use other, additional sources
of information from the various ELF tables or from the debugging
information which aren't available when HotSpot creates its native stack
trace.

I you already managed to attach gdb and get a correct back trace at the
point where your program crashes, you can just as well debug the HotSpot
stack tracing routine "print_native_stack()" in the file "debug.cpp" to see
what's the actual problem :) Before doing  that, I'd check your reproducer
with jdk14 or better the tip revision just to make sure you're not hunting
a problem which has already been fixed upstream.

In general it's always advisable to mention the exact jdk version and
distribution you've used.

Best regards,
Volker


On Mon, Apr 6, 2020 at 3:25 PM Alexander Miloslavskiy <
alexandr.miloslavskiy at gmail.com> wrote:

> On 06.04.2020 15:21, David Holmes wrote:
> > I suggest you ask the Eclipse/SWT folk the answer to this as it seems to
> > be their native code that isn't allowing an informative stacktrace to be
> > obtained. It may have been compiled without the necessary frame
> > back-pointers or otherwise lacks the metadata needed to reconstruct the
> > stack.
>
> I'm also dealing with SWT, so there's no need to ask other guys :)
>
> Just to make sure, is it really possible that _bottom_ stack frame can
> break stack unwinding? I expected that stack unwinding starts from
> $RIP $RSP (that is top frame), and these frames are linux GTK in my case.
>


More information about the hotspot-dev mailing list