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

Serviceability Agent tests fail with JFR enabled due to unknown thread type JfrRecorderThread

XMLWordPrintable

    • 25
    • b05

        Whilst running hs-tier1 tests with JFR enabled I discovered that the SA doesn't seem to work with JFR enabled:

        java.lang.RuntimeException: Unable to deduce type of thread from address 0x00007fce98ee7ee0 (expected type JavaThread, CompilerThread, MonitorDeflationThread, AttachListenerThread, DeoptimizeObjectsALotThread, StringDedupThread, NotificationThread, ServiceThread or JvmtiAgentThread)
        at jdk.hotspot.agent/sun.jvm.hotspot.runtime.Threads.createJavaThreadWrapper(Threads.java:196)
        at jdk.hotspot.agent/sun.jvm.hotspot.runtime.Threads.getJavaThreadAt(Threads.java:178)
        at jdk.hotspot.agent/sun.jvm.hotspot.runtime.DeadlockDetector.createThreadTable(DeadlockDetector.java:149)
        at jdk.hotspot.agent/sun.jvm.hotspot.runtime.DeadlockDetector.print(DeadlockDetector.java:56)
        at jdk.hotspot.agent/sun.jvm.hotspot.runtime.DeadlockDetector.print(DeadlockDetector.java:39)
        at jdk.hotspot.agent/sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:62)
        at jdk.hotspot.agent/sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:45)
        at jdk.hotspot.agent/sun.jvm.hotspot.tools.JStack.run(JStack.java:67)
        at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.startInternal(Tool.java:278)
        at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.start(Tool.java:241)
        at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.execute(Tool.java:134)
        at jdk.hotspot.agent/sun.jvm.hotspot.tools.JStack.runWithArgs(JStack.java:90)
        at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runJSTACK(SALauncher.java:306)
        at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:507)
        Caused by: sun.jvm.hotspot.types.WrongTypeException: No suitable match for type of address 0x00007fce98ee7ee0 (nearest symbol is _ZTV17JfrRecorderThread)
        at jdk.hotspot.agent/sun.jvm.hotspot.runtime.InstanceConstructor.newWrongTypeException(InstanceConstructor.java:62)
        at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VirtualConstructor.instantiateWrapperFor(VirtualConstructor.java:80)
        at jdk.hotspot.agent/sun.jvm.hotspot.runtime.Threads.createJavaThreadWrapper(Threads.java:192)

        The SA needs to be aware of every type of JavaThread that the VM can create, but is missing an entry for JfrRecorderThread in open/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/Threads.java

        JDK-8352251 made the JfrRecorderThread an actual JavaThread subclass, but did not update the SA.

              cjplummer Chris Plummer
              dholmes David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: