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

TestLoadLibraryDeadlock.java fails with "Unable to load native library.: expected true, was false"

    XMLWordPrintable

Details

    Backports

      Description

        The following test failed in the JDK22 CI:

        java/lang/ClassLoader/loadLibraryDeadlock/TestLoadLibraryDeadlock.java

        Here's a snippet from the log file:

        #section:main
        ----------messages:(6/285)----------
        command: main -Xcheck:jni TestLoadLibraryDeadlock
        reason: User specified action: run main/othervm/native -Xcheck:jni TestLoadLibraryDeadlock
        started: Wed Oct 11 03:21:31 UTC 2023
        Mode: othervm [/othervm specified]
        finished: Wed Oct 11 03:21:46 UTC 2023
        elapsed time (seconds): 15.144
        ----------configuration:(0/0)----------
        ----------System.out:(37/3004)----------
        COMMAND: /opt/mach5/mesos/work_dir/jib-master/install/jdk-22+19-1462/linux-x64-debug.jdk/jdk-22/fastdebug/bin/keytool -storepass changeit -keypass changeit -keystore keystore.jks -keyalg rsa -keysize 2048 -genkeypair -alias test -dname CN=test -validity 366
        [2023-10-11T03:21:31.284284819Z] Gathering output for process 3085986
        [2023-10-11T03:21:32.716092259Z] Waiting for completion for process 3085986
        [2023-10-11T03:21:32.716285545Z] Waiting for completion finished for process 3085986
        Output and diagnostic info for process 3085986 was saved into 'pid-3085986-output.log'
        [2023-10-11T03:21:32.729673568Z] Waiting for completion for process 3085986
        [2023-10-11T03:21:32.729805329Z] Waiting for completion finished for process 3085986
        added manifest
        adding: LoadLibraryDeadlock.class(in = 650) (out= 431)(deflated 33%)
        adding: LoadLibraryDeadlock$1.class(in = 1035) (out= 609)(deflated 41%)
        adding: LoadLibraryDeadlock$2.class(in = 881) (out= 549)(deflated 37%)
        added manifest
        adding: Class1.class(in = 481) (out= 330)(deflated 31%)
        added manifest
        adding: p/Class2.class(in = 188) (out= 158)(deflated 15%)
        COMMAND: /opt/mach5/mesos/work_dir/jib-master/install/jdk-22+19-1462/linux-x64-debug.jdk/jdk-22/fastdebug/bin/jarsigner -keystore keystore.jks -storepass changeit c.jar test
        [2023-10-11T03:21:32.869244297Z] Gathering output for process 3086013
        [2023-10-11T03:21:34.147437592Z] Waiting for completion for process 3086013
        [2023-10-11T03:21:34.147652229Z] Waiting for completion finished for process 3086013
        Output and diagnostic info for process 3086013 was saved into 'pid-3086013-output.log'
        [2023-10-11T03:21:34.148342559Z] Waiting for completion for process 3086013
        [2023-10-11T03:21:34.148415436Z] Waiting for completion finished for process 3086013
        COMMAND: /opt/mach5/mesos/work_dir/jib-master/install/jdk-22+19-1462/linux-x64-debug.jdk/jdk-22/fastdebug/bin/java -cp a.jar:b.jar:c.jar -Djava.library.path=/opt/mach5/mesos/work_dir/jib-master/install/jdk-22+19-1462/linux-x64-debug.test/jdk/jtreg/native LoadLibraryDeadlock

        COMMAND: /opt/mach5/mesos/work_dir/jib-master/install/jdk-22+19-1462/linux-x64-debug.jdk/jdk-22/fastdebug/bin/jcmd 3086039 Thread.print
        [2023-10-11T03:21:40.167915121Z] Gathering output for process 3086060
        [2023-10-11T03:21:46.064971788Z] Waiting for completion for process 3086060
        [2023-10-11T03:21:46.065524556Z] Waiting for completion finished for process 3086060
        Output and diagnostic info for process 3086060 was saved into 'pid-3086060-output.log'
        3086039:
        java.io.IOException: No such process
        at jdk.attach/sun.tools.attach.VirtualMachineImpl.sendQuitTo(Native Method)
        at jdk.attach/sun.tools.attach.VirtualMachineImpl.<init>(VirtualMachineImpl.java:94)
        at jdk.attach/sun.tools.attach.AttachProviderImpl.attachVirtualMachine(AttachProviderImpl.java:58)
        at jdk.attach/com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:207)
        at jdk.jcmd/sun.tools.jcmd.JCmd.executeCommandForPid(JCmd.java:113)
        at jdk.jcmd/sun.tools.jcmd.JCmd.main(JCmd.java:97)
        ----------System.err:(13/845)----------
        java.lang.RuntimeException: Unable to load native library.: expected true, was false
        at jdk.test.lib.Asserts.fail(Asserts.java:594)
        at jdk.test.lib.Asserts.assertTrue(Asserts.java:486)
        at TestLoadLibraryDeadlock.main(TestLoadLibraryDeadlock.java:229)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
        at java.base/java.lang.Thread.run(Thread.java:1570)

        JavaTest Message: Test threw exception: java.lang.RuntimeException: Unable to load native library.: expected true, was false
        JavaTest Message: shutting down test

        STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Unable to load native library.: expected true, was false
        ----------rerun:(38/7270)*----------


        The following Graal specific bug appears to have the same failure mode:

        JDK-8315867 TestLoadLibraryDeadlock.java fails transiently on libgraal

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved: