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

Native stack printing on Win/x64 cannot print the Java frames

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • 9
    • 9
    • hotspot
    • x86
    • windows

      This bug is filed to cover an issue missed by the JDK-8022335 fix.

      The JDK-8022335 fix is based on StackWalk64, which knows nothing about the Java frames. So hs_err will display only the native frames, and stop as soon as the first Java frame is reached. It will also NOT display any native frames below Java frames.

      Ideally, we want to be able to print the entire call stack

          [native frames #1]
          [java frames #1]
          [native frames #2]
          [java frames #2]
          ...
          [native frames #N]
          [java frames #N]

      Printing the Java frames immediately below the first set of native frames (i.e., [java frames #1]) should be doable. As StackWalk64() walks to the caller at the bottom-most frame of [native frames #1], the RIP, RBP and RFP (stored inside the CONTEXT structure) should be the proper values for the top-most frame of [java frames #1].

      However, the transition from [java frames #1] -> [native frames #2] may not work, if any of the frames in [native frames #2] use a frame pointer register, which on WinX64 may not be RBP. See http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2013-August/009098.html for more info.

            Unassigned Unassigned
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: