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

openjdk jdk16 java/foreign/TestNative.java ClassCastException: java.lang.invoke.DirectHandle incompatible with java.lang.invoke.BoundMethodHandle #11724

Closed
pshipton opened this issue Jan 21, 2021 · 4 comments

Comments

@pshipton
Copy link
Member

https://ci.eclipse.org/openj9/job/Test_openjdk16_j9_sanity.openjdk_x86-64_windows_Nightly/1/
https://ci.eclipse.org/openj9/job/Test_openjdk16_j9_sanity.openjdk_x86-64_mac_Nightly/1/
https://ci.eclipse.org/openj9/job/Test_openjdk16_j9_sanity.openjdk_x86-64_linux_Nightly/1/
java/foreign/TestNative.java

00:21:10  Caused by: java.lang.ClassCastException: java.lang.invoke.DirectHandle incompatible with java.lang.invoke.BoundMethodHandle
00:21:10  	at java.base/java.lang.invoke.VarHandles.noCheckedExceptions(VarHandles.java:636)
00:21:10  	at java.base/java.lang.invoke.VarHandles.filterCoordinates(VarHandles.java:476)
00:21:10  	at java.base/java.lang.invoke.MethodHandleImpl$1.filterCoordinates(MethodHandleImpl.java:1781)
00:21:10  	at jdk.incubator.foreign/jdk.incubator.foreign.MemoryHandles.filterCoordinates(MemoryHandles.java:374)
00:21:10  	at jdk.incubator.foreign/jdk.internal.foreign.Utils.fixUpVarHandle(Utils.java:102)
00:21:10  	at jdk.incubator.foreign/jdk.internal.foreign.LayoutPath.dereferenceHandle(LayoutPath.java:166)
00:21:10  	at jdk.incubator.foreign/jdk.incubator.foreign.MemoryLayout.lambda$varHandle$2(MemoryLayout.java:488)
00:21:10  	at jdk.incubator.foreign/jdk.incubator.foreign.MemoryLayout$$Lambda$36/0x0000000000000000.apply(Unknown Source)
00:21:10  	at jdk.incubator.foreign/jdk.incubator.foreign.MemoryLayout.computePathOp(MemoryLayout.java:534)
00:21:10  	at jdk.incubator.foreign/jdk.incubator.foreign.MemoryLayout.varHandle(MemoryLayout.java:488)
00:21:10  	at TestNative.<clinit>(TestNative.java:90)
@babsingh
Copy link
Contributor

babsingh commented Jan 21, 2021

Identical to #10455. The ClassCastException should be resolved by ibmruntimes/openj9-openjdk-jdk16#9. But, TestNative.java falls under the Foreign Linker API (JEP389; incubator), which won't be supported in the 0.25 release. So, I will exclude this test.

JEP389: #11195

@pshipton
Copy link
Member Author

Strangely it's already excluded. Maybe the tests aren't using the jdk16 exclude list? @smlambert @llxia
https://github.com/AdoptOpenJDK/openjdk-tests/blob/master/openjdk/ProblemList_openjdk16-openj9.txt#L340

@smlambert
Copy link
Contributor

smlambert commented Jan 21, 2021

A case where we have been 'tricky' with some native tests... we excluded them in the Problemlists, and then run them via a different TKG target called jdk_foreign_native.

This was so, we can run all remaining tests in jdk_foreign target everywhere and jdk_foreign_native is tagged as 'native' type and not included when run in docker container runs or environments where we do not have the native test libraries and need to run only sanity.openjdk.regular (versus sanity.openjdk.native), related: adoptium/aqa-tests#1921.

@pshipton
Copy link
Member Author

The ClassCastException is resolved, #11760 occurs instead now.

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

3 participants