Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK18 jdk_foreign java/foreign/TestUpcall.java - UnsatisfiedLinkError: jdk/internal/foreign/abi/ProgrammableUpcallHandler.registerNatives()V #14134

Closed
JasonFengJ9 opened this issue Dec 10, 2021 · 8 comments

Comments

@JasonFengJ9
Copy link
Member

Failure link

From an internal build job/Test_openjdknext_j9_sanity.openjdk_x86-64_linux_Personal/133/consoleFull:

17:51:27  openjdk version "18-internal" 2022-03-22
17:51:27  OpenJDK Runtime Environment (build 18-internal+0-adhoc.jenkins.BuildJDKnextx86-64linuxPersonal)
17:51:27  Eclipse OpenJ9 VM (build master-9f6e55d3a25, JRE 18 Linux amd64-64-Bit Compressed References 20211209_920 (JIT enabled, AOT enabled)
17:51:27  OpenJ9   - 9f6e55d3a25
17:51:27  OMR      - ff2e42cc3e3
17:51:27  JCL      - 742164f41cc based on jdk-18+26)

Rerun in Grinder - Change TARGET to run only the failed test targets.

Optional info

Failure output (captured from console output)

20:27:34  variation: Mode150
20:27:34  JVM_OPTIONS:  -XX:+UseCompressedOops 

20:30:40  --------------------------------------------------
20:30:40  TEST: java/foreign/TestUpcall.java#async

20:30:40  STDOUT:
20:30:40  config TestUpcall.setup(): failure
20:30:40  java.lang.UnsatisfiedLinkError: jdk/internal/foreign/abi/ProgrammableUpcallHandler.registerNatives()V
20:30:40  	at jdk.incubator.foreign/jdk.internal.foreign.abi.ProgrammableUpcallHandler.<clinit>(ProgrammableUpcallHandler.java:314)
20:30:40  	at jdk.incubator.foreign/jdk.internal.foreign.abi.x64.sysv.CallArranger.arrangeUpcall(CallArranger.java:143)
20:30:40  	at jdk.incubator.foreign/jdk.internal.foreign.abi.x64.sysv.SysVx64Linker.upcallStub(SysVx64Linker.java:92)
20:30:40  	at TestUpcall.setup(TestUpcall.java:124)
20:30:40  	at java.lang.invoke.LambdaForm$DMH/0x00000000a00c8870.invokeVirtual(LambdaForm$DMH)
20:30:40  	at java.lang.invoke.LambdaForm$MH/0x00000000a015d160.invoke(LambdaForm$MH)
20:30:40  	at java.lang.invoke.LambdaForm$MH/0x00000000201c5810.invokeExact_MT(LambdaForm$MH)
20:30:40  	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(DirectMethodHandleAccessor.java:154)
20:30:40  	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
20:30:40  	at java.base/java.lang.reflect.Method.invoke(Method.java:577)
20:30:40  	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
20:30:40  	at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:61)
20:30:40  	at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:366)
20:30:40  	at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:320)
20:30:40  	at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:176)
20:30:40  	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:122)
20:30:40  	at org.testng.TestRunner$$Lambda$91/0x00000000a013e618.accept(Unknown Source)
20:30:40  	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
20:30:40  	at org.testng.TestRunner.privateRun(TestRunner.java:764)
20:30:40  	at org.testng.TestRunner.run(TestRunner.java:585)
20:30:40  	at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
20:30:40  	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
20:30:40  	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
20:30:40  	at org.testng.SuiteRunner.run(SuiteRunner.java:286)
20:30:40  	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
20:30:40  	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
20:30:40  	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
20:30:40  	at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
20:30:40  	at org.testng.TestNG.runSuites(TestNG.java:1069)
20:30:40  	at org.testng.TestNG.run(TestNG.java:1037)
20:30:40  	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:94)
20:30:40  	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
20:30:40  	at java.lang.invoke.LambdaForm$DMH/0x00000000a0006d00.invokeStatic(LambdaForm$DMH)
20:30:40  	at java.lang.invoke.LambdaForm$MH/0x00000000a000c020.invoke(LambdaForm$MH)
20:30:40  	at java.lang.invoke.LambdaForm$MH/0x00000000a000c540.invokeExact_MT(LambdaForm$MH)
20:30:40  	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(DirectMethodHandleAccessor.java:155)
20:30:40  	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
20:30:40  	at java.base/java.lang.reflect.Method.invoke(Method.java:577)
20:30:40  	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
20:30:40  	at java.base/java.lang.Thread.run(Thread.java:884)
20:30:40  test TestUpcall.testUpcalls(0, "f0_V__", VOID, [], []): skip

There are lots of similar UnsatisfiedLinkError. These tests might not apply to OpenJ9, or require changes to adopt Semeru runtime. I think they can be excluded for now to improve triage.

fyi @ChengJin01

@ChengJin01
Copy link

ChengJin01 commented Dec 10, 2021

As I mentioned at #13946 & #13994, all foreign specific test suites in jtreg test should be excluded as the whole feature has not yet implemented (including downcall & upcall) given adoptium/aqa-tests#3150 is the excluded file specific to these test suites.

@ChengJin01
Copy link

I am wondering why adoptium/aqa-tests#3150 didn't exclude these failing test suites.
FYI: @llxia

@JasonFengJ9
Copy link
Member Author

20:30:40  --------------------------------------------------
20:31:40  TEST: java/foreign/upcalldeopt/TestUpcallDeopt.java

20:31:40  java.lang.UnsatisfiedLinkError: sun/hotspot/WhiteBox.registerNatives()V
20:31:40  	at sun.hotspot.WhiteBox.<clinit>(WhiteBox.java:68)
20:31:40  	at TestUpcallDeopt.<clinit>(TestUpcallDeopt.java:59)
20:31:40  	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
20:31:40  	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1522)
20:31:40  	at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.ensureClassInitialized(MethodHandleAccessorFactory.java:300)
20:31:40  	at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.newMethodAccessor(MethodHandleAccessorFactory.java:71)
20:31:40  	at java.base/jdk.internal.reflect.ReflectionFactory.newMethodAccessor(ReflectionFactory.java:192)
20:31:40  	at java.base/java.lang.reflect.Method.acquireMethodAccessor(Method.java:719)
20:31:40  	at java.base/java.lang.reflect.Method.invoke(Method.java:574)
20:31:40  	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
20:31:40  	at java.base/java.lang.Thread.run(Thread.java:884)
20:31:40  STATUS:Failed.`main' threw exception: java.lang.UnsatisfiedLinkError: sun/hotspot/WhiteBox.registerNatives()V

This is another UnsatisfiedLinkError.

@ChengJin01
Copy link

This should be excluded as upcall is not yet implemented.

@ChengJin01
Copy link

List all failing FFI related test suites found at #13946 as follows so as to be tagged in the exclude file:

java/foreign/TestUpcall.java#async.TestUpcall_async
java/foreign/TestUpcall.java#no_scope.TestUpcall_no_scope
java/foreign/TestUpcall.java#scope.TestUpcall_scope
java/foreign/upcalldeopt/TestUpcallDeopt.java.TestUpcallDeopt

Please feel free to add if any other FFI related test suite missing in the list above.

@llxia
Copy link
Contributor

llxia commented Dec 10, 2021

Re #14134 (comment), We had a similar issue before. Please try to use java/foreign/TestUpcall.java#async. For example:

java/foreign/TestUpcall.java#async https://github.com/eclipse-openj9/openj9/issues/13999 generic-all

@JasonFengJ9
Copy link
Member Author

Moving out the iteration plan since the feature in question hasn't been implemented and the test is excluded.

@ChengJin01
Copy link

Close this issue as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants