eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.28k stars 721 forks source link

[Jtreg_JDK21] IOException detected in TestByteBuffer.java #17870

Closed ChengJin01 closed 1 year ago

ChengJin01 commented 1 year ago

There is a subtest failure in TestByteBuffer.java at https://openj9-jenkins.osuosl.org/job/Grinder/2619/consoleText

test TestByteBuffer.testMappedSegmentAsByteBuffer(): failure
java.io.UncheckedIOException: java.io.IOException: Invalid argument (msync with parameter MS_SYNC failed)
    at java.base/java.nio.MappedMemoryUtils.force(MappedMemoryUtils.java:105)
    at java.base/java.nio.Buffer$2.force(Buffer.java:890)
    at java.base/jdk.internal.misc.ScopedMemoryAccess.forceInternal(ScopedMemoryAccess.java:317)
    at java.base/jdk.internal.misc.ScopedMemoryAccess.force(ScopedMemoryAccess.java:305)
    at java.base/jdk.internal.foreign.MappedMemorySegmentImpl.force(MappedMemorySegmentImpl.java:92)
    at TestByteBuffer.testMappedSegmentAsByteBuffer(TestByteBuffer.java:321)

which is most likely related to ScopedMemoryAccess.

Note: the failure was only detected on AIX for the moment.

FYI: @babsingh, @tajila, @pshipton

babsingh commented 1 year ago

All the elements in the above stack trace are implemented in the extension repo (OpenJDK). The test fails because msysc fails on AIX:

@backwaterred Are there plans to backport the above fix to JDK21?

backwaterred commented 1 year ago

I'm happy to backport this fix when it's merged :-)

babsingh commented 1 year ago

I'm happy to backport this fix when it's merged :-)

Thanks, let us know once the backport is delivered. We will use it to close this issue.

tajila commented 1 year ago

@backwaterred any update on this?

backwaterred commented 1 year ago

Yeah, sorry. The backport merged in the last week or so. These changes are now in the headstream for jdk 22, & 21.

babsingh commented 1 year ago

Thanks @backwaterred. Closing as per https://github.com/eclipse-openj9/openj9/issues/17870#issuecomment-1716185910.

pshipton commented 1 year ago

We should keep this open until we have the fix. Not sure if it will be in 21.0.1, we might be waiting for 21.0.2. Or we can bring it manually for now.

babsingh commented 1 year ago

https://github.com/adoptium/aqa-tests/blob/1c9bad0f19205223df3a26bbce4ab929a12f5eb2/openjdk/excludes/ProblemList_openjdk21-openj9.txt#L491

Added the exclude label since the test is currently excluded.

Not sure if it will be in 20.0.1, we might be waiting for 20.0.2. Or we can bring it manually for now.

For Java 21? Since Java 20 is no longer supported.

pshipton commented 1 year ago

Yes, I meant 21.0.1 and 21.0.2.

babsingh commented 1 year ago

@backwaterred https://github.com/openjdk/jdk/pull/14963 seems RI specific. Will this fix also apply to OpenJ9?

backwaterred commented 1 year ago

Ah, I see you have linked part 1 of the fix above, which is Hotspot specific.

The main part of the issue is here: https://github.com/openjdk/jdk/pull/14964

babsingh commented 1 year ago

@backwaterred Has https://github.com/openjdk/jdk/pull/14964 also been merged into the headstream for jdk 22, & 21?

backwaterred commented 1 year ago

Yes it has. Both the PR against 22 and the backport to 21 are merged.

babsingh commented 1 year ago

We should keep this open until we have the fix. Not sure if it will be in 21.0.1, we might be waiting for 21.0.2. Or we can bring it manually for now.

The fix already exists in JDK-next: https://github.com/ibmruntimes/openj9-openjdk-jdk/commit/13fa40bdfeb6083a1114fbce24abc51e1ea8282f.

We should manually bring the fix to JDK21. It will allow us to enable the test and identify other OpenJ9 specific issues (if any) with the test earlier. @pshipton https://github.com/ibmruntimes/openj9-openjdk-jdk21/pull/44 backports the fix to JDK21.

pshipton commented 1 year ago

@babsingh I think the test can be unexcluded now and this closed?

babsingh commented 1 year ago

yes, i was looking for a nightly build to run a grinder. but, i didn't find a build with the fix yet. i will run a grinder from a personal build to verify the fix and re-enable the test.

pshipton commented 1 year ago

The latest nightly jdk21 build contains the fix. We have builds for all platforms but AIX. In the grinder you can use the default, which is the latest.

pshipton commented 1 year ago

Right, duh, AIX is the platform we need. I'll re-run the build. https://openj9-jenkins.osuosl.org/job/Pipeline-Build-Test-JDK21/114/

babsingh commented 1 year ago

https://openj9-jenkins.osuosl.org/job/Pipeline-Build-Test-JDK21/114/

Thanks, the build successfully completed. Started a grinder to verify the fix: https://openj9-jenkins.osuosl.org/job/Grinder/2929.

babsingh commented 1 year ago