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

RawNativeLibraryImpl can't be passed to NativeLibraries::findEntry0

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 19
    • Fix Version/s: 19
    • Component/s: core-libs
    • Labels:

      Description

      The following tests failed in the JDK19 CI:

         2 java/foreign/SafeFunctionAccessTest.java
         2 java/foreign/StdLibTest.java
         2 java/foreign/TestDowncall.java
         2 java/foreign/TestFunctionDescriptor.java
         2 java/foreign/TestIllegalLink.java
         2 java/foreign/TestIntrinsics.java
         2 java/foreign/TestNative.java
         2 java/foreign/TestUpcall.java#async
         2 java/foreign/TestUpcall.java#no_scope
         2 java/foreign/TestUpcall.java#scope
         2 java/foreign/TestUpcallException.java
         2 java/foreign/TestUpcallHighArity.java
         2 java/foreign/TestUpcallStructScope.java
         2 java/foreign/TestVarArgs.java
         2 java/foreign/malloc/TestMixedMallocFree.java
         2 java/foreign/stackwalk/TestAsyncStackWalk.java#default_gc
         2 java/foreign/stackwalk/TestAsyncStackWalk.java#zgc
         2 java/foreign/stackwalk/TestStackWalk.java#default_gc
         2 java/foreign/stackwalk/TestStackWalk.java#zgc
         2 java/foreign/upcalldeopt/TestUpcallDeopt.java
         2 java/foreign/valist/VaListTest.java
         2 java/foreign/virtual/TestVirtualCalls.java

      So far the tests have failed on linux-aarch64 and linux-x64.

      This looks like a regression so I'm starting this bug as a P2.

      Here's a snippet from the TestVirtualCalls.java log file:

      ----------System.out:(49/3901)----------
      FATAL ERROR in native method: Wrong field ID passed to JNI
      at jdk.internal.loader.NativeLibraries.findEntry0(java.base@19-ea/Native Method)
      at jdk.internal.loader.RawNativeLibraries$RawNativeLibraryImpl.find(java.base@19-ea/RawNativeLibraries.java:156)
      at jdk.internal.loader.NativeLibrary.lookup(java.base@19-ea/NativeLibrary.java:49)
      at jdk.internal.foreign.SystemLookup.lambda$libLookup$7(jdk.incubator.foreign@19-ea/SystemLookup.java:94)
      at jdk.internal.foreign.SystemLookup$$Lambda$65/0x000000080106f520.lookup(jdk.incubator.foreign@19-ea/Unknown Source)
      at jdk.internal.foreign.SystemLookup.lookup(jdk.incubator.foreign@19-ea/SystemLookup.java:119)
      at jdk.incubator.foreign.CLinker.lookup(jdk.incubator.foreign@19-ea/CLinker.java:173)
      at NativeTestHelper.<clinit>(NativeTestHelper.java:91)
      at jdk.internal.misc.Unsafe.ensureClassInitialized0(java.base@19-ea/Native Method)
      at jdk.internal.misc.Unsafe.ensureClassInitialized(java.base@19-ea/Unsafe.java:1160)
      at jdk.internal.reflect.MethodHandleAccessorFactory.ensureClassInitialized(java.base@19-ea/MethodHandleAccessorFactory.java:300)
      at jdk.internal.reflect.MethodHandleAccessorFactory.newConstructorAccessor(java.base@19-ea/MethodHandleAccessorFactory.java:103)
      at jdk.internal.reflect.ReflectionFactory.newConstructorAccessor(java.base@19-ea/ReflectionFactory.java:201)
      at java.lang.reflect.Constructor.acquireConstructorAccessor(java.base@19-ea/Constructor.java:546)
      at java.lang.reflect.Constructor.newInstanceWithCaller(java.base@19-ea/Constructor.java:496)
      at java.lang.reflect.Constructor.newInstance(java.base@19-ea/Constructor.java:483)
      at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:23)
      at org.testng.internal.InstanceCreator.instantiateUsingDefaultConstructor(InstanceCreator.java:193)
      at org.testng.internal.InstanceCreator.createInstanceUsingObjectFactory(InstanceCreator.java:113)
      at org.testng.internal.InstanceCreator.createInstance(InstanceCreator.java:79)
      at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:109)
      at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:167)
      at org.testng.TestClass.getInstances(TestClass.java:102)
      at org.testng.TestClass.initTestClassesAndInstances(TestClass.java:82)
      at org.testng.TestClass.init(TestClass.java:74)
      at org.testng.TestClass.<init>(TestClass.java:39)
      at org.testng.TestRunner.initMethods(TestRunner.java:457)
      at org.testng.TestRunner.init(TestRunner.java:336)
      at org.testng.TestRunner.init(TestRunner.java:289)
      at org.testng.TestRunner.<init>(TestRunner.java:180)
      at org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:613)
      at org.testng.SuiteRunner.init(SuiteRunner.java:178)
      at org.testng.SuiteRunner.<init>(SuiteRunner.java:112)
      at org.testng.TestNG.createSuiteRunner(TestNG.java:1306)
      at org.testng.TestNG.createSuiteRunners(TestNG.java:1282)
      at org.testng.TestNG.runSuitesLocally(TestNG.java:1131)
      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.lang.invoke.LambdaForm$DMH/0x0000000801002000.invokeStatic(java.base@19-ea/LambdaForm$DMH)
      at java.lang.invoke.LambdaForm$MH/0x0000000801003400.invoke(java.base@19-ea/LambdaForm$MH)
      at java.lang.invoke.Invokers$Holder.invokeExact_MT(java.base@19-ea/Invokers$Holder)
      at jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(java.base@19-ea/DirectMethodHandleAccessor.java:155)
      at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(java.base@19-ea/DirectMethodHandleAccessor.java:104)
      at java.lang.reflect.Method.invoke(java.base@19-ea/Method.java:577)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
      at java.lang.Thread.run(java.base@19-ea/Thread.java:828)
      ----------System.err:(1/56)----------
      WARNING: Using incubator modules: jdk.incubator.foreign
      ----------rerun:(39/7090)*----------

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: