Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

TcpConnectionSpec incoming-data test intermittently times out waiting for Tcp.Received

Aperta
#3,626 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
Più di una settimana
Idoneità per principianti
12/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
scala
Ambito
networking

Direzione di ricerca

The flaky case is An outgoing connection must send incoming data to the connection handler in actor-tests/src/test/scala/org/apache/pekko/io/TcpConnectionSpec.scala, failing in expectReceivedString around line 1101. The issue asks for root-cause investigation, not a fix: compare the full validatePullRequest run with isolated runs of this spec. Done means the root cause is identified and the test is reliable under the aggregate run, without simply raising the timeout.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

TcpConnectionSpec intermittently times out in An outgoing connection must send incoming data to the connection handler during a full validatePullRequest run. Track this separately for later investigation; the root cause is not established.

The failure was observed more than once during local validation of a 1.8.x backport based on f0bdd617951c78735951b95f77424e997465e4e7. The TCP test source is unchanged by the backport.

Environment
  • macOS 26.5.2, Apple Silicon / arm64
  • Zulu JDK 17.0.17
  • Scala 2.13.18, sbt 1.12.14
  • Target branch: 1.8.x
  • Test time factor: 2; the observed timeout is 6 seconds
Command used
PR_TARGET_BRANCH=origin/1.8.x sbt -batch \
  -J--add-opens=java.base/java.lang=ALL-UNNAMED \
  -Dpekko.test.multi-in-test=false \
  -Dpekko.test.multi-node=false \
  -Dpekko.test.tags.exclude=gh-exclude,timing \
  -Dpekko.test.timefactor=2 \
  -Dpekko.actor.testkit.typed.timefactor=2 \
  -Dpekko.cluster.assert=on \
  "set Global / concurrentRestrictions := Seq(Tags.limitAll(2))" \
  validatePullRequest

This is intermittent, not a deterministic reproducer. Earlier isolated runs of this case passed on both the unmodified 1.8.x source and the executor-wrapping backport. Passing in isolation does not explain the full-run failure.

Observed failure
An outgoing connection must send incoming data to the connection handler
java.lang.AssertionError: assertion failed: timeout (6 seconds) during expectMsgClass
waiting for class org.apache.pekko.io.Tcp$Received
  at org.apache.pekko.io.TcpConnectionSpec$EstablishedConnectionTest.expectReceivedString(TcpConnectionSpec.scala:1101)
  at org.apache.pekko.io.TcpConnectionSpec$$anon$3.$anonfun$new$8(TcpConnectionSpec.scala:132)

The latest failure log shows a connection being established, followed by reads of 0, 8, 9, and 0 bytes, then the timeout. The test writes testdata, then testdata2 and testdata3, and waits for the corresponding complete strings.

Relevant source: test case, expectReceivedString helper.

Expected behavior

The test should reliably receive the complete payload and pass during the full PR validation run. Investigate the difference between aggregate and isolated execution before changing the fixture, assertions, or timeout.

Related

Refs #3311, which tracked a similar timeout in the separate pull-mode test and is now closed.

Lingua principale
Scala
Stelle
1.7k
Fork
212
Merge medio
20h 44m
PR unite (30g)
104

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/pekko

Tutte le issue di apache/pekko

Issue simili

Altre issue su Scala

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.