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

OpenJDK java/lang/Thread/virtual/stress/ParkALot.java#id0 timeout #18444

Closed
pshipton opened this issue Nov 13, 2023 · 7 comments
Closed

OpenJDK java/lang/Thread/virtual/stress/ParkALot.java#id0 timeout #18444

pshipton opened this issue Nov 13, 2023 · 7 comments

Comments

@pshipton
Copy link
Member

https://openj9-jenkins.osuosl.org/job/Test_openjdk21_j9_sanity.openjdk_aarch64_linux_Nightly_testList_0/96/
https://openj9-jenkins.osuosl.org/job/Test_openjdk21_j9_sanity.openjdk_aarch64_linux_Nightly_testList_1/96/

https://openj9-artifactory.osuosl.org/artifactory/ci-openj9/Test/Test_openjdk21_j9_sanity.openjdk_aarch64_linux_Nightly_testList_0/96/openjdk_test_output.tar.gz
https://openj9-artifactory.osuosl.org/artifactory/ci-openj9/Test/Test_openjdk21_j9_sanity.openjdk_aarch64_linux_Nightly_testList_1/96/openjdk_test_output.tar.gz

java/lang/Thread/virtual/stress/ParkALot.java#id0
Showing selected threads from the timeout:

19:24:15  "ForkJoinPool-1-worker-2" prio=5 Id=31 WAITING
19:24:15  	at java.base@21.0.1-internal/jdk.internal.vm.Continuation.run(Continuation.java:213)
19:24:15  	at java.base@21.0.1-internal/java.lang.VirtualThread.runContinuation(VirtualThread.java:239)
19:24:15  	at java.base@21.0.1-internal/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1423)
19:24:15  	at java.base@21.0.1-internal/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
19:24:15  	at java.base@21.0.1-internal/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
19:24:15  	at java.base@21.0.1-internal/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
19:24:15  	at java.base@21.0.1-internal/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
19:24:15  	at java.base@21.0.1-internal/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)

19:24:15  "ForkJoinPool-1-worker-4" prio=5 Id=33 BLOCKED on java.lang.Object@1cff76f4 owned by "Thread-5" Id=43
19:24:15  	at java.base@21.0.1-internal/java.lang.VirtualThread.unmount(VirtualThread.java:388)
19:24:15  	at java.base@21.0.1-internal/java.lang.VirtualThread.runContinuation(VirtualThread.java:241)
19:24:15  	at java.base@21.0.1-internal/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1423)
19:24:15  	at java.base@21.0.1-internal/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
19:24:15  	at java.base@21.0.1-internal/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
19:24:15  	at java.base@21.0.1-internal/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
19:24:15  	at java.base@21.0.1-internal/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
19:24:15  	at java.base@21.0.1-internal/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)

19:24:15  "ForkJoinPool-1-worker-7" prio=5 Id=40 WAITING
19:24:15  	at java.base@21.0.1-internal/jdk.internal.vm.Continuation.run(Continuation.java:213)
19:24:15  	at java.base@21.0.1-internal/java.lang.VirtualThread.runContinuation(VirtualThread.java:239)
19:24:15  	at java.base@21.0.1-internal/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1423)
19:24:15  	at java.base@21.0.1-internal/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
19:24:15  	at java.base@21.0.1-internal/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
19:24:15  	at java.base@21.0.1-internal/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
19:24:15  	at java.base@21.0.1-internal/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
19:24:15  	at java.base@21.0.1-internal/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)

19:24:15  "Thread-4" prio=5 Id=42 RUNNABLE
19:24:15  	at java.base@21.0.1-internal/java.lang.Thread.getStateImpl(Native Method)
19:24:15  	at java.base@21.0.1-internal/java.lang.Thread.threadState(Thread.java:2794)
19:24:15  	- locked java.lang.Object@bd52e5b2
19:24:15  	at java.base@21.0.1-internal/java.lang.VirtualThread.threadState(VirtualThread.java:906)
19:24:15  	- locked java.lang.Object@4133e156
19:24:15  	at java.base@21.0.1-internal/java.lang.Thread.getState(Thread.java:2778)
19:24:15  	at app//ParkALot.parkALot(ParkALot.java:86)
19:24:15  	at app//ParkALot.lambda$main$0(ParkALot.java:59)
19:24:15  	at java.base@21.0.1-internal/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
19:24:15  	at java.base@21.0.1-internal/java.util.concurrent.FutureTask.run(FutureTask.java:317)
19:24:15  	at java.base@21.0.1-internal/java.lang.Thread.run(Thread.java:1595)
19:24:15  
19:24:15  "Thread-5" prio=5 Id=43 RUNNABLE
19:24:15  	at java.base@21.0.1-internal/java.lang.Thread.getStateImpl(Native Method)
19:24:15  	at java.base@21.0.1-internal/java.lang.Thread.threadState(Thread.java:2794)
19:24:15  	- locked java.lang.Object@d6fbbc8d
19:24:15  	at java.base@21.0.1-internal/java.lang.VirtualThread.threadState(VirtualThread.java:906)
19:24:15  	- locked java.lang.Object@1cff76f4
19:24:15  	at java.base@21.0.1-internal/java.lang.Thread.getState(Thread.java:2778)
19:24:15  	at app//ParkALot.parkALot(ParkALot.java:86)
19:24:15  	at app//ParkALot.lambda$main$0(ParkALot.java:59)
19:24:15  	at java.base@21.0.1-internal/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
19:24:15  	at java.base@21.0.1-internal/java.util.concurrent.FutureTask.run(FutureTask.java:317)
19:24:15  	at java.base@21.0.1-internal/java.lang.Thread.run(Thread.java:1595)
19:24:15  
19:24:15  "Thread-6" prio=5 Id=44 RUNNABLE
19:24:15  	at java.base@21.0.1-internal/java.lang.Thread.getStateImpl(Native Method)
19:24:15  	at java.base@21.0.1-internal/java.lang.Thread.threadState(Thread.java:2794)
19:24:15  	- locked java.lang.Object@5d1d0081
19:24:15  	at java.base@21.0.1-internal/java.lang.VirtualThread.threadState(VirtualThread.java:906)
19:24:15  	- locked java.lang.Object@80b77f44
19:24:15  	at java.base@21.0.1-internal/java.lang.Thread.getState(Thread.java:2778)
19:24:15  	at app//ParkALot.parkALot(ParkALot.java:86)
19:24:15  	at app//ParkALot.lambda$main$0(ParkALot.java:59)
19:24:15  	at java.base@21.0.1-internal/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
19:24:15  	at java.base@21.0.1-internal/java.util.concurrent.FutureTask.run(FutureTask.java:317)
19:24:15  	at java.base@21.0.1-internal/java.lang.Thread.run(Thread.java:1595)

2dc399e...881ab73
eclipse-openj9/openj9-omr@2a9a7f4...9bc6e08
ibmruntimes/openj9-openjdk-jdk21@f8d2943...88ac736

@pshipton
Copy link
Member Author

@fengxue-IS @babsingh @tajila fyi

@JasonFengJ9
Copy link
Member

Also observed at internal builds: JDK21 aarch64_linux JDK21 ppc64_aix

@babsingh
Copy link
Contributor

babsingh commented Nov 13, 2023

It's a new test introduced in ibmruntimes/openj9-openjdk-jdk21@8f677c4.

It launches num_threads and expects each thread to park and unpark 500_000 times. The test just takes a lot of time, which causes the timeout. The test passes in a reasonable time when the number of iterations are reduced to 5_000, which should be sufficient to verify functional behaviour.

@pshipton
Copy link
Member Author

https://openj9-jenkins.osuosl.org/job/Test_openjdk21_j9_sanity.openjdk_x86-64_windows_OMR_testList_1/43/

@babsingh are you planning to modify the test to avoid the timeouts in our regular testing?

babsingh added a commit to babsingh/openj9-openjdk-jdk21 that referenced this issue Nov 13, 2023
ParkALot launches a number of virtual threads and expects each thread
to park and unpark 500_000 times. The test takes a lot of time to
execute leading to timeouts in Jenkins testing.

The number of park and unpark iterations is reduced to 5_000, which is
sufficient to verify functional behaviour. Further, the reduced
iterations allow the test to pass in a reasonable time in Jenkins
testing.

vm.debug is set to false for OpenJ9. So, the vm.debug=true variant is
left unmodified.

Related: eclipse-openj9/openj9#18444

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/openj9-openjdk-jdk21 that referenced this issue Nov 13, 2023
ParkALot launches a number of virtual threads and expects each thread
to park and unpark 500_000 times. The test takes a lot of time to
execute leading to timeouts in Jenkins testing.

The number of park and unpark iterations is reduced to 5_000, which is
sufficient to verify functional behaviour. Further, the reduced
iterations allow the test to pass in a reasonable time in Jenkins
testing.

vm.debug is set to false for OpenJ9. So, the vm.debug=true variant is
left unmodified.

Related: eclipse-openj9/openj9#18444

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/openj9-openjdk-jdk21 that referenced this issue Nov 13, 2023
ParkALot launches a number of virtual threads and expects each thread
to park and unpark 500_000 times. The test takes a lot of time to
execute leading to timeouts in Jenkins testing.

The number of park and unpark iterations is reduced to 5_000, which is
sufficient to verify functional behaviour. Further, the reduced
iterations allow the test to pass in a reasonable time in Jenkins
testing.

vm.debug is set to false for OpenJ9. So, the vm.debug=true variant is
left unmodified.

Related: eclipse-openj9/openj9#18444

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/openj9-openjdk-jdk that referenced this issue Nov 13, 2023
ParkALot launches a number of virtual threads and expects each thread
to park and unpark 500_000 times. The test takes a lot of time to
execute leading to timeouts in Jenkins testing.

The number of park and unpark iterations is reduced to 5_000, which is
sufficient to verify functional behaviour. Further, the reduced
iterations allow the test to pass in a reasonable time in Jenkins
testing.

vm.debug is set to false for OpenJ9. So, the vm.debug=true variant is
left unmodified.

Related: eclipse-openj9/openj9#18444

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

are you planning to modify the test to avoid the timeouts in our regular testing?

Yes, opened the below PRs to address the timeout:

babsingh added a commit to babsingh/openj9-openjdk-jdk that referenced this issue Nov 13, 2023
ParkALot launches a number of virtual threads and expects each thread
to park and unpark 500_000 times. The test takes a lot of time to
execute, leading to timeouts in Jenkins testing.

The number of park and unpark iterations is reduced to 5_000, which is
sufficient to verify functional behaviour. Further, the reduced
iterations allow the test to pass in a reasonable time in Jenkins
testing.

vm.debug is set to false for OpenJ9. So, the vm.debug=true variant is
left unmodified.

Related: eclipse-openj9/openj9#18444

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/openj9-openjdk-jdk21 that referenced this issue Nov 13, 2023
ParkALot launches a number of virtual threads and expects each thread
to park and unpark 500_000 times. The test takes a lot of time to
execute, leading to timeouts in Jenkins testing.

The number of park and unpark iterations is reduced to 5_000, which is
sufficient to verify functional behaviour. Further, the reduced
iterations allow the test to pass in a reasonable time in Jenkins
testing.

vm.debug is set to false for OpenJ9. So, the vm.debug=true variant is
left unmodified.

Related: eclipse-openj9/openj9#18444

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

The two PRs, mentioned in #18444 (comment), have been merged. Closing this issue since the two PRs should resolve this issue.

babsingh added a commit to babsingh/openj9-openjdk-jdk21 that referenced this issue Nov 20, 2023
ParkALot launches a number of virtual threads and expects each thread
to park and unpark 500_000 times. The test takes a lot of time to
execute, leading to timeouts in Jenkins testing.

The number of park and unpark iterations is reduced to 5_000, which is
sufficient to verify functional behaviour. Further, the reduced
iterations allow the test to pass in a reasonable time in Jenkins
testing.

vm.debug is set to false for OpenJ9. So, the vm.debug=true variant is
left unmodified.

Related: eclipse-openj9/openj9#18444

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/openj9-openjdk-jdk21 that referenced this issue Nov 20, 2023
ParkALot launches a number of virtual threads and expects each thread
to park and unpark 500_000 times. The test takes a lot of time to
execute, leading to timeouts in Jenkins testing.

The number of park and unpark iterations is reduced to 5_000, which is
sufficient to verify functional behaviour. Further, the reduced
iterations allow the test to pass in a reasonable time in Jenkins
testing.

vm.debug is set to false for OpenJ9. So, the vm.debug=true variant is
left unmodified.

Related: eclipse-openj9/openj9#18444

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
Projects
None yet
Development

No branches or pull requests

3 participants