He-Pin commented on issue #2860: URL: https://github.com/apache/pekko/issues/2860#issuecomment-6492009852
### Motivation This corrects the TcpSpec conclusions in [the comment created on 2026-10-28 at 22:20:27Z](https://github.com/apache/pekko/issues/2860#issuecomment-6482139963), without rewriting that comment. ### Modification - The reproduced `hell`/`hello` failure does not show that TLS had accepted the final `o` before observing plaintext-output cancellation. In every failing diagnostic run, the server-side event order was `accept(h), accept(e), accept(l), accept(l), cancel, accept(o)`. - The statement that #3727 "restores the original four-argument test" was incorrect. `TcpSpec.scala`, its four-argument call, closing policy, and `hello` assertion are unchanged in the PR. The referenced `31f6681c00` is superseded by `205155160a`. - The current PR description also needs a qualification: only `h/e/l/l` had been accepted **before cancellation**. A late `onPush(o)` was observed afterwards on both revisions; saying that `o` never entered the operator would be inaccurate. ### Result #3727 fixes the separate loss of plaintext already accepted at cancellation; it does not eliminate the original TcpSpec failure. The observed echo failure is a cancellation-versus-delivery race, outside that drain guarantee. These logs establish the event order at TLS, not the exact upstream buffer responsible. The follow-up is #3729. The drain also applies when plaintext-output cancellation is observed before peer transport-input completion. If transport-input completion is observed first, the existing inbound-close contract discards accepted plaintext, matching the legacy actor engine. ### Tests On 2026-10-29, using OpenJDK 25.0.2, macOS arm64, Scala 2.13.18, and the unchanged TLS 1.3 TcpSpec case: | Revision | Engine | Uninstrumented runs | Failures | | --- | --- | ---: | ---: | | `a55a008fdf` (`origin/main`) | legacy-actor | 20 | 0 (0%) | | `a55a008fdf` | graph-stage | 20 | 8 (40%) | | `205155160a` (#3727) | legacy-actor | 20 | 0 (0%) | | `205155160a` | graph-stage | 20 | 13 (65%) | All failures returned `hell`, expected `hello`. Each repeat ran the original ScalaTest case in a fresh JVM using sbt-exported test classpath and JVM options; `stream-tests/Test/fork = true` was confirmed, and GraphStage was explicitly selected by system property. A separate diagnostic batch ran 20 times per engine per revision. GraphStage failed 11/20 (55%) on main and 12/20 (60%) on the PR, always with the event order above. Successful GraphStage runs accepted `hello` before cancellation. Both legacy batches passed 20/20 and logged `hello` at receipt and `ChoppingBlock.chopInto`. Diagnostic changes were local only and removed. These are shared-workstation observations, not comparable failure-probability estimates: the one-minute load ranged from 5.76–6.72 during the main baseline and 19.40–34.44 during the PR baseline; logging can also affect scheduling. Earlier individual passes do not establish that this intermittent case was fixed. ### References Refs #2860, #3727, and #3729. Buffer allocation/growth remains separate in #3728. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
