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

[21u] Test CreationTime.java fails with UnsatisfiedLinkError after 8334339

XMLWordPrintable

    • b08

        The test fails with
        java.lang.UnsatisfiedLinkError: Native Library .../test/jdk/jtreg/native/libCreationTimeHelper.so already loaded in another classloader
        at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:201)
        at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)
        at java.base/jdk.internal.loader.NativeLibraries.findFromPaths(NativeLibraries.java:315)
        at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:287)
        at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2427)
        at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)
        at java.base/java.lang.System.loadLibrary(System.java:2006)
        at CreationTimeHelper.<clinit>(CreationTimeHelper.java:26)
        at CreationTime.test(CreationTime.java:106)
        at CreationTime.main(CreationTime.java:149)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:569)
        at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
        at java.base/java.lang.Thread.run(Thread.java:840)

        JDK-8334339 added a second test run causing the lib to be loaded twice in case jtreg runs tests highly parallel.

        The fix applies only to 21 and older as the test uses JNI here, while using FFM API in 22 and yougner.

        Fix: run one of the two tests as /othervm.

              goetz Goetz Lindenmaier
              goetz Goetz Lindenmaier
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: