You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "He-Pin (via GitHub)" <gi...@apache.org> on 2026/10/13 14:14:36 UTC

[PR] [1.8.x] Fix reused fork-join task submissions [pekko]

He-Pin opened a new pull request, #3625:
URL: https://github.com/apache/pekko/pull/3625

   ### Motivation
   
   Backport #3621 to `1.8.x`. Repeatedly submitting the same mailbox as a `ForkJoinTask` can corrupt a fork-join work queue through task identity reuse. Exceptional completion can also prevent subsequent submissions of that mailbox from running.
   
   ### Modification
   
   - Always wrap `execute(Runnable)` submissions in a fresh `PekkoForkJoinTask` in both Pekko's Java 8 and Java 9+ fork-join executors.
   - Retain `Mailbox extends ForkJoinTask` and its existing methods for 1.x binary compatibility.
   - Adapt the resubmission regression tests from #3621 to cover both executor implementations, including recovery after an exception and a plain `Runnable` control. Wire `TestJdk9` to the actor module's `CompileJdk9` output.
   - Document the fix and its built-in executor scope.
   
   ### Result
   
   Every submission through Pekko's built-in fork-join executors has an independent task identity and completion state. The mailbox binary shape is unchanged and no MiMa filters are needed. Custom executors that submit mailboxes directly to a raw JDK `ForkJoinPool` remain outside this backport's scope.
   
   ### Tests
   
   - Both regression suites demonstrate the failure on the original executor code: each reports one expected failure and one passing control. Both pass with the fix.
   - Cross-Scala regression tests: 12 passed across Scala 2.12.21, 2.13.18, and 3.3.7, covering `Test` and `TestJdk9`.
   - Runtime checks: 2 tests passed on JDK 8; both executor suites passed on JDK 25 (4 tests, compiled with JDK 17).
   - Dispatcher, Mailbox, ForkJoin, and ActorSystem focused tests on JDK 17: 190 passed, 2 existing pending tests.
   - `+mimaReportBinaryIssues`, `+headerCheckAll`, `headerCreateAll`, scoped `sortImports`, native scalafmt for changed files, and `git diff --check` passed.
   - `docs/paradox` passed with `-J--add-opens=java.base/java.lang=ALL-UNNAMED` after the initial JDK 17 reflective-access failure. Initial disk-space and cross-JDK launcher/compiler setup failures were resolved before the successful checks above.
   - `checkCodeStyle` fails on pre-existing formatting in `remote/src/test/scala/org/apache/pekko/remote/serialization/NestedPayloadDepthSpec.scala`; that file is identical to `origin/1.8.x`.
   - `PR_TARGET_BRANCH=origin/1.8.x validatePullRequest` completed but was **not fully green**. LevelDB JNI lacks support for the Apple Silicon host, a Netty test cannot bind `127.0.1.1`, and the aggregate run reported two `TcpConnectionSpec` timeouts and one `FlowFlatMapConcatParallelismSpec` timeout.
   - Both TCP cases passed individually on the original 1.8.x code and on the fixed code. The FlatMap suite passed all 387 tests when rerun on JDK 17 with sbt's exported test classpath and the same time factor. These isolated reruns do not replace the failed aggregate result; no assertions or timeouts were changed.
   - Auditable Qoder stdout review: No must-fix findings.
   
   ### References
   
   Refs #3621, #3620, akka/akka-core#33019.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] [1.8.x] Fix reused fork-join task submissions [pekko]

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on PR #3625:
URL: https://github.com/apache/pekko/pull/3625#issuecomment-6147647305

   I think it's better just do it as 2.0.0


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] [1.8.x] Fix reused fork-join task submissions [pekko]

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin closed pull request #3625: [1.8.x] Fix reused fork-join task submissions
URL: https://github.com/apache/pekko/pull/3625


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org