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

dtrace jstack and ustack do not print symbolic Java stack frames with JDK 7

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 7
    • Fix Version/s: 7u40
    • Component/s: core-svc
    • Labels:
    • Subcomponent:
    • Introduced In Version:
      7

      Description

      FULL PRODUCT VERSION :
      $ java -version
      java version " 1.7.0_07 "
      Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
      Java HotSpot(TM) Server VM (build 23.3-b01, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      SunOS trmmbp-solaris1 5.11 11.1 i86pc i386 i86pc

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      The following java related Java packages are installed on the system:

      # pkg list| grep java
      consolidation/java/java-incorporation 0.5.11-0.175.1.0.0.24.0 i--
      consolidation/ub_javavm/ub_javavm-incorporation 0.5.11-0.175.1.0.0.24.1 i--
      developer/java/jdk 1.7.0.7-0.175.1.0.0.24.0 i--
      developer/java/jdk-6 1.6.0.35-0.175.1.0.0.24.1 i--
      developer/java/jdk-7 1.7.0.7-0.175.1.0.0.24.0 i--
      library/java/java-demo-6 1.6.0.35-0.175.1.0.0.24.1 i--
      library/java/java-demo-7 1.7.0.7-0.175.1.0.0.24.0 i--
      library/java/javahelp 0.5.11-0.175.1.0.0.11.0 i--
      library/java/jdmk-runtime 0.5.11-0.173.0.0.0.0.0 i--
      runtime/java 1.6.0.35-0.175.1.0.0.24.1 i--
      runtime/java/jre 1.7.0.7-0.175.1.0.0.24.0 i--
      runtime/java/jre-6 1.6.0.35-0.175.1.0.0.24.1 i--
      runtime/java/jre-7 1.7.0.7-0.175.1.0.0.24.0 i--
      system/management/rad/client/rad-java 0.5.11-0.175.1.0.0.24.2 i--
      web/browser/firefox/plugin/firefox-java 1.0-0.175.0.0.0.0.0 i--


      A DESCRIPTION OF THE PROBLEM :
      I'm using the following D program to try to print stack traces for code that is calling certain system calls. There is no symbolic stack trace printed, just numbers.

      Note: I have not been able to get JDK 6 to produce symbolic stack traces on Solaris 11 either. The last combination where I saw this working was JDK 6 with OpenSolaris (build 134).





      REGRESSION. Last worked in version 6u31

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      $ cat trace2.d
      syscall::openat64:entry
      /execname == " java " / {
         jstack(50, 0x2000);
      }

      I'm using the following small test program:

      $ cat Test.java
      import java.io.*;
      class Test {
        static public void main(String args[]) throws Exception {
          foo();
        }
       
        static void foo() throws Exception {
      new FileInputStream( " glassfish4/glassfish/modules/kernel.jar " );
        }

      }

      I then run dtrace in a terminal window running as root and the " java Test " command in another window. The output from dtrace is:

      # dtrace -s trace2.d
      dtrace: script 'trace2.d' matched 1 probe
       CPU ID FUNCTION:NAME
         1 137 openat64:entry
                    0xfe68ae43
                    0xfe65e9d7
                    0xfe67590c
                    0xfe619a44
                    0xfe619cce
                    0xfe61a15b
                    0xfe62b2b1
                    0xfe629dcd
                    0xfe6146dd
                    0xfd91c199
                    0xfd92f811
                    0xfd8ed0f0
                    0xfe248419
                    0xfd8f79d4
                    0xfe7527cc
                    0xfe68444c
                    0xfe6846f0

         1 137 openat64:entry
                    0xfe68ae43
                    0xfe65e9d7
                    0xfe67594f
                    0xfe10e2e5
                    0xfd86449f
                    0xfd2c62da
                    0xfd2c1ce9
                    0xfd2c1c8a
                    0xfdc156b3
                    0xfdc18337
                    0xfe2167a7
                    0xfe213a47
                    0xfe211f40
                    0xfd926d45
                    0xfd927bf6
                    0xfd8d0cd5
                    0xfd8d22ff
                    0xfd8ecfc5
                    0xfe2484a8
                    0xfd8f79d4
                    0xfe7527cc
                    0xfe68444c
                    0xfe6846f0

         1 137 openat64:entry
                    0xfe68ae43
                    0xfe65e9d7
                    0xfe67594f
                    0xfe10e2e5
                    0xfd86449f
                    0xfd3bf34b
                    0xfd3bf2f5
                    0xfa20aaf2
                    0xfa2036fb
                    0xfa2036fb
                    0xfa2036fb
                    0xfa2036fb
                    0xfa203568
                    0xfa200451
                    0xfd78dc21
                    0xfd78e000
                    0xfd78e03d
                    0xfd7f18e3
                    0xfd3bd74f
                    0xfa20aaf2
                    0xfa203568
                    0xfa203568
                    0xfa2036fb
                    0xfa200451
                    0xfd78dc21
                    0xfd78e000
                    0xfd78e03d
                    0xfd7c4ac5
                    0xfd770cff
                    0xfd76377e
                    0xfd765c33
                    0xfd769ba9
                    0xfa21289b
                    0xfa2036fb
                    0xfa200451
                    0xfd78dc21
                    0xfd78e000
                    0xfde068b2
                    0xfd9266d6
                    0xfe248f4e
                    0xfd8f79d4
                    0xfe7527cc
                    0xfe68444c
                    0xfe6846f0

         1 137 openat64:entry
                    0xfe68ae43
                    0xfe65e9d7
                    0xfe67594f
                    0xfe10e2e5
                    0xfd86449f
                    0xfd2c2d5b
                    0xfa20aaf2
                    0xfa2035fe
                    0xfa2036fb
                    0xfa2036fb
                    0xfa2036fb
                    0xfa2036fb
                    0xfa203568
                    0xfa203568
                    0xfa203568
                    0xfa200451
                    0xfd78dc21
                    0xfd78e000
                    0xfd78e03d
                    0xfd7f18e3
                    0xfd3bd74f
                    0xfa20aaf2
                    0xfa203568
                    0xfa2036fb
                    0xfa2036fb
                    0xfa203568
                    0xfa200451
                    0xfd78dc21
                    0xfd78e000
                    0xfd78e03d
                    0xfd7f18e3
                    0xfd3bd74f
                    0xfa20aaf2
                    0xfa203568
                    0xfa203568
                    0xfa203568
                    0xfa203568
                    0xfa203568
                    0xfa200451
                    0xfd78dc21
                    0xfd78e000
                    0xfd78e03d
                    0xfd7f18e3
                    0xfd3bebd4
                    0xfa20aaf2
                    0xfa203568
                    0xfa203568
                    0xfa203568
                    0xfa203568
                    0xfa203568

         1 137 openat64:entry
                    0xfe68ae43
                    0xfe65e9d7
                    0xfe67594f
                    0xfe10e2e5
                    0xfd86449f
                    0xfd2c2d5b
                    0xfa20aaf2
                    0xfa2035fe
                    0xfa2036fb
                    0xfa2036fb
                    0xfa2036fb
                    0xfa2036fb
                    0xfa203568
                    0xfa203568
                    0xfa203568
                    0xfa200451
                    0xfd78dc21
                    0xfd78e000
                    0xfd78e03d
                    0xfd7f18e3
                    0xfd3bd74f
                    0xfa20aaf2
                    0xfa203568
                    0xfa2036fb
                    0xfa2036fb
                    0xfa203568
                    0xfa200451
                    0xfd78dc21
                    0xfd78e000
                    0xfd78e03d
                    0xfd7f18e3
                    0xfd3bd74f
                    0xfa20aaf2
                    0xfa203568
                    0xfa203568
                    0xfa203568
                    0xfa203568
                    0xfa203568
                    0xfa200451
                    0xfd78dc21
                    0xfd78e000
                    0xfd78e03d
                    0xfd7f18e3
                    0xfd3bebd4
                    0xfa20aaf2
                    0xfa203568
                    0xfa203568
                    0xfa203568
                    0xfa203568
                    0xfa203568

         1 137 openat64:entry
                    0xfe68ae43
                    0xfe65e9d7
                    0xfe67594f
                    0xfe10e2e5
                    0xfd86449f
                    0xfd3bf34b
                    0xfd3bf2f5
                    0xfa20aaf2
                    0xfa2036fb
                    0xfa2036fb
                    0xfa203568
                    0xfa203568
                    0xfa203568
                    0xfa203568
                    0xfa203568
                    0xfa203568
                    0xfa200451
                    0xfd78dc21
                    0xfd78e000
                    0xfd78e03d
                    0xfd7f18e3
                    0xfd3bebd4
                    0xfa20aaf2
                    0xfa203568
                    0xfa203568
                    0xfa203568
                    0xfa203568
                    0xfa203568
                    0xfa200451
                    0xfd78dc21
                    0xfd78e000
                    0xfd78e03d
                    0xfd8af22e
                    0xfe7563f5
                    0xfe752b0f
                    0xfe68444c
                    0xfe6846f0

         1 137 openat64:entry
                    0xfe68ae43
                    0xfe65e9d7
                    0xfe67594f
                    0xfe10e2e5
                    0xfd86449f
                    0xfd3bf34b
                    0xfd3bf2f5
                    0xfa20aaf2
                    0xfa2036fb
                    0xfa2036fb
                    0xfa2036fb
                    0xfa2036fb
                    0xfa200451
                    0xfd78dc21
                    0xfd78e000
                    0xfd78e03d
                    0xfd8622a5
                    0xfe752bcd
                    0xfe68444c
                    0xfe6846f0

      I get the same results if I use ustack instead of jstack.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      In previous versions, the output would look like this:

      CPU ID FUNCTION:NAME
        8 49764 __1cNSharedRuntimeTdtrace_method_entry6FpnKJavaThread_pnNmethodOopDesc__i_:method-entry
      4`__1cNSharedRuntimeTdtrace_method_entry6FpnKJavaThread_pnNmethodOopDesc__i_+0x68
                    java/lang/Thread.sleep(J)V
                    Foo.foo()V
                    Foo.bar()V
                    Foo.main([Ljava/lang/String;)V
      ACTUAL -
      See the steps to reproduce.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      See the steps to reproduce.
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      I haven't found one.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: