Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5003862

RFE: print native stacktrace upon crash in hs_err_pid.log

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.2_03
    • hotspot
    • generic
    • solaris_9


      This is a request from a customer, who does much JNI code.
      Comparing to IBM's VM, customer finds the following very useful:
      IBM'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 IBM 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, RedHat Linux, SuSE Linux and Windows.

            acorn Karen Kinnear (Inactive)
            thlenz Thomas Lenz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: