dsv41: after "the TP pair failed; rank 0 exits", rank 0 can stay alive and keep answering /health 200

オープン 初心者向け
#70 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
65/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
linux, zig

調査の方向性

zig/src/families/dsv41/lanes.zig の exitSoon() から始め、すでに _exit を使っている 74b715d (#33) で変更されたランク1の経路と比較してください。その隣に小さなヘルパー pair_exit.zig を追加し、ランク0が _exit(3) で終了するようにしてください。また、レポートに記載されたホストテストを再現してください。atexit ハンドラが戻らない fork された子プロセスは300ミリ秒以内に消えている必要があり、std.process.exit の版は生存したままである必要があります。CPU のみのホストで zig test -lc zig/src/families/dsv41/pair_exit.zig と zig build test を使って検証してください。std.process.exit に戻す変更でこのテストが失敗すれば完了です。任意の /health の 503 変更は別件で、先に health ハンドラを見つける必要があります。

索引モデルが issue の本文から書いたものです。

説明

AI disclosure: I am not a software developer. Claude Code (Claude Opus 5.5, medium reasoning) wrote this report from logs and a code reading; an independent Claude Fable 5.2 (medium reasoning) review checked it before posting; this is not a claim of human developer review.

What happened (two-box TP2, tcp_host collectives for gathers above the RDMA slot size, TF_COLL_PROGRESS_MS=2000,
DeepSeek-V4.1-Flash EXL3 2.9 bpw, commit 93d2845):

  • During an 11,594-token prompt pass, rank 0's tcp_host exchange (prompt_attn layer 0, 4 MiB, chunk 1 of 4) failed after
    2,009 ms with Timeout (no progress within the deadline); rank 1 failed the same exchange after 0 ms with
    PeerLost (peer closed while sending) (rank 0's wire shutdown, as designed).
  • Rank 1 exited. Rank 0 logged dsv41: the TP pair failed (Timeout); rank 0 exits but did not exit: it kept its pid,
    /health kept returning 200, and the later chat requests in the log ended reason=error (Timeout) after ~0.03 s.

Why (code reading): exitSoon() in families/dsv41/lanes.zig calls std.process.exit(3), which with libc linked
is libc exit(): atexit handlers and every loaded library's fini (the dlopened GPU runtime, libomp) run before the
process ends, while the HTTP and engine threads keep running. 74b715d (#33) moved rank 1 to _exit for the same fini list;
rank 0's path still goes through it, so a fini that blocks (we cannot tell which one from the log; there is no stack)
leaves a live process with a poisoned pair. /health does not look at the pair, so health checks pass.

Proposed fix: rank 0 ends through _exit(3) too (a small pair_exit.zig with a host test: a forked child whose
atexit handler never returns is ended by now() with status 3; with libc exit() the same child is still alive after
300 ms). Optionally /health could answer 503 once the pair failed, for the 500 ms before the exit.

Related: #55 covers rank 0's normal stop, not this failed-pair path; #51 concerns the 2 s progress deadline behind the open question below.

Open question: rank 1 reached that exchange more than 2 s after rank 0 without logging a GPU wait past 2 s; the rank
logs have no timestamps, so we could not tell where rank 1 spent that time. A larger TF_COLL_PROGRESS_MS hides it.

Test scope: host tests on a CPU-only Linux dev host (zig 0.17.0), on 93d2845 and on main 01aa7d6 (zig build test 338/338 there): zig test -lc zig/src/families/dsv41/pair_exit.zig
2/2 pass; the mutation back to std.process.exit fails the first test. Not run: anything on GPU hardware, a reproduced
wedge with the fix.

主要言語
Zig
スター
76
フォーク
9
平均マージ
21時間 59分
マージ済み PR(30日)
34

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Shoestring-dev/StrixFold のほかの issue

Shoestring-dev/StrixFold の issue をすべて見る

似ている issue

Distributed Systems の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。