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

jdk_foreign_0_FAILED - java/foreign/TestHandshake.java #13211

Open
JasonFengJ9 opened this issue Jul 19, 2021 · 59 comments
Open

jdk_foreign_0_FAILED - java/foreign/TestHandshake.java #13211

JasonFengJ9 opened this issue Jul 19, 2021 · 59 comments
Labels
comp:jit comp:vm project:panama Used to track Project Panama related work test failure
Milestone

Comments

@JasonFengJ9
Copy link
Member

Failure link

https://openj9-jenkins.osuosl.org/job/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Nightly/55/consoleFull

22:09:40  openjdk version "16.0.1-internal" 2021-04-20
22:09:40  OpenJDK Runtime Environment (build 16.0.1-internal+0-adhoc.****.BuildJDK16ppc64aixNightly)
22:09:40  Eclipse OpenJ9 VM (build master-074746f7710, JRE 16 AIX ppc64-64-Bit Compressed References 20210718_55 (JIT enabled, AOT enabled)
22:09:40  OpenJ9   - 074746f7710
22:09:40  OMR      - 88427d6420f
22:09:40  JCL      - 5dd08a5cc3f based on jdk-16.0.1+9)

Rerun in Grinder

Optional info

Failure output (captured from console output)

06:14:39  ===============================================
06:14:39  java/foreign/TestHandshake.java
06:14:39  Total tests run: 6, Failures: 1, Skips: 0
06:14:39  ===============================================
06:14:39  

06:14:39  ...
06:14:39  Output overflow:
06:14:39  JT Harness has limited the test output to the text
06:14:39  at the beginning and the end, so that you can see how the
06:14:39  test began, and how it completed.
06:14:39  
06:14:39  If you need to see more of the output from the test,
06:14:39  set the system property javatest.maxOutputSize to a higher
06:14:39  value. The current value is 100000
06:14:39  ...

06:14:39  STDERR:
06:14:39  WARNING: Using incubator modules: jdk.incubator.foreign
06:14:39  java.lang.Exception: failures: 1
06:14:39  	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:96)
06:14:39  	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
06:14:39  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
06:14:39  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
06:14:39  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
06:14:39  	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
06:14:39  	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
06:14:39  	at java.base/java.lang.Thread.run(Thread.java:883)
06:14:39  
06:14:39  JavaTest Message: Test threw exception: java.lang.Exception: failures: 1

06:14:39  rerun:
06:14:39  cd /home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Nightly/aqa-tests/TKG/output_16266607888323/jdk_foreign_0/work/scratch && \
06:14:39  DISPLAY=:0 \
06:14:39  HOME=/home/jenkins \
06:14:39  LANG=en_US \
06:14:39  PATH=/bin:/usr/bin:/usr/sbin \
06:14:39  TZ=EST5EDT \
06:14:39  CLASSPATH=/home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Nightly/aqa-tests/TKG/output_16266607888323/jdk_foreign_0/work/classes/java/foreign/TestHandshake.d:/home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Nightly/aqa-tests/openjdk/openjdk-jdk/test/jdk/java/foreign:/home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Nightly/jvmtest/openjdk/jtreg/lib/testng.jar:/home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Nightly/jvmtest/openjdk/jtreg/lib/jcommander.jar:/home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Nightly/jvmtest/openjdk/jtreg/lib/javatest.jar:/home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Nightly/jvmtest/openjdk/jtreg/lib/jtreg.jar \
06:14:39      /home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Nightly/openjdkbinary/j2sdk-image/bin/java \
06:14:39          -Dtest.vm.opts='-ea -esa -Xmx512m --add-modules jdk.incubator.foreign -XX:+UseCompressedOops' \
06:14:39          -Dtest.tool.vm.opts='-J-ea -J-esa -J-Xmx512m -J--add-modules -Jjdk.incubator.foreign -J-XX:+UseCompressedOops' \
06:14:39          -Dtest.compiler.opts= \
06:14:39          -Dtest.java.opts= \
06:14:39          -Dtest.jdk=/home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Nightly/openjdkbinary/j2sdk-image \
06:14:39          -Dcompile.jdk=/home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Nightly/openjdkbinary/j2sdk-image \
06:14:39          -Dtest.timeout.factor=8.0 \
06:14:39          -Dtest.nativepath=/home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Nightly/openjdkbinary/openjdk-test-image/jdk/jtreg/native \
06:14:39          -Dtest.root=/home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Nightly/aqa-tests/openjdk/openjdk-jdk/test/jdk \
06:14:39          -Dtest.name=java/foreign/TestHandshake.java \
06:14:39          -Dtest.file=/home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Nightly/aqa-tests/openjdk/openjdk-jdk/test/jdk/java/foreign/TestHandshake.java \
06:14:39          -Dtest.src=/home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Nightly/aqa-tests/openjdk/openjdk-jdk/test/jdk/java/foreign \
06:14:39          -Dtest.src.path=/home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Nightly/aqa-tests/openjdk/openjdk-jdk/test/jdk/java/foreign \
06:14:39          -Dtest.classes=/home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Nightly/aqa-tests/TKG/output_16266607888323/jdk_foreign_0/work/classes/java/foreign/TestHandshake.d \
06:14:39          -Dtest.class.path=/home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Nightly/aqa-tests/TKG/output_16266607888323/jdk_foreign_0/work/classes/java/foreign/TestHandshake.d \
06:14:39          -Dtest.class.path.prefix=/home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Nightly/aqa-tests/TKG/output_16266607888323/jdk_foreign_0/work/classes/java/foreign/TestHandshake.d:/home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Nightly/aqa-tests/openjdk/openjdk-jdk/test/jdk/java/foreign \
06:14:39          -Dtest.modules='jdk.incubator.foreign java.base/jdk.internal.vm.annotation java.base/jdk.internal.misc' \
06:14:39          --add-modules jdk.incubator.foreign,java.base \
06:14:39          --add-exports java.base/jdk.internal.vm.annotation=ALL-UNNAMED \
06:14:39          --add-exports java.base/jdk.internal.misc=ALL-UNNAMED \
06:14:39          -ea \
06:14:39          -esa \
06:14:39          -Xmx512m \
06:14:39          -XX:+UseCompressedOops \
06:14:39          -Djava.library.path=/home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Nightly/openjdkbinary/openjdk-test-image/jdk/jtreg/native \
06:14:39          -Xint \
06:14:39          com.sun.javatest.regtest.agent.MainWrapper /home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Nightly/aqa-tests/TKG/output_16266607888323/jdk_foreign_0/work/java/foreign/TestHandshake.d/testng.1.jta java/foreign/TestHandshake.java false TestHandshake
06:14:39  
06:14:39  TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.Exception: failures: 1
06:14:39  --------------------------------------------------
06:15:34  Test results: passed: 30; failed: 1
06:15:43  Report written to /home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Nightly/jvmtest/openjdk/report/html/report.html
06:15:43  Results written to /home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Nightly/aqa-tests/TKG/output_16266607888323/jdk_foreign_0/work
06:15:43  Error: Some tests failed or other problems occurred.
06:15:43  
06:15:43  jdk_foreign_0_FAILED
@JasonFengJ9
Copy link
Member Author

A slightly different error at JDK16 0.27 release build https://openj9-jenkins.osuosl.org/job/Test_openjdk16_j9_sanity.openjdk_x86-64_windows_Release/6/consoleFull

08:31:49  openjdk version "16.0.2-internal" 2021-07-21
08:31:49  OpenJDK Runtime Environment (build 16.0.2-internal+0-adhoc.****.buildjdk16x86-64windowsrelease)
08:31:49  Eclipse OpenJ9 VM (build openj9-0.27.0, JRE 16 Windows Server 2012 R2 amd64-64-Bit Compressed References 20210722_7 (JIT enabled, AOT enabled)
08:31:49  OpenJ9   - 1851b0074f8
08:31:49  OMR      - 9db1c87
08:31:49  JCL      - 50b0cc91164 based on jdk-16.0.2+3)

Rerun in Grinder

09:26:56  --------------------------------------------------
09:26:56  TEST: java/foreign/TestHandshake.java

09:26:56  STDERR:
09:26:56  WARNING: Using incubator modules: jdk.incubator.foreign
09:26:56  java.lang.NullPointerException
09:26:56  	at java.base/jdk.internal.util.ArraysSupport.vectorizedMismatch(ArraysSupport.java)
09:26:56  	at java.base/jdk.internal.misc.ScopedMemoryAccess.vectorizedMismatchInternal(ScopedMemoryAccess.java:236)
09:26:56  	at java.base/jdk.internal.misc.ScopedMemoryAccess.vectorizedMismatch(ScopedMemoryAccess.java:217)
09:26:56  	at jdk.incubator.foreign/jdk.internal.foreign.AbstractMemorySegmentImpl.vectorizedMismatchLargeForBytes(AbstractMemorySegmentImpl.java:203)
09:26:56  	at jdk.incubator.foreign/jdk.internal.foreign.AbstractMemorySegmentImpl.mismatch(AbstractMemorySegmentImpl.java:166)
09:26:56  	at TestHandshake$SegmentMismatchAccessor.doAccess(TestHandshake.java:189)
09:26:56  	at TestHandshake$AbstractSegmentAccessor.run(TestHandshake.java:94)
09:26:56  	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
09:26:56  	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
09:26:56  	at java.base/java.lang.Thread.run(Thread.java:883)
09:26:56  STATUS:Failed.`main' threw exception: java.lang.NullPointerException

@JasonFengJ9
Copy link
Member Author

Another one at JDK 16 0.27 release build https://openj9-jenkins.osuosl.org/job/Test_openjdk16_j9_sanity.openjdk_ppc64le_linux_Release/6/consoleFull

11:03:11  test TestHandshake.testHandshake("SegmentMismatchAccessor", TestHandshake$$Lambda$30/0x000000006ece8dc0@f523f37a): failure
11:03:11  java.lang.AssertionError: expected [true] but found [false]
11:03:11  	at org.testng.Assert.fail(Assert.java:94)
11:03:11  	at org.testng.Assert.failNotEquals(Assert.java:496)
11:03:11  	at org.testng.Assert.assertTrue(Assert.java:42)
11:03:11  	at org.testng.Assert.assertTrue(Assert.java:52)
11:03:11  	at TestHandshake.testHandshake(TestHandshake.java:76)
11:03:11  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:03:11  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
11:03:11  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
11:03:11  	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
11:03:11  	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
11:03:11  	at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
11:03:11  	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:821)
11:03:11  	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1131)
11:03:11  	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
11:03:11  	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
11:03:11  	at org.testng.TestRunner.privateRun(TestRunner.java:773)
11:03:11  	at org.testng.TestRunner.run(TestRunner.java:623)
11:03:11  	at org.testng.SuiteRunner.runTest(SuiteRunner.java:357)
11:03:11  	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352)
11:03:11  	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310)
11:03:11  	at org.testng.SuiteRunner.run(SuiteRunner.java:259)
11:03:11  	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
11:03:11  	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
11:03:11  	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1185)
11:03:11  	at org.testng.TestNG.runSuitesLocally(TestNG.java:1110)
11:03:11  	at org.testng.TestNG.run(TestNG.java:1018)
11:03:11  	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:94)
11:03:11  	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
11:03:11  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:03:11  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
11:03:11  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
11:03:11  	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
11:03:11  	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
11:03:11  	at java.base/java.lang.Thread.run(Thread.java:883)

11:03:11  ===============================================
11:03:11  java/foreign/TestHandshake.java
11:03:11  Total tests run: 6, Failures: 1, Skips: 0
11:03:11  ===============================================
11:03:11  
11:03:11  STDERR:
11:03:11  WARNING: Using incubator modules: jdk.incubator.foreign
11:03:11  java.lang.Exception: failures: 1
11:03:11  	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:96)
11:03:11  	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
11:03:11  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:03:11  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
11:03:11  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
11:03:11  	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
11:03:11  	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
11:03:11  	at java.base/java.lang.Thread.run(Thread.java:883)
11:03:11  
11:03:11  JavaTest Message: Test threw exception: java.lang.Exception: failures: 1

11:04:20  jdk_foreign_0_FAILED

@tajila
Copy link
Contributor

tajila commented Jul 26, 2021

@EricYangIBM This may be related to #13234

@EricYangIBM
Copy link
Contributor

I believe the issue is that https://github.com/ibmruntimes/openj9-openjdk-jdk16/blob/openj9/test/jdk/java/foreign/TestHandshake.java#L242 keeps throwing and looping without ever successfully closing the segment because there is always another thread accessing that segment. I'm not sure why it only happens for the SegmentMismatchAccessor variation, I think it is because ScopedMemoryAccess.vectorizedMismatch takes longer and therefore gives fewer opportunities to close the segment.

Would having closeScope0 interrupt threads that are accessing the scope during close with an exception increase the success rate of close? I get the feeling that this is an issue with the test since it is a try until success - there is a probability that close will always happen during segment access.

Also, I am intermittently getting this failure locally. Do the release builds run the test over multiple iterations?

@pshipton
Copy link
Member

pshipton commented Jul 27, 2021

Release builds don't do anything special, they just run the test.

@tajila
Copy link
Contributor

tajila commented Jul 28, 2021

Can you set MAX_EXECUTOR_WAIT_SECONDS to a longer timeout to see if that fixes the issue.

@EricYangIBM
Copy link
Contributor

Can you set MAX_EXECUTOR_WAIT_SECONDS to a longer timeout to see if that fixes the issue.

Testing that right now, but I think it will. https://hyc-runtimes-jenkins.swg-devops.com/view/Test_grinder/job/Grinder/17169/console shows SegmentMismatchAccessor iterations that successfully close the segment (e.g. at 348 ms, 5049 ms for iteration 0 and 1 for the last grinder iteration). If the timeout is increased I think there will be more successful SegmentMismatchAccessor iterations.

@EricYangIBM
Copy link
Contributor

I think the problem is that SegmentMismatchAccessor takes too long (it compares two 1 000 000 byte native memory segments) which prevents the main thread from obtaining the lock. In https://hyc-runtimes-jenkins.swg-devops.com/view/Test_grinder/job/Grinder/17198/consoleFull you can see that an accessor (thread) often holds the lock for 2000 ms. In the hotspot implementation closeScope interrupts accessor threads so the closer thread can immediately acquire the lock. Our implementation doesn't do this so we get the long hold times.

@EricYangIBM
Copy link
Contributor

Update: Replacing https://github.com/ibmruntimes/openj9-openjdk-jdk16/blob/openj9/test/jdk/java/foreign/TestHandshake.java#L76 with

while (!accessExecutor.isTerminated()) {
    Thread.sleep(5000);
}

eventually results in the test passing (locally on x86-64 linux). I will open a PR to exclude this test and an issue to add interrupts to closeScope0.

EricYangIBM added a commit to EricYangIBM/aqa-tests that referenced this issue Jul 28, 2021
Test depends on RI behaviour not implemented.

Issue: eclipse-openj9/openj9#13211
Signed-off-by: Eric Yang <eric.yang@ibm.com>
smlambert pushed a commit to adoptium/aqa-tests that referenced this issue Aug 5, 2021
Test depends on RI behaviour not implemented.

Issue: eclipse-openj9/openj9#13211
Signed-off-by: Eric Yang <eric.yang@ibm.com>
@JasonFengJ9
Copy link
Member Author

The AssertionError is still observed in latest internal run Test_openjdk16_j9_sanity.openjdk_s390x_linux/72/

openjdk version "16.0.2" 2021-07-20
IBM Semeru Runtime Open Edition 16.0.2.0 (build 16.0.2+7-202108050408)
Eclipse OpenJ9 VM 16.0.2.0 (build master-9af2e37a0, JRE 16 Linux s390x-64-Bit Compressed References 20210804_68 (JIT enabled, AOT enabled)
OpenJ9   - 9af2e37a0
OMR      - 45440608c
JCL      - ee030f1f04 based on jdk-16.0.2+7)

Rerun in Grinder

[2021-08-05T07:38:25.508Z] Running test jdk_foreign_0 ...
[2021-08-05T07:38:25.508Z] ===============================================
[2021-08-05T07:38:25.508Z] jdk_foreign_0 Start Time: Thu Aug  5 00:38:25 2021 Epoch Time (ms): 1628149105425
[2021-08-05T07:38:25.508Z] "/home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_s390x_linux/openjdkbinary/j2sdk-image/bin/java" -Xshareclasses:destroyAll; "/home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_s390x_linux/openjdkbinary/j2sdk-image/bin/java" -Xshareclasses:groupAccess,destroyAll; echo "cache cleanup done";
[2021-08-05T07:38:26.308Z] JVMSHRC005I No shared class caches available
[2021-08-05T07:38:26.308Z] JVMSHRC005I No shared class caches available
[2021-08-05T07:38:26.308Z] cache cleanup done
[2021-08-05T07:38:26.308Z] variation: Mode150
[2021-08-05T07:38:26.308Z] JVM_OPTIONS:  -XX:+UseCompressedOops 

[2021-08-05T07:39:40.416Z] --------------------------------------------------
[2021-08-05T07:39:40.416Z] TEST: java/foreign/TestHandshake.java

[2021-08-05T07:39:40.429Z] Segment closed - delay (ms): 10392
[2021-08-05T07:39:40.429Z] test TestHandshake.testHandshake("SegmentMismatchAccessor", TestHandshake$$Lambda$30/0x0000000084e26d88@e3103462): failure
[2021-08-05T07:39:40.429Z] java.lang.AssertionError: expected [true] but found [false]
[2021-08-05T07:39:40.429Z] 	at org.testng.Assert.fail(Assert.java:94)
[2021-08-05T07:39:40.429Z] 	at org.testng.Assert.failNotEquals(Assert.java:496)
[2021-08-05T07:39:40.429Z] 	at org.testng.Assert.assertTrue(Assert.java:42)
[2021-08-05T07:39:40.429Z] 	at org.testng.Assert.assertTrue(Assert.java:52)
[2021-08-05T07:39:40.429Z] 	at TestHandshake.testHandshake(TestHandshake.java:76)
[2021-08-05T07:39:40.429Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2021-08-05T07:39:40.429Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
[2021-08-05T07:39:40.429Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2021-08-05T07:39:40.429Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
[2021-08-05T07:39:40.429Z] 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
[2021-08-05T07:39:40.429Z] 	at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
[2021-08-05T07:39:40.429Z] 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:821)
[2021-08-05T07:39:40.429Z] 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1131)
[2021-08-05T07:39:40.429Z] 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
[2021-08-05T07:39:40.429Z] 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
[2021-08-05T07:39:40.429Z] 	at org.testng.TestRunner.privateRun(TestRunner.java:773)
[2021-08-05T07:39:40.429Z] 	at org.testng.TestRunner.run(TestRunner.java:623)
[2021-08-05T07:39:40.429Z] 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:357)
[2021-08-05T07:39:40.429Z] 	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352)
[2021-08-05T07:39:40.429Z] 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310)
[2021-08-05T07:39:40.429Z] 	at org.testng.SuiteRunner.run(SuiteRunner.java:259)
[2021-08-05T07:39:40.429Z] 	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
[2021-08-05T07:39:40.429Z] 	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
[2021-08-05T07:39:40.429Z] 	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1185)
[2021-08-05T07:39:40.429Z] 	at org.testng.TestNG.runSuitesLocally(TestNG.java:1110)
[2021-08-05T07:39:40.429Z] 	at org.testng.TestNG.run(TestNG.java:1018)
[2021-08-05T07:39:40.429Z] 	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:94)
[2021-08-05T07:39:40.429Z] 	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
[2021-08-05T07:39:40.429Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2021-08-05T07:39:40.429Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
[2021-08-05T07:39:40.429Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2021-08-05T07:39:40.429Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
[2021-08-05T07:39:40.429Z] 	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2021-08-05T07:39:40.429Z] 	at java.base/java.lang.Thread.run(Thread.java:883)
[2021-08-05T07:39:40.429Z] ITERATION 0

[2021-08-05T07:39:40.452Z] ===============================================
[2021-08-05T07:39:40.452Z] java/foreign/TestHandshake.java
[2021-08-05T07:39:40.452Z] Total tests run: 6, Failures: 1, Skips: 0
[2021-08-05T07:39:40.452Z] ===============================================
[2021-08-05T07:39:40.452Z] 
[2021-08-05T07:39:40.452Z] STDERR:
[2021-08-05T07:39:40.452Z] WARNING: Using incubator modules: jdk.incubator.foreign
[2021-08-05T07:39:40.452Z] java.lang.Exception: failures: 1
[2021-08-05T07:39:40.452Z] 	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:96)
[2021-08-05T07:39:40.452Z] 	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
[2021-08-05T07:39:40.452Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2021-08-05T07:39:40.452Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
[2021-08-05T07:39:40.452Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2021-08-05T07:39:40.452Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
[2021-08-05T07:39:40.452Z] 	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2021-08-05T07:39:40.452Z] 	at java.base/java.lang.Thread.run(Thread.java:883)

[2021-08-05T07:39:40.452Z] TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.Exception: failures: 1
[2021-08-05T07:39:40.452Z] --------------------------------------------------
[2021-08-05T07:39:59.221Z] Test results: passed: 30; failed: 1
[2021-08-05T07:40:05.038Z] Report written to /home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_s390x_linux/jvmtest/openjdk/report/html/report.html
[2021-08-05T07:40:05.038Z] Results written to /home/jenkins/workspace/Test_openjdk16_j9_sanity.openjdk_s390x_linux/aqa-tests/TKG/output_16281397277782/jdk_foreign_0/work
[2021-08-05T07:40:05.038Z] Error: Some tests failed or other problems occurred.
[2021-08-05T07:40:05.038Z] 
[2021-08-05T07:40:05.038Z] jdk_foreign_0_FAILED

fyi @llxia

@pshipton
Copy link
Member

pshipton commented Aug 9, 2021

Seems the test was excluded after the build which failed.

@JasonFengJ9
Copy link
Member Author

The test in question has been excluded, sanity.openjdk is green w/ a recent JDK16 AIX build at
https://hyc-runtimes-jenkins.swg-devops.com/job/Test_openjdk16_j9_sanity.openjdk_ppc64_aix_Personal/4/consoleFull

08:38:16  openjdk version "16.0.2-internal" 2021-07-20
08:38:16  OpenJDK Runtime Environment (build 16.0.2-internal+0-adhoc.jenkins.BuildJDK16ppc64aixPersonal)
08:38:16  Eclipse OpenJ9 VM (build master-cd8db74f1d4, JRE 16 AIX ppc64-64-Bit Compressed References 20210819_35 (JIT enabled, AOT enabled)
08:38:16  OpenJ9   - cd8db74f1d4
08:38:16  OMR      - ac3ab4821a5
08:38:16  JCL      - 44316ee515b based on jdk-16.0.2+7)

Moving the issue to 0.29.

@pshipton
Copy link
Member

pshipton commented May 2, 2024

@babsingh pls unexclude the test if the failure is resolved by #19412
Also we'll need to double deliver to 0.45.

babsingh added a commit to babsingh/openj9 that referenced this issue May 2, 2024
In JDK22, the definition has changed to

native void
closeScope0(MemorySessionImpl session, ScopedAccessError error);

The return type has changed from boolean to void, and a second
parameter is re-introduced: "ScopedAccessError error".

Previously, closeScope0 would be retried until it returned true,
which suggested that the scope/session was not found on any thread's
stack.

The new behaviour sets an asynchronous exception for all threads,
which have the scope/session on their stack. The second parameter,
error, is the asynchronous exception, which is thrown. Before
throwing the error, the thread verifies if the scope/session is
still on the stack. If not, the asynchronous exception is cleared
and not thrown.

Related: eclipse-openj9#13211 (comment)

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/openj9 that referenced this issue May 2, 2024
There are gaps where async exceptions are not processed in time (e.g.
JIT compiled code in a loop). Threads will wait in closeScope0 until
J9VMThread->scopedError (async exception) is transferred to
J9VMThread->currentException. The wait prevents a MemorySession to be
closed until no more operations are being performed on it.

Related: eclipse-openj9#13211

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/aqa-tests that referenced this issue May 2, 2024
TestHandshake has been fixed by

- eclipse-openj9/openj9#19167
- eclipse-openj9/openj9#19412

Related: eclipse-openj9/openj9#13211

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/aqa-tests that referenced this issue May 2, 2024
TestHandshake has been fixed by

- eclipse-openj9/openj9#19167
- eclipse-openj9/openj9#19412

Related: eclipse-openj9/openj9#13211

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
pshipton pushed a commit to adoptium/aqa-tests that referenced this issue May 2, 2024
TestHandshake has been fixed by

- eclipse-openj9/openj9#19167
- eclipse-openj9/openj9#19412

Related: eclipse-openj9/openj9#13211

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
@pshipton
Copy link
Member

pshipton commented May 2, 2024

There are still failures on jdk17 https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/40267/

14:32:00  OpenJ9   - 7e54abbfa2b
14:32:00  OMR      - 49ff22bb6af
14:32:00  JCL      - 0b6d3d7345d based on jdk-17.0.11+9)

@babsingh
Copy link
Contributor

babsingh commented May 2, 2024

To address the synchronization issues, RI introduced the new async handshake approach only in JDK22: https://bugs.openjdk.org/browse/JDK-8310644. JDK17 still uses the old impl; the async handshake approach will need to be manually backported to JDK17 and JDK21 to address the issues reported in #13211 (comment).

@pshipton
Copy link
Member

pshipton commented May 2, 2024

I don't think we should bother fixing jdk17 since it's an incubator. Pls exclude the test there again.
jdk21 is a preview, I'm not sure if it's worth fixing it there either.
@tajila thoughts?

babsingh added a commit to babsingh/aqa-tests that referenced this issue May 2, 2024
The new async handshake approach to fix synchronization issues was
introduced only in JDK22.

JDK17 and JDK21 still use the old implementation, which has
synchronization issues. Thus, TestHandshake is being excluded in
JDK17 and JDK21.

Related: eclipse-openj9/openj9#13211

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/aqa-tests that referenced this issue May 2, 2024
The new async handshake approach to fix synchronization issues was
introduced only in JDK22.

See https://bugs.openjdk.org/browse/JDK-8310644 for more details on
the async handshake approach.

JDK17 and JDK21 still use the old implementation, which has
synchronization issues. Thus, TestHandshake is being excluded in
JDK17 and JDK21.

Related: eclipse-openj9/openj9#13211

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
@babsingh
Copy link
Contributor

babsingh commented May 2, 2024

@tajila thoughts?

Discussed with @tajila offline. We should also exclude it for JDK21. We will re-enable it once the async handshake approach is ported to JDK21 by the RI. Opened adoptium/aqa-tests#5279 to exclude TestHandshake in JDK17 and JDK21.

@pshipton
Copy link
Member

pshipton commented May 2, 2024

We will re-enable it once the async handshake approach is ported to JDK21 by the RI.

Acknowledging this may never happen, since it's preview in jdk21.

JasonFengJ9 pushed a commit to adoptium/aqa-tests that referenced this issue May 2, 2024
The new async handshake approach to fix synchronization issues was
introduced only in JDK22.

See https://bugs.openjdk.org/browse/JDK-8310644 for more details on
the async handshake approach.

JDK17 and JDK21 still use the old implementation, which has
synchronization issues. Thus, TestHandshake is being excluded in
JDK17 and JDK21.

Related: eclipse-openj9/openj9#13211

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/aqa-tests that referenced this issue May 2, 2024
TestHandshake has been fixed by

- eclipse-openj9/openj9#19167
- eclipse-openj9/openj9#19412

Related: eclipse-openj9/openj9#13211

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
@pshipton
Copy link
Member

pshipton commented May 2, 2024

My understanding is the problem is not totally resolved and there is still work to be done for this, an interface between the JIT and VM to determine if a method has been inlined. We won't close this but move it forward.

@pshipton
Copy link
Member

pshipton commented May 3, 2024

A 50x jdk22 grinder of java/foreign/TestHandshake.java on Windows passed, which is better than past results #13211 (comment)
https://openj9-jenkins.osuosl.org/view/Test/job/Grinder/3565

pshipton pushed a commit to adoptium/aqa-tests that referenced this issue May 3, 2024
TestHandshake has been fixed by

- eclipse-openj9/openj9#19167
- eclipse-openj9/openj9#19412

Related: eclipse-openj9/openj9#13211

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
JasonFengJ9 pushed a commit to JasonFengJ9/openj9 that referenced this issue May 7, 2024
There are gaps where async exceptions are not processed in time (e.g.
JIT compiled code in a loop). Threads will wait in closeScope0 until
J9VMThread->scopedError (async exception) is transferred to
J9VMThread->currentException. The wait prevents a MemorySession to be
closed until no more operations are being performed on it.

Related: eclipse-openj9#13211

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
@JasonFengJ9
Copy link
Member Author

JasonFengJ9 commented May 21, 2024

JDK22 x86-64_windows(win10x86-rtp-rt8-1)

[2024-05-20T08:22:07.011Z] variation: Mode150
[2024-05-20T08:22:07.355Z] JVM_OPTIONS:  -XX:+UseCompressedOops -Xverbosegclog 

[2024-05-20T08:30:02.422Z] TEST: java/foreign/TestHandshake.java

[2024-05-20T08:30:02.423Z] ITERATION 4
[2024-05-20T08:30:02.423Z] Started first thread: "Accessor #" + id ; elapsed (ms): 0
[2024-05-20T08:30:02.423Z] Starting handshaker with delay set to 372 millis
[2024-05-20T08:30:02.423Z] Accessor #0 terminated - elapsed (ms): 453
[2024-05-20T08:30:02.423Z] Accessor #1 terminated - elapsed (ms): 453
[2024-05-20T08:30:02.423Z] Segment closed - elapsed (ms): 453
[2024-05-20T08:30:02.423Z] Accessor #3 terminated - elapsed (ms): 453
[2024-05-20T08:30:02.423Z] test TestHandshake.testHandshake("SegmentFillAccessor", TestHandshake$$Lambda/0x0000000053c7add8@1a607afc): failure
[2024-05-20T08:30:02.423Z] java.lang.AssertionError: expected [true] but found [false]
[2024-05-20T08:30:02.423Z] 	at org.testng.Assert.fail(Assert.java:99)
[2024-05-20T08:30:02.423Z] 	at org.testng.Assert.failNotEquals(Assert.java:1037)
[2024-05-20T08:30:02.423Z] 	at org.testng.Assert.assertTrue(Assert.java:45)
[2024-05-20T08:30:02.423Z] 	at org.testng.Assert.assertTrue(Assert.java:55)
[2024-05-20T08:30:02.423Z] 	at TestHandshake.testHandshake(TestHandshake.java:86)

[2024-05-20T08:30:02.424Z] ===============================================
[2024-05-20T08:30:02.424Z] java/foreign/TestHandshake.java
[2024-05-20T08:30:02.424Z] Total tests run: 7, Passes: 6, Failures: 1, Skips: 0
[2024-05-20T08:30:02.424Z] ===============================================
[2024-05-20T08:30:02.424Z] 
[2024-05-20T08:30:02.424Z] STDERR:
[2024-05-20T08:30:02.424Z] Unhandled exception
[2024-05-20T08:30:02.424Z] Type=Segmentation error vmState=0x00000000
[2024-05-20T08:30:02.424Z] Windows_ExceptionCode=c0000005 J9Generic_Signal=00000004 ExceptionAddress=00007FFB5B341899 ContextFlags=0010005f
[2024-05-20T08:30:02.424Z] Handler1=00007FFB4BC52F90 Handler2=00007FFB52AEAC00 InaccessibleWriteAddress=000001AB53E12000
[2024-05-20T08:30:02.424Z] RDI=000001AB53E11FB0 RSI=00000000003BCA00 RAX=000001AB53E11FB0 RBX=0000000000000000
[2024-05-20T08:30:02.424Z] RCX=000001AB53E11FC0 RDX=0000000000000017 R8=00000000000F4230 R9=FFFFFFFFFFFFFFF0
[2024-05-20T08:30:02.424Z] R10=00007FFB5B330000 R11=0707070707070707 R12=0000000000000007 R13=00000000FFFB8C80
[2024-05-20T08:30:02.424Z] R14=00007FFB52BE0800 R15=0000000000000000
[2024-05-20T08:30:02.424Z] RIP=00007FFB5B341899 RSP=0000006C38CFF2A8 RBP=00000000000F4240 EFLAGS=0000000000010287
[2024-05-20T08:30:02.424Z] FS=0053 ES=002B DS=002B
[2024-05-20T08:30:02.424Z] XMM0=0707070707070707 (f: 117901064.000000, d: 8.313805e-275)
[2024-05-20T08:30:02.424Z] XMM1=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-05-20T08:30:02.424Z] XMM2=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-05-20T08:30:02.424Z] XMM3=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-05-20T08:30:02.424Z] XMM4=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-05-20T08:30:02.424Z] XMM5=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-05-20T08:30:02.424Z] XMM6=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-05-20T08:30:02.424Z] XMM7=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-05-20T08:30:02.424Z] XMM8=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-05-20T08:30:02.424Z] XMM9=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-05-20T08:30:02.424Z] XMM10=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-05-20T08:30:02.424Z] XMM11=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-05-20T08:30:02.424Z] XMM12=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-05-20T08:30:02.424Z] XMM13=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-05-20T08:30:02.424Z] XMM14=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-05-20T08:30:02.424Z] XMM15=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-05-20T08:30:02.424Z] Module=C:\Users\jenkins\workspace\Test_openjdk22_j9_sanity.openjdk_x86-64_windows_testList_1\jdkbinary\j2sdk-image\bin\VCRUNTIME140.dll
[2024-05-20T08:30:02.424Z] Module_base_address=00007FFB5B330000 Offset_in_DLL=0000000000011899
[2024-05-20T08:30:02.424Z] Target=2_90_20240519_67 (Windows 10 10.0 build 19045)
[2024-05-20T08:30:02.424Z] CPU=amd64 (4 logical CPUs) (0x1fff78000 RAM)
[2024-05-20T08:30:02.424Z] ----------- Stack Backtrace -----------
[2024-05-20T08:30:02.424Z] memset+0x139 (0x00007FFB5B341899 [VCRUNTIME140+0x11899])
[2024-05-20T08:30:02.424Z] Java_sun_misc_Unsafe_setMemory__Ljava_lang_Object_2JJB+0x55 (0x00007FFB4EAC3EC5 [jclse29+0x33ec5])
[2024-05-20T08:30:02.424Z] (0x00007FFB36A51FC4)
[2024-05-20T08:30:02.424Z] AsyncGetCallTrace+0x360e0 (0x00007FFB52BE0800 [jvm+0x50800])
[2024-05-20T08:30:02.424Z] ---------------------------------------
[2024-05-20T08:30:02.424Z] JVMDUMP039I Processing dump event "gpf", detail "" at 2024/05/20 01:28:00 - please wait.

[2024-05-20T08:43:58.011Z] jdk_foreign_0_FAILED

50x grinder - 3/50 failed

1 failure

19:26:11  TEST: java/foreign/TestSegmentOffset.java

19:26:11  test TestSegmentOffset.testOffset(TestSegmentOffset$SegmentSlice@f0d9d0f2, TestSegmentOffset$SegmentSlice@f0d9d0f2): failure
19:26:11  java.lang.NullPointerException: Cannot invoke "jdk.internal.foreign.AbstractMemorySegmentImpl.maxAlignMask()" because "bb" is null
19:26:11  	at java.base/java.lang.invoke.VarHandleSegmentAsBytes.offsetPlain(VarHandleSegmentAsBytes.java:97)
19:26:11  	at java.base/java.lang.invoke.VarHandleSegmentAsBytes.get(VarHandleSegmentAsBytes.java:110)
19:26:11  	at java.base/jdk.internal.foreign.AbstractMemorySegmentImpl.get(AbstractMemorySegmentImpl.java:728)
19:26:11  	at TestSegmentOffset.testOffset(TestSegmentOffset.java:55)
19:26:11  	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
19:26:11  	at java.base/java.lang.reflect.Method.invoke(Method.java:586)
19:26:11  	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
19:26:11  	at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599)
19:26:11  	at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
19:26:11  	at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
19:26:11  	at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822)
19:26:11  	at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147)
19:26:11  	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
19:26:11  	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
19:26:11  	at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
19:26:11  	at org.testng.TestRunner.privateRun(TestRunner.java:764)
19:26:11  	at org.testng.TestRunner.run(TestRunner.java:585)
19:26:11  	at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
19:26:11  	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
19:26:11  	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
19:26:11  	at org.testng.SuiteRunner.run(SuiteRunner.java:286)
19:26:11  	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
19:26:11  	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
19:26:11  	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
19:26:11  	at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
19:26:11  	at org.testng.TestNG.runSuites(TestNG.java:1069)
19:26:11  	at org.testng.TestNG.run(TestNG.java:1037)
19:26:11  	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:102)
19:26:11  	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
19:26:11  	at java.base/java.lang.reflect.Method.invoke(Method.java:586)
19:26:11  	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
19:26:11  	at java.base/java.lang.Thread.run(Thread.java:1582)
19:26:11  
19:26:11  ===============================================
19:26:11  java/foreign/TestSegmentOffset.java
19:26:11  Total tests run: 3844, Passes: 1059, Failures: 863, Skips: 1922

2 failures

19:50:41  TEST: java/foreign/TestHandshake.java

19:50:41  ITERATION 4
19:50:41  Starting handshaker with delay set to 273 millis
19:50:41  Started first thread: "Accessor #" + id ; elapsed (ms): 0
19:50:41  Accessor #0 terminated - elapsed (ms): 423
19:50:41  Segment closed - elapsed (ms): 423
19:50:41  Accessor #2 terminated - elapsed (ms): 423
19:50:41  Accessor #3 terminated - elapsed (ms): 423
19:50:41  test TestHandshake.testHandshake("SegmentSwappyCopyAccessor", TestHandshake$$Lambda/0x0000000093acb740@7ab6a0e4): failure
19:50:41  java.lang.AssertionError: expected [true] but found [false]
19:50:41  	at org.testng.Assert.fail(Assert.java:99)
19:50:41  	at org.testng.Assert.failNotEquals(Assert.java:1037)
19:50:41  	at org.testng.Assert.assertTrue(Assert.java:45)
19:50:41  	at org.testng.Assert.assertTrue(Assert.java:55)
19:50:41  	at TestHandshake.testHandshake(TestHandshake.java:86)

19:50:41  ===============================================
19:50:41  java/foreign/TestHandshake.java
19:50:41  Total tests run: 7, Passes: 6, Failures: 1, Skips: 0
19:50:41  ===============================================
19:50:41  
19:50:41  STDERR:
19:50:41  Unhandled exception
19:50:41  Type=Segmentation error vmState=0x00000000
19:50:41  Windows_ExceptionCode=c0000005 J9Generic_Signal=00000004 ExceptionAddress=00007FF81B514B03 ContextFlags=0010005f
19:50:41  Handler1=00007FF81C0D2F90 Handler2=00007FF82308AC00 InaccessibleWriteAddress=0000015793CE1C50
19:50:41  RDI=0000000000000000 RSI=000000000000F424 RAX=0000015793C67B30 RBX=00000000003B1300
19:50:41  RCX=0000000000000000 RDX=0000015793CE1C50 R8=0000015793C67B30 R9=000000000000F424
19:50:41  R10=000000000007A120 R11=0000000000000003 R12=0000000000000001 R13=0000000000000000
19:50:41  R14=00007FF823130800 R15=0000002AF279C389
19:50:41  RIP=00007FF81B514B03 RSP=0000003D05D7F228 RBP=0000015793C67B30 EFLAGS=0000000000010202
19:50:41  FS=0053 ES=002B DS=002B
19:50:41  XMM0=0000000000000000 (f: 0.000000, d: 0.000000e+00)
19:50:41  XMM1=0000015793ce1c50 (f: 2479758336.000000, d: 7.290697e-312)
19:50:41  XMM2=0000000000000000 (f: 0.000000, d: 0.000000e+00)
19:50:41  XMM3=0000000000000000 (f: 0.000000, d: 0.000000e+00)
19:50:41  XMM4=0000000000000000 (f: 0.000000, d: 0.000000e+00)
19:50:41  XMM5=0000000000000000 (f: 0.000000, d: 0.000000e+00)
19:50:41  XMM6=0000000000000000 (f: 0.000000, d: 0.000000e+00)
19:50:41  XMM7=0000000000000000 (f: 0.000000, d: 0.000000e+00)
19:50:41  XMM8=0000000000000000 (f: 0.000000, d: 0.000000e+00)
19:50:41  XMM9=0000000000000000 (f: 0.000000, d: 0.000000e+00)
19:50:41  XMM10=0000000000000000 (f: 0.000000, d: 0.000000e+00)
19:50:41  XMM11=0000000000000000 (f: 0.000000, d: 0.000000e+00)
19:50:41  XMM12=0000000000000000 (f: 0.000000, d: 0.000000e+00)
19:50:41  XMM13=0000000000000000 (f: 0.000000, d: 0.000000e+00)
19:50:41  XMM14=0000000000000000 (f: 0.000000, d: 0.000000e+00)
19:50:41  XMM15=0000000000000000 (f: 0.000000, d: 0.000000e+00)
19:50:41  Module=C:\Users\jenkins\workspace\Grinder_iteration_1\jdkbinary\j2sdk-image\bin\default\jclse29.dll
19:50:41  Module_base_address=00007FF81B4C0000 Offset_in_DLL=0000000000054b03
19:50:41  Target=2_90_20240519_67 (Windows 10 10.0 build 19045)
19:50:41  CPU=amd64 (4 logical CPUs) (0x1fff78000 RAM)
19:50:41  ----------- Stack Backtrace -----------
19:50:41  Java_jdk_internal_vm_Continuation_unpin+0x4eb3 (0x00007FF81B514B03 [jclse29+0x54b03])
19:50:41  Java_jdk_internal_misc_Unsafe_copySwapMemory0+0x28a (0x00007FF81B4F4B3A [jclse29+0x34b3a])
19:50:41  (0x00007FF477965435)
19:50:41  (0x0000015793B0B000)
19:50:41  (0x0000015793CE1C50)
19:50:41  (0x0000000000000001)
19:50:41  (0x0000015793C67B30)
19:50:41  ---------------------------------------
19:50:41  JVMDUMP039I Processing dump event "gpf", detail "" at 2024/05/21 16:49:24 - please wait.

AswathySK pushed a commit to AswathySK/openj9 that referenced this issue Jun 4, 2024
There are gaps where async exceptions are not processed in time (e.g.
JIT compiled code in a loop). Threads will wait in closeScope0 until
J9VMThread->scopedError (async exception) is transferred to
J9VMThread->currentException. The wait prevents a MemorySession to be
closed until no more operations are being performed on it.

Related: eclipse-openj9#13211

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:jit comp:vm project:panama Used to track Project Panama related work test failure
Projects
None yet
Development

No branches or pull requests

8 participants