[lworld] jdk/jfr/event/runtime/TestSyncOnValueBasedClassEvent.java still fails when run with --enable-preview

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • repo-valhalla
    • Affects Version/s: repo-valhalla
    • Component/s: hotspot
    • generic
    • generic

      The following test fails when it is run with --enable-preview:

      jdk/jfr/event/runtime/TestSyncOnValueBasedClassEvent.java

      Here's a snippet from the log file:

      #section:main
      ----------messages:(8/546)----------
      command: main -XX:+UnlockDiagnosticVMOptions -XX:DiagnoseSyncOnValueBasedClasses=2 jdk.jfr.event.runtime.TestSyncOnValueBasedClassEvent
      reason: User specified action: run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:DiagnoseSyncOnValueBasedClasses=2 jdk.jfr.event.runtime.TestSyncOnValueBasedClassEvent
      started: Thu Jan 08 00:18:22.342 GMT 2026
      Mode: othervm [/othervm specified]
      Additional options from @modules: --add-modules jdk.jfr,java.management
      Process id: 49558
      finished: Thu Jan 08 00:18:24.062 GMT 2026
      elapsed time (seconds): 1.72
      ----------configuration:(3/51)----------
      Boot Layer
        add modules: jdk.jfr java.management

      ----------System.out:(0/0)----------
      ----------System.err:(11/817)----------
      java.lang.IdentityException: Cannot synchronize on an instance of value class java.lang.Character
      at jdk.jfr.event.runtime.TestSyncOnValueBasedClassEvent.main(TestSyncOnValueBasedClassEvent.java:70)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:565)
      at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
      at java.base/java.lang.Thread.run(Thread.java:1516)

      JavaTest Message: Test threw exception: java.lang.IdentityException: Cannot synchronize on an instance of value class java.lang.Character
      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: java.lang.IdentityException: Cannot synchronize on an instance of value class java.lang.Character
      ----------rerun:(44/8168)*----------

      In this particular case, the test task is invoked with the
      --enable-preview option and this results in the test execution
      command containing this snippet:

              -Dtest.java.opts=--enable-preview \\

            Assignee:
            Daniel Daugherty
            Reporter:
            Daniel Daugherty
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: