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

jdk20 OpenjDK java/lang/Thread/jni/AttachCurrentThread/AttachTest NullPointerException Cannot invoke "java.lang.invoke.MethodHandle.type()" because "target" is null #16656

Closed
pshipton opened this issue Feb 2, 2023 · 7 comments
Assignees
Labels
comp:vm jdk20 project:panama Used to track Project Panama related work test failure

Comments

@pshipton
Copy link
Member

pshipton commented Feb 2, 2023

https://openj9-jenkins.osuosl.org/job/Test_openjdk20_j9_sanity.openjdk_aarch64_linux_OpenJDK20/1
Most platforms, not platform specific. Didn't fail on Windows, AIX.
jdk_lang
java/lang/Thread/jni/AttachCurrentThread/AttachTest.java

10:29:53  Exception in thread "main" java.lang.NullPointerException: Cannot invoke "java.lang.invoke.MethodHandle.type()" because "target" is null
10:29:53  	at java.base/java.lang.invoke.MethodHandles.insertArgumentsChecks(MethodHandles.java:5218)
10:29:53  	at java.base/java.lang.invoke.MethodHandles.insertArguments(MethodHandles.java:5187)
10:29:53  	at java.base/jdk.internal.foreign.abi.SharedUtils.maybeInsertAllocator(SharedUtils.java:292)
10:29:53  	at java.base/jdk.internal.foreign.abi.AbstractLinker.lambda$downcallHandle$0(AbstractLinker.java:72)
10:29:53  	at java.base/jdk.internal.foreign.abi.SoftReferenceCache$Node.get(SoftReferenceCache.java:52)
10:29:53  	at java.base/jdk.internal.foreign.abi.SoftReferenceCache.get(SoftReferenceCache.java:38)
10:29:53  	at java.base/jdk.internal.foreign.abi.AbstractLinker.downcallHandle(AbstractLinker.java:68)
10:29:53  	at java.base/java.lang.foreign.Linker.downcallHandle(Linker.java:213)
10:29:53  	at ImplicitAttach.main(ImplicitAttach.java:67)
@pshipton pshipton added this to the Java 20 milestone Feb 2, 2023
@pshipton pshipton changed the title JDK20 OpenjDK java/lang/Thread/jni/AttachCurrentThread/AttachTest NullPointerException Cannot invoke "java.lang.invoke.MethodHandle.type()" because "target" is null jdk20 OpenjDK java/lang/Thread/jni/AttachCurrentThread/AttachTest NullPointerException Cannot invoke "java.lang.invoke.MethodHandle.type()" because "target" is null Feb 2, 2023
@pshipton
Copy link
Member Author

pshipton commented Feb 2, 2023

@tajila fyi

@tajila tajila added the project:MH Used to track Method Handles related work label Feb 2, 2023
@babsingh
Copy link
Contributor

babsingh commented Feb 7, 2023

jdk/internal/foreign/abi/AbstractLinker.java#L71-L72

AbstractLinker.downcallHandle(...) {
            MethodHandle handle = arrangeDowncall(type, fd, linkRequest.options());
            handle = SharedUtils.maybeInsertAllocator(fd, handle);
            return handle;

The MethodHandle generated by arrangeDowncall is NULL. The NULL MethodHandle is passed from AbstractLinker.lambda$downcallHandle$0 to MethodHandles.insertArgumentsChecks.

This failure is due to missing features for Foreign Function & Memory API (Second Preview): https://openjdk.org/jeps/434.

Related: #16329.

++@ChengJin01 to confirm the above details and decide if the test should be disabled since FFI specific code has been temporarily disabled in JDK20, ref: #16329 (comment)?

@babsingh babsingh removed the project:MH Used to track Method Handles related work label Feb 7, 2023
@ChengJin01
Copy link

@babsingh, the test suite should be excluded given all FFI related code are disabled in JDK20 for the moment and not yet updated against the latest APIs in which case we have been working on.

ChengJin01 pushed a commit to ChengJin01/aqa-tests that referenced this issue Feb 7, 2023
The change is to exclude the FFI related test cases
in AttachTest.java captured at
eclipse-openj9/openj9#16656
given the FFI related code in JDK20 has been disabled
for the moment and will be enabled once the code has
been updated against the latest APIs.

Signed-off-by: ChengJin01 <[email protected]>
@babsingh babsingh added the project:panama Used to track Project Panama related work label Feb 8, 2023
smlambert pushed a commit to adoptium/aqa-tests that referenced this issue Feb 8, 2023
The change is to exclude the FFI related test cases
in AttachTest.java captured at
eclipse-openj9/openj9#16656
given the FFI related code in JDK20 has been disabled
for the moment and will be enabled once the code has
been updated against the latest APIs.

Signed-off-by: ChengJin01 <[email protected]>
@ChengJin01
Copy link

@pshipton, given we have #16565 opened to keep track of all excluded FFI jtreg test suites, can we close this issue as this failing test suite was excluded via adoptium/aqa-tests#4318?

@babsingh
Copy link
Contributor

babsingh commented Feb 8, 2023

can we close this issue as a duplicate?

@ChengJin01 Yes. In adoptium/aqa-tests#4318, the test is currently disabled by referring to this issue (#16656). Before closing this issue as a duplicate of #16565, we will have to disable the test by referring to #16565.

@ChengJin01
Copy link

PR is created at adoptium/aqa-tests#4324 to replace #16656 with #16565.

@ChengJin01
Copy link

adoptium/aqa-tests#4324 was merged.

sophia-guo pushed a commit to sophia-guo/openjdk-tests that referenced this issue Mar 10, 2023
The change is to exclude the FFI related test cases
in AttachTest.java captured at
eclipse-openj9/openj9#16656
given the FFI related code in JDK20 has been disabled
for the moment and will be enabled once the code has
been updated against the latest APIs.

Signed-off-by: ChengJin01 <[email protected]>
sophia-guo pushed a commit to sophia-guo/openjdk-tests that referenced this issue Mar 10, 2023
The change is to exclude the FFI related test cases
in AttachTest.java captured at
eclipse-openj9/openj9#16656
given the FFI related code in JDK20 has been disabled
for the moment and will be enabled once the code has
been updated against the latest APIs.

Signed-off-by: ChengJin01 <[email protected]>
smlambert added a commit to adoptium/aqa-tests that referenced this issue Mar 10, 2023
* Set up jdk for jck interactive (#4239)

* Set up jdk for jck interactive

Signed-off-by: Sophia Guo <[email protected]>

* Add parameter SETUP_JCK_RUN explicitely

Signed-off-by: Sophia Guo <[email protected]>

---------

Signed-off-by: Sophia Guo <[email protected]>

* [Jtreg/FFI] Disable FFI related test suite in JDK20 (#4318)

The change is to exclude the FFI related test cases
in AttachTest.java captured at
eclipse-openj9/openj9#16656
given the FFI related code in JDK20 has been disabled
for the moment and will be enabled once the code has
been updated against the latest APIs.

Signed-off-by: ChengJin01 <[email protected]>

* Fix if condition for tck interactive setup (#4320)

Signed-off-by: Mesbah Alam <[email protected]>

* [Jtreg/FFI] update the issue no for FFI test suites in JDK20 (#4324)

The change updates the issue no by replacing
#16656 with #16565 as #16656 will be closed
as duplicate of #16565, in which case #16565
serves as the only issue that keeps track of
the excluded FFI test suites in JDK20.

Signed-off-by: ChengJin01 <[email protected]>

* Add OpenJ9 timeout handler to security and rmi extended tests (#4333)

Signed-off-by: Peter Shipton <[email protected]>

* Disable GetStackTraceSuspendedStressTest (#4360)

Related: eclipse-openj9/openj9#16751

Signed-off-by: Babneet Singh <[email protected]>

* Update JDK20 exclude list (#4371)

Re-enable Thread related tests fixed in JDK19

Signed-off-by: Jack Lu <[email protected]>

* Disable ContinuationTest (#4380)

ContinuationTest is being disabled for OpenJ9 since it is specific to
the reference implementation and it does not apply to OpenJ9.

Signed-off-by: Babneet Singh <[email protected]>

* Permanently disable ContinuationTest (#4382)

Refer to #1297 to permanently exclude.

Related: eclipse-openj9/openj9#16792
Related: #1297

Signed-off-by: Babneet Singh <[email protected]>

* Exclude jdk/internal/platform/docker/TestDockerCpuMetrics.java (#4387)

Signed-off-by: Jason Feng <[email protected]>

* AUTO: auto exclude test jdk_svc_sanity plat=ppc64_aix impl=hotspot (#4389)

- related: #4218 (comment)

Signed-off-by: GitHub <[email protected]>
Co-authored-by: smlambert <[email protected]>

---------

Signed-off-by: Sophia Guo <[email protected]>
Signed-off-by: ChengJin01 <[email protected]>
Signed-off-by: Mesbah Alam <[email protected]>
Signed-off-by: Peter Shipton <[email protected]>
Signed-off-by: Babneet Singh <[email protected]>
Signed-off-by: Jack Lu <[email protected]>
Signed-off-by: Jason Feng <[email protected]>
Signed-off-by: GitHub <[email protected]>
Co-authored-by: Cheng Jin <[email protected]>
Co-authored-by: Mesbah Alam <[email protected]>
Co-authored-by: Peter Shipton <[email protected]>
Co-authored-by: Babneet Singh <[email protected]>
Co-authored-by: Jack Lu <[email protected]>
Co-authored-by: Jason Feng <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: smlambert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:vm jdk20 project:panama Used to track Project Panama related work test failure
Projects
None yet
Development

No branches or pull requests

4 participants