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

J9vmTest j9vm.test.jni.CriticalRegionTest testAcquireAndGC_Sleepers8_GCers8: not all threads completed before the timeout #18077

Closed
pshipton opened this issue Sep 5, 2023 · 9 comments · Fixed by #18097

Comments

@pshipton
Copy link
Member

pshipton commented Sep 5, 2023

https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_sanity.functional_s390x_linux_Nightly_testList_1/556 - ub20-390-1
J9vmTest_4

+++ j9vm.test.jni.CriticalRegionTest: +++
command: /home/jenkins/workspace/Test_openjdk17_j9_sanity.functional_s390x_linux_Nightly_testList_1/openjdkbinary/j2sdk-image/bin/java  -XX:+UseCompressedOops -Xjit -Xgcpolicy:balanced  -Xdump -Xms64m -Xmx64m    -classpath /home/jenkins/workspace/Test_openjdk17_j9_sanity.functional_s390x_linux_Nightly_testList_1/aqa-tests/TKG/../../jvmtest/functional/VM_Test/VM_Test.jar:/home/jenkins/workspace/Test_openjdk17_j9_sanity.functional_s390x_linux_Nightly_testList_1/aqa-tests/TKG/../TKG/lib/asm-all.jar  j9vm.test.jni.CriticalRegionTest 

Exception in thread "main" java.lang.RuntimeException: testAcquireAndGC_Sleepers8_GCers8: not all threads completed before the timeout (15/16)
	at j9vm.test.jni.CriticalRegionTest.reportError(CriticalRegionTest.java:154)
	at j9vm.test.jni.CriticalRegionTest.testAcquireAndGC(CriticalRegionTest.java:879)
	at j9vm.test.jni.CriticalRegionTest.runNonBlockingTests(CriticalRegionTest.java:745)
	at j9vm.test.jni.CriticalRegionTest.main(CriticalRegionTest.java:198)
no-zero exit value: 1
*** Test FAILED *** (j9vm.test.jni.CriticalRegionTest)
@pshipton
Copy link
Member Author

pshipton commented Sep 6, 2023

https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_sanity.functional_s390x_linux_Nightly_testList_0/557 - ub20-390-4
J9vmTest_5

+++ j9vm.test.jni.CriticalRegionTest: +++
command: /home/jenkins/workspace/Test_openjdk17_j9_sanity.functional_s390x_linux_Nightly_testList_0/openjdkbinary/j2sdk-image/bin/java  -Xcompressedrefs -Xjit -Xgcpolicy:gencon  -Xdump -Xms64m -Xmx64m    -classpath /home/jenkins/workspace/Test_openjdk17_j9_sanity.functional_s390x_linux_Nightly_testList_0/aqa-tests/TKG/../../jvmtest/functional/VM_Test/VM_Test.jar:/home/jenkins/workspace/Test_openjdk17_j9_sanity.functional_s390x_linux_Nightly_testList_0/aqa-tests/TKG/../TKG/lib/asm-all.jar  j9vm.test.jni.CriticalRegionTest 

Exception in thread "main" java.lang.RuntimeException: testAcquireAndGC_Sleepers1_GCers8: not all threads completed before the timeout (8/9)
	at j9vm.test.jni.CriticalRegionTest.reportError(CriticalRegionTest.java:154)
	at j9vm.test.jni.CriticalRegionTest.testAcquireAndGC(CriticalRegionTest.java:879)
	at j9vm.test.jni.CriticalRegionTest.runNonBlockingTests(CriticalRegionTest.java:744)
	at j9vm.test.jni.CriticalRegionTest.main(CriticalRegionTest.java:198)
no-zero exit value: 1
*** Test FAILED *** (j9vm.test.jni.CriticalRegionTest)
```

@pshipton
Copy link
Member Author

pshipton commented Sep 6, 2023

Changes from previous build to first failure. The change wouldn't cause this failure.
75701be...e57170e

@pshipton
Copy link
Member Author

pshipton commented Sep 6, 2023

Probably related to #18044
@dmitripivkine @TobiAjila - seems we should reduce the number of GCs, or increase the timeout.

@dmitripivkine
Copy link
Contributor

Probably related to #18044
@dmitripivkine @TobiAjila - seems we should reduce the number of GCs, or increase the timeout.

Test code: https://github.com/eclipse-openj9/openj9/blob/master/test/functional/VM_Test/src/j9vm/test/jni/CriticalRegionTest.java

Looks like the timeout has been increased in the past to 5 seconds. Seems test fails on one group of similar zLinux machines. It might be these machines are so slow that timeout should be increased again (to 10 seconds?).

@pshipton
Copy link
Member Author

pshipton commented Sep 7, 2023

We can first try removing one of the two System.gc() calls and see if that resolves it.

https://github.com/eclipse-openj9/openj9/blob/master/test/functional/VM_Test/src/j9vm/test/jni/CriticalRegionTest.java#L143

@dmitripivkine
Copy link
Contributor

dmitripivkine commented Sep 7, 2023

We can first try removing one of the two System.gc() calls and see if that resolves it.

https://github.com/eclipse-openj9/openj9/blob/master/test/functional/VM_Test/src/j9vm/test/jni/CriticalRegionTest.java#L143

Hm, It might improve timing but can it create logical problem if SystemGC can not produce results as expected (due behaviour first call can just complete GC Cycle and left floating garbage, unprocessed References etc. behind, so it is the reason we call SystemGC twice)? Can this test be impacted?

@pshipton
Copy link
Member Author

pshipton commented Sep 7, 2023

But System.gc() does two calls internally now, since #18044. You think we still need to explicitly call it twice?

@dmitripivkine
Copy link
Contributor

But System.gc() does two calls internally now, since #18044. You think we still need to explicitly call it twice?

Right. Sorry, I forgot, you are correct.

pshipton added a commit to pshipton/openj9 that referenced this issue Sep 7, 2023
@pshipton
Copy link
Member Author

pshipton commented Sep 7, 2023

I looked more closely and removing a call to System.gc() won't help with the timeout since it's in another test that we haven't run yet when the timeout occurs. Still I've removed it and increased the timeout in https://github.com/eclipse-openj9/openj9/compare/master...pshipton:gconce?expand=1, running a grinder to confirm and then will create a PR for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants