CI captures no thread dump when a job hangs, and PR validation jobs have no timeout-minutes
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 70/100
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Scala
- スター
- 1.7k
- フォーク
- 212
- 平均マージ
- 18時間 20分
- マージ済み PR(30日)
- 108
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/pekko のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
apache/pekko#1840 · コメント 8 件 ·
メンテナーはふだん 1 日以内に返信
-
Coordinator singleton lease loss permanently stops the local ShardRegion while the node is still Up対応中かも @He-Pin が 4 日前に担当しました。 オープンbug cluster
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
-
enhancement flaky make-tests-easier-to-run
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
GeoSeries scale and skew tests fail with pytest 9.2.0対応中かも @jiayuasu が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
[BUG] Python unit CI fails on Ubuntu 26.04 runner対応中かも @parthosa が今日担当しました。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 83/100
NVIDIA/cudf-spark-tools#2207 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
canton-network/splice#8087 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信