Daniel Sun created GROOVY-12739:
-----------------------------------
Summary: ParallelCollectionTest.testEachParallelRunsConcurrently
fails with CyclicBarrier TimeoutException on CI (JDK 17)
Key: GROOVY-12739
URL: https://issues.apache.org/jira/browse/GROOVY-12739
Project: Groovy
Issue Type: Bug
Affects Versions: 7.0.0-alpha-1
Reporter: Daniel Sun
Observed on master in Build and test, job lts (17, ubuntu-latest), run attempt
1. 19766 tests completed, 1 failed, 67 skipped; :test failed. Only failed test:
groovy.concurrent.ParallelCollectionTest.testEachParallelRunsConcurrently
(ParallelCollectionTest.groovy:48). UndeclaredThrowableException wraps
TimeoutException from CyclicBarrier.await at TestScript109.groovy:21.
h3. Environment
* Groovy 7.0.0-SNAPSHOT
* GitHub-hosted Ubuntu 26.04 runner image 20261028.624
* Gradle 9.8.2 running on Zulu JDK 21.0.13; test target Zulu JDK 17.0.21
* Commit 0f525fea07baa89796b3e6fd5f565cb4e2d7f005
* Failure time: 2026-11-08 23:31:30 Asia/Taipei (UTC+8)
h3. CI command
{code}
./gradlew test -Pgroovy.grape.bridge-cache=true
-Ptarget.java.home="$JAVA_HOME_17_X64"
{code}
h3. Shortened stack
{code}
ParallelCollectionTest > testEachParallelRunsConcurrently() FAILED
java.lang.reflect.UndeclaredThrowableException
at java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:672)
at
org.codehaus.groovy.runtime.ParallelCollectionExtensions.lambda$eachParallel$1(ParallelCollectionExtensions.java:118)
at
org.codehaus.groovy.runtime.ParallelCollectionExtensions.withPool(ParallelCollectionExtensions.java:405)
at
org.codehaus.groovy.runtime.ParallelCollectionExtensions.eachParallel(ParallelCollectionExtensions.java:117)
at groovy.concurrent.ParallelScope.withPool(ParallelScope.java:92)
at
groovy.concurrent.ParallelCollectionTest.testEachParallelRunsConcurrently(ParallelCollectionTest.groovy:48)
Caused by (nested): java.util.concurrent.TimeoutException
at java.util.concurrent.CyclicBarrier.dowait(CyclicBarrier.java:259)
at java.util.concurrent.CyclicBarrier.await(CyclicBarrier.java:437)
at
TestScript109$_run_closure1$_closure2$_closure3.doCall(TestScript109.groovy:21)
{code}
*Expected:* the concurrency regression test passes reliably without barrier
timeout.
*Actual:* barrier timeout fails the CI test task.
No network/download/Gradle-wrapper errors were observed in this job. This
failure has not been reproduced locally. Suggested focused command (not yet
executed): {{./gradlew :test --tests groovy.concurrent.ParallelCollectionTest}}
h3. Related issue
GROOVY-12457 (https://issues.apache.org/jira/browse/GROOVY-12457,
Resolved/Fixed) describes a similar eachParallel barrier timeout wrapped in
UndeclaredThrowableException. Whether this is residual behavior, a regression,
or an unrelated scheduling timeout remains unconfirmed; no root cause is
asserted.
h3. Sources
* https://github.com/apache/groovy/actions/runs/42493907303/job/128771925948
* https://github.com/apache/groovy/actions/runs/42493907303
*
https://github.com/apache/groovy/commit/0f525fea07baa89796b3e6fd5f565cb4e2d7f005
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)