Skip to content

fix: stabilise JDK 25 nightly flakes#2907

Merged
He-Pin merged 1 commit intoapache:mainfrom
He-Pin:fix-jdk25-nightly-flakes
Apr 25, 2026
Merged

fix: stabilise JDK 25 nightly flakes#2907
He-Pin merged 1 commit intoapache:mainfrom
He-Pin:fix-jdk25-nightly-flakes

Conversation

@He-Pin
Copy link
Copy Markdown
Member

@He-Pin He-Pin commented Apr 25, 2026

Motivation:
The JDK 25 nightly workflow run 24922457328 failed only in the JDK 25 matrix. The failures were timeout-shaped: stream TCK subscription/sequential-signal stalls, remote system-message/send-consistency timeouts, BoundedSourceQueue burst delivery, and DurableStateBehaviorStashOverflowSpec draining 20k messages. The existing minimum-runnable=4 mitigation was not enough on the GitHub runners.

References:

Modification:

  • Export the virtual-thread JVM opens in the JDK 21+ nightly test step through JDK_JAVA_OPTIONS.
  • Enable fork-join dispatcher virtualize=on in JDK 21+ nightly builds for actor default, actor internal, remote default, remote classic backoff, persistence default replay, persistence default stream, and stream test dispatchers.
  • Keep the JDK 21+ minimum-runnable override, using 8 for JDK 25 nightly runs and 4 for JDK 21.
  • Document the nightly virtual-thread override, the required add-opens values, the system-property opt-in for dispatcher virtualize, and the fact that fork-join dispatcher virtualization uses the owning dispatcher fork-join pool as the virtual-thread scheduler.
  • Dilate two hard timeout assumptions exposed by the JDK 25 run: BoundedSourceQueueSpec burst delivery and DurableStateBehaviorStashOverflowSpec stash draining.

Result:
The production reference configuration remains unchanged; virtual threads are enabled only by nightly workflow parameters. The selected fork-join dispatchers retain their own scheduler isolation instead of routing through the JVM-wide default virtual-thread scheduler. This targets the CI-only JDK 25 starvation symptoms while preserving local and PR-test defaults.

Tests:

  • git diff --check
  • sbt -Dpekko.test.timefactor=4 -Dpekko.actor.testkit.typed.timefactor=4 -Dpekko.actor.default-dispatcher.fork-join-executor.minimum-runnable=8 -Dpekko.actor.internal-dispatcher.fork-join-executor.minimum-runnable=8 -Dpekko.remote.default-remote-dispatcher.fork-join-executor.minimum-runnable=8 -Dpekko.test.stream-dispatcher.fork-join-executor.minimum-runnable=8 -Dpekko.actor.default-dispatcher.fork-join-executor.virtualize=on -Dpekko.actor.internal-dispatcher.fork-join-executor.virtualize=on -Dpekko.remote.default-remote-dispatcher.fork-join-executor.virtualize=on -Dpekko.test.stream-dispatcher.fork-join-executor.virtualize=on "stream-tests / Test / testOnly org.apache.pekko.stream.scaladsl.BoundedSourceQueueSpec" "stream-tests-tck / Test / testOnly org.apache.pekko.stream.tck.FanoutPublisherTest" "persistence-typed-tests / Test / testOnly org.apache.pekko.persistence.typed.state.scaladsl.DurableStateBehaviorStashOverflowSpec"
  • sbt -Dpekko.test.timefactor=4 -Dpekko.actor.testkit.typed.timefactor=4 -Dpekko.actor.default-dispatcher.fork-join-executor.minimum-runnable=8 -Dpekko.actor.internal-dispatcher.fork-join-executor.minimum-runnable=8 -Dpekko.remote.default-remote-dispatcher.fork-join-executor.minimum-runnable=8 -Dpekko.test.stream-dispatcher.fork-join-executor.minimum-runnable=8 -Dpekko.actor.default-dispatcher.fork-join-executor.virtualize=on -Dpekko.actor.internal-dispatcher.fork-join-executor.virtualize=on -Dpekko.remote.default-remote-dispatcher.fork-join-executor.virtualize=on -Dpekko.test.stream-dispatcher.fork-join-executor.virtualize=on "remote / Test / testOnly org.apache.pekko.remote.artery.ArteryUpdSendConsistencyWithOneLaneSpec org.apache.pekko.remote.artery.ArteryUpdSendConsistencyWithThreeLanesSpec org.apache.pekko.remote.ArteryMessageLoggingSpec org.apache.pekko.remote.artery.SystemMessageDeliverySpec"
  • sbt "persistence-typed-tests / Test / scalafmtCheck" "stream-tests / Test / scalafmtCheck" "docs / Test / scalafmtCheck"
  • sbt "docs / Test / scalafmtCheck"

@He-Pin He-Pin force-pushed the fix-jdk25-nightly-flakes branch from 337470d to 58391d3 Compare April 25, 2026 14:46
@He-Pin He-Pin requested a review from pjfanning April 25, 2026 14:48
@He-Pin
Copy link
Copy Markdown
Member Author

He-Pin commented Apr 25, 2026

@pjfanning I will take another run about this

@He-Pin He-Pin force-pushed the fix-jdk25-nightly-flakes branch from 58391d3 to 9631107 Compare April 25, 2026 14:53
@He-Pin He-Pin merged commit fab9594 into apache:main Apr 25, 2026
9 checks passed
@He-Pin He-Pin deleted the fix-jdk25-nightly-flakes branch April 25, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants