openj9 icon indicating copy to clipboard operation
openj9 copied to clipboard

jdk22 java/foreign/critical/TestCritical.java Heap segment not allowed

Open pshipton opened this issue 1 year ago • 8 comments

https://openj9-jenkins.osuosl.org/job/Pipeline-Build-Test-JDK22/10/ - all platforms

https://openj9-jenkins.osuosl.org/job/Test_openjdk22_j9_sanity.openjdk_aarch64_linux_Nightly_testList_1/8/ https://openj9-jenkins.osuosl.org/job/Test_openjdk22_j9_sanity.openjdk_aarch64_linux_Nightly_testList_2/8/ jdk_foreign java/foreign/critical/TestCritical.java

23:18:18  NativeTestHelper::DEFAULT_RANDOM.seed = -654531519
23:18:18  Re-run with '-DNativeTestHelper.DEFAULT_RANDOM.seed=-654531519' to reproduce
23:18:18  test TestCritical.testAllowHeap(TestCritical$AllowHeapCase@8bbe5efa): failure
23:18:18  java.lang.IllegalArgumentException: Heap segment not allowed: MemorySegment{ heapBase: [B@3c73a5d9, address: 0x0, byteSize: 10 }
23:18:18  	at java.base/openj9.internal.foreign.abi.UpcallMHMetaData.validateNativeArgRetSegmentOfPtr(UpcallMHMetaData.java:110)
23:18:18  	at java.base/openj9.internal.foreign.abi.InternalDowncallHandler.memSegmtOfPtrToLongArg(InternalDowncallHandler.java:214)
23:18:18  	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733)
23:18:18  	at TestCritical.testAllowHeap(TestCritical.java:119)

@ChengJin01 fyi

pshipton avatar Feb 12 '24 19:02 pshipton

The test failure is expected for JDK22 as the related functionality (passing the heap argument to native) will be covered by https://github.com/eclipse-openj9/openj9/pull/18930.

ChengJin01 avatar Feb 12 '24 19:02 ChengJin01

Perhaps https://github.com/adoptium/aqa-tests/pull/5052 was merged prematurely? Maybe it should have waited until #18930 was merged?

keithc-ca avatar Feb 12 '24 19:02 keithc-ca

Perhaps adoptium/aqa-tests#5052 was merged prematurely? Maybe it should have waited until #18930 was merged?

We need to know how many issues are left to be addressed by enabling all FFI specific test suites in JDK22+ except the functionality specific issue with https://github.com/eclipse-openj9/openj9/pull/18930.

ChengJin01 avatar Feb 12 '24 20:02 ChengJin01

Yes, but that can be done via grinders without sacrificing nightly and other builds.

keithc-ca avatar Feb 12 '24 20:02 keithc-ca

Yes, but that can be done via grinders without sacrificing nightly and other builds.

We can disable the failing test suites via https://github.com/adoptium/aqa-tests for the moment and re-enable one by one once we fix them up.

@pshipton, any input on this?

ChengJin01 avatar Feb 12 '24 20:02 ChengJin01

I agree, we should individually disable all the failing tests until they are fixed. Are you going to create the PR to do that?

pshipton avatar Feb 12 '24 20:02 pshipton

I agree, we should individually disable all the failing tests until they are fixed. Are you going to create the PR to do that?

Yes. Will do that later today.

ChengJin01 avatar Feb 12 '24 20:02 ChengJin01

I just created a PR at https://github.com/adoptium/aqa-tests/pull/5056 to disable all failing FFI test suites detected in JDK22+.

ChengJin01 avatar Feb 12 '24 23:02 ChengJin01