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

dtrace ustack and jstack do not print symbolic Java stack frames on Solaris 11

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 7u7
    • Fix Version/s: 8.4
    • Component/s: core-svc
    • Labels:
      None
    • Environment:

      Solaris 11 running in a VirtualBox VM on MacOS 10.8.2.

      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)

    • Subcomponent:
    • CPU:
      x86
    • OS:
      solaris_11

      Description

      Here is a sample D program:

      # cat trace2.d
      syscall::openat64:entry
      /execname == "java"/ {
         jstack(50, 0x2000);
      }

      I run this in a terminal window on Solaris 11 as root using the following command:

      dtrace -s trace2.d

      Then in another window, I run this Java 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");
        }

      }

      The output from dtrace is the following:

      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



      The desired output is a symbolic stack trace similar to the following:

      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

      This is what was possible using JDK 6 on OpenSolaris.

      I have the following Java related Solaris 11 packages installed:

      # 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--

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tomuell Tom Mueller (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: