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

java/lang/reflect/callerCache/ReflectionCallerCacheTest.java failed with "RuntimeException: Class AccessTest$PrivateField not unloaded!"

    XMLWordPrintable

Details

    Description

      The following test failed in the JDK19 CI:

      java/lang/reflect/callerCache/ReflectionCallerCacheTest.java

      Here's a snippet from the log file:

      #section:testng
      ----------messages:(5/247)----------
      command: testng ReflectionCallerCacheTest
      reason: User specified action: run testng/othervm ReflectionCallerCacheTest
      Mode: othervm [/othervm specified]
      Additional options from @modules: --add-modules jdk.compiler
      elapsed time (seconds): 174.784
      ----------configuration:(3/40)----------
      Boot Layer
        add modules: jdk.compiler

      ----------System.out:(62/3902)----------
      config ReflectionCallerCacheTest.setup(): success
      ForceGC condition met after System.gc() 1 times
      test ReflectionCallerCacheTest.load("AccessTest$PublicConstructor"): success
      ForceGC condition met after System.gc() 1 times
      test ReflectionCallerCacheTest.load("AccessTest$PublicMethod"): success
      ForceGC condition met after System.gc() 1 times
      test ReflectionCallerCacheTest.load("AccessTest$PublicField"): success
      ForceGC condition met after System.gc() 1 times
      test ReflectionCallerCacheTest.load("AccessTest$ProtectedMethod"): success
      ForceGC condition met after System.gc() 1 times
      test ReflectionCallerCacheTest.load("AccessTest$ProtectedField"): success
      ForceGC condition met after System.gc() 2 times
      test ReflectionCallerCacheTest.load("AccessTest$PrivateMethod"): success
      ForceGC condition not met after System.gc() 10 times
      test ReflectionCallerCacheTest.load("AccessTest$PrivateField"): failure
      java.lang.RuntimeException: Class AccessTest$PrivateField not unloaded!
      at ReflectionCallerCacheTest.load(ReflectionCallerCacheTest.java:113)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:578)
      at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
      at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599)
      at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
      at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
      at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822)
      at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147)
      at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
      at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
      at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
      at org.testng.TestRunner.privateRun(TestRunner.java:764)
      at org.testng.TestRunner.run(TestRunner.java:585)
      at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
      at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
      at org.testng.SuiteRunner.run(SuiteRunner.java:286)
      at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
      at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
      at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
      at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
      at org.testng.TestNG.runSuites(TestNG.java:1069)
      at org.testng.TestNG.run(TestNG.java:1037)
      at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:94)
      at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:578)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
      at java.base/java.lang.Thread.run(Thread.java:1596)
      ForceGC condition met after System.gc() 2 times
      test ReflectionCallerCacheTest.load("AccessTest$PublicFinalField"): success
      ForceGC condition met after System.gc() 2 times
      test ReflectionCallerCacheTest.load("AccessTest$PrivateFinalField"): success
      ForceGC condition met after System.gc() 2 times
      test ReflectionCallerCacheTest.load("AccessTest$PublicStaticFinalField"): success
      ForceGC condition met after System.gc() 2 times
      test ReflectionCallerCacheTest.load("AccessTest$PrivateStaticFinalField"): success
      ForceGC condition met after System.gc() 1 times
      test ReflectionCallerCacheTest.load("AccessTest$NewInstance"): success

      ===============================================
      java/lang/reflect/callerCache/ReflectionCallerCacheTest.java
      Total tests run: 12, Passes: 11, Failures: 1, Skips: 0
      ===============================================

      ----------System.err:(14/906)----------
      Note: /System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-19+26-2059/src.full/open/test/jdk/java/lang/reflect/callerCache/AccessTest.java uses or overrides a deprecated API.
      Note: Recompile with -Xlint:deprecation for details.
      java.lang.Exception: failures: 1
      at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:96)
      at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:578)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
      at java.base/java.lang.Thread.run(Thread.java:1596)

      JavaTest Message: Test threw exception: java.lang.Exception: failures: 1
      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: java.lang.Exception: failures: 1
      ----------rerun:(46/7875)*----------

      Attachments

        Issue Links

          Activity

            People

              mchung Mandy Chung
              dcubed Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: