Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 5003862
Votes 0
Synopsis RFE: print native stacktrace upon crash in hs_err_pid.log
Category java:runtime
Reported Against 1.4.2_03
Release Fixed
State 11-Closed, duplicate of 4515367, request for enhancement
Priority: 4-Low
Related Bugs 4515367
Submit Date 26-FEB-2004
Description
This is a request from a customer, who does much JNI code.
Comparing to  customer 's VM, customer finds the following very useful:
 customer 's VM prints (among many other pieces of information) a native stacktrace 
of the failing thread in their errorlog:
e.g.:

% more javacore16201.1077794940.txt

Thu Feb 26 11:24:15 2004
SIGABRT received in kill at 0x40081ed1 in /lib/libc.so.6. Processing terminated.
PID: 15726
J2RE 1.3.1  customer  build cxia32131-20020622
[ ... ]
         PID: 15726
         ----- Native Stack -----       Diagnostics_Impl at 40017409 in libxhpi.so
        dgGenerateJavacore at 40249F89 in libjvm.so
        abortJVM at 402DAFA1 in libjvm.so       sysUnwindSignalCatchFrame at 4033FA1F in libhpi.so
        sysSignalCatchHandler at 4033FAB1 in libhpi.so  intrDispatch at 403402CA in libhpi.so
        intrDispatchMD at 4034052C in libhpi.s  raise at 400345EB in libpthread.so.0
        abort at 400835C9 in libc.so    intrDispatch at 403402CA in libhpi.so
        intrDispatchMD at 4034052C in libhpi.s  bar at 415AB7AF in libtestImpl.so
        Java_test_bar at 415AB789 in libtestImpl.so
        ??
        mmipExecuteJava at 402A520F in libjvm.so
        ??
--------------------------------------------------------
[ ... ]


It would be desirable, if Sun's VM could also print such information in the 
file "hs_err_pid.log", so that most relevant debug information is already 
retrieved at the time of the crash.

This feature could probably be triggered by a -XX-option, e.g -XX:+PrintNativeStack.


Please find attached a complete crossplatform JNI example, that produces a crash.
Please find also data, that have been redeemed from several platforms, like
Solaris,  customer  Linux,  customer  and Windows.
Work Around
N/A
Evaluation
N/A
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang