Linux crash native stacks only have 1 line
Alexander Miloslavskiy
alexandr.miloslavskiy at gmail.com
Mon Apr 6 11:03:34 UTC 2020
Hello,
I'm working on fixing various crashes in our Java-based product.
There's one thing that consistently cripples my research: hs_err_pid.log
files will always contain just _one_ line of native stack on Linux. On
macOS, stack is fine.
So in most cases, I have no useful stack (the nearest Java frame is
something like GTK message loop).
Is there any switch to fix that? Can someone explain why is this happening?
For some background, this is what I see in a typical crash log:
--------
Stack: [0x00007fcab1a14000,0x00007fcab1c14000], sp=0x00007fcab1c117a0,
free space=2037k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code,
C=native code)
C [libgobject-2.0.so.0+0x36471] g_type_check_instance+0x41
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J 2857 org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(JZ)Z
(0 bytes) @ 0x00007fca9d9f6ec4 [0x00007fca9d9f6e80+0x44]
J 6486 C2 org.eclipse.swt.widgets.Display.readAndDispatch()Z (73 bytes)
@ 0x00007fca9dbf3a24 [0x00007fca9dbf3760+0x2c4]
<...>
--------
This is pretty much as good as "it crashed somewhere".
And this is the actual stack when I finally learn how to reproduce and
attach GDB:
--------
#0 g_type_check_instance
#1 g_signal_emit_by_name
#2 gtk_im_multicontext_retrieve_surrounding_cb
#3 _gtk_marshal_BOOLEAN__VOID
#4 g_closure_invoke
#5 signal_emit_unlocked_R
#6 g_signal_emit_valist
#7 g_signal_emit
#8 _request_surrounding_text
#9 _request_surrounding_text
#10 _request_surrounding_text_after_focus
#11 gdk_threads_dispatch
#12 g_main_dispatch
#13 g_main_context_dispatch
#14 g_main_context_iterate
#15 g_main_context_iteration
#16 Java_org_eclipse_swt_internal_gtk_OS__1g_1main_1context_1iteration
--------
More information about the hotspot-dev
mailing list