From d479a95ba0ea6f07ddc26fb3479a457d6c637360 Mon Sep 17 00:00:00 2001 From: Wei Lin Date: Mon, 21 Sep 2026 13:19:27 +0800 Subject: [PATCH] ci(java): retry JDK 10 test suite once on transient fork startup crash Zulu 10.0.2's forked test JVM intermittently crashes while starting on ubuntu-22.04 runners (surefire reports "The forked VM terminated without properly saying goodbye" with zero tests run). The failure reproduces on neither a rerun nor any other matrix entry and happens before any test class loads, so retry the suite once before failing the step. --- .github/workflows/java-ci.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/java-ci.yml b/.github/workflows/java-ci.yml index 7fa7a202..03d366a9 100644 --- a/.github/workflows/java-ci.yml +++ b/.github/workflows/java-ci.yml @@ -85,4 +85,24 @@ jobs: - name: Test on JDK 10 if: matrix.java-version == '10' - run: ./mvnw -B -ntp -Djvm="$JAVA_HOME_10_X64/bin/java" verify + # Zulu 10.0.2's forked test JVM intermittently crashes while starting + # on ubuntu-22.04 runners ("The forked VM terminated without properly + # saying goodbye", Tests run: 0). The failure is non-deterministic and + # happens before any test class loads, so retry the suite once before + # reporting the step as failed. + run: | + set +e + status=0 + for attempt in 1 2; do + echo "::group::JDK 10 verify attempt ${attempt}" + ./mvnw -B -ntp -Djvm="$JAVA_HOME_10_X64/bin/java" verify + status=$? + echo "::endgroup::" + if [ "${status}" -eq 0 ]; then + exit 0 + fi + if [ "${attempt}" -eq 1 ]; then + echo "::warning::JDK 10 verify attempt 1 failed (exit ${status}); retrying." + fi + done + exit "${status}"