CI captures no thread dump when a job hangs, and PR validation jobs have no timeout-minutes
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 70/100
Línea de trabajo
Start in .github/workflows/build-test-prValidation.yml and other PR validation workflows. Add timeout-minutes to each job, and a step running a watchdog that captures jcmd/jstack thread dumps from sbt's forked JVMs on hang, uploading as artifact. Done when CI fails fast on hang with dumps attached.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
When a CI job hangs, nothing captures a thread dump and most jobs have no timeout-minutes, so the run eventually dies on the runner's own global limit and the log contains no clue about what was blocked. Given that the test suite has several code paths that can block indefinitely, this turns an investigable hang into an unexplained red build.
Current state
There are 40 workflow files under .github/workflows/. timeout-minutes appears exactly once in all of them:
.github/workflows/nightly-multi-jvm-tests.yml:32: timeout-minutes: 240
build-test-prValidation.yml — the workflow that runs on every PR — sets none.
No workflow captures diagnostics on a hang. Searching for the usual mechanisms returns nothing:
rg -in 'jstack|jcmd|thread.?dump|blame-hang' .github/workflows/
(no matches)
Why hangs are plausible here
The testkit contains at least three paths that can block without a deadline:
TestKit.within does not interrupt its block. testkit/src/main/scala/org/apache/pekko/testkit/TestKit.scala:415,426-436:
val _max = max.dilated
...
val ret =
try f
finally end = prev_end
val diff = now - start
assert(min <= diff, s"block took ${format(min.unit, diff)}, should at least have been $min")
if (!lastWasNoMsg) {
assert(diff <= max_diff, s"block took ${format(_max.unit, diff)}, exceeding ${format(_max.unit, max_diff)}")
}
The budget is only checked after f returns. A block that never returns hangs the test forever; within provides no watchdog.
Player.enter awaits with Duration.Inf. multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Player.scala:124:
Await.result(client ? ToServer(EnterBarrier(b, Option(barrierTimeout))), Duration.Inf)
Controller blocks on a Netty future inside a message handler. multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Conductor.scala:531-532:
case GetSockAddr =>
sender() ! connection.channelFuture.sync().channel().localAddress()
This one is filed separately, but it is an example of the general shape: a blocked actor thread that also hosts the barrier coordinator.
Proposal
Two changes, both confined to .github/:
-
Capture thread dumps when a test step exceeds its budget. Run the sbt invocation under a watchdog that, on expiry, executes
jcmd <pid> Thread.print(orjstack -l <pid>) for every JVM in the process tree and uploads the output as an artifact before killing the step. sbt forks test JVMs, so the watchdog needs to find the children rather than only the sbt launcher. -
Add
timeout-minutesto the PR validation jobs, set well below the runner default and above the observed p99 for each job, so a hang fails fast with the dump attached instead of consuming the full runner limit.
A dump on hang is worth more than the timeout itself: the timeout only tells you the build is red, while the dump usually names the blocked thread and the lock or Await it is stuck in — which for a distributed-systems test suite is very often the actual bug rather than a CI annoyance.
Scope
CI configuration only. No production or test-source change.
- Lenguaje dominante
- Scala
- Estrellas
- 1.7k
- Forks
- 213
- Merge medio
- 17 h 47 min
- PR fusionados (30 d)
- 116
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/pekko
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
apache/pekko#1840 · 8 comentarios ·
Los mantenedores suelen responder en 1 día
-
Coordinator singleton lease loss permanently stops the local ShardRegion while the node is still UpPosiblemente ocupada @He-Pin la tomó hace 6 días. Abiertobug cluster
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
-
enhancement flaky make-tests-easier-to-run
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
Los mantenedores suelen responder en 1 día
-
bug flaky make-tests-easier-to-run
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
Los mantenedores suelen responder en 1 día
Todos los issues de apache/pekko
Issues similares
-
area:build priority:P2 status:backlog
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
KD5UJC-XYZ/scarab#648 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
lichess-org/lila#22324 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
canton-network/splice#8142 ·
Los mantenedores suelen responder en 1 día
-
Users who join a new meeting at the same moment: one sometimes gets "Ops, something went wrong" because bbb-web drops their registration (race on `Meeting.userCustomData`)Posiblemente ocupada @antobinary la tomó hace 1 día. Abiertomodule: core
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
bigbluebutton/bigbluebutton#26318 · 1 comentario ·
Los mantenedores suelen responder en 1 día