[Bug] DecoupledCheckpointEngine.commit hangs non-writer ranks at dist.barrier() when writer subprocess is dead

オープン
#9,192 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python, pytorch

調査の方向性

Start with deepspeed/runtime/checkpoint_engine/decoupled_checkpoint_engine.py, especially commit() and the writer/non-writer handling around self.ckpt_process and dist.barrier(). Trace how a dead writer subprocess can leave non-writer ranks blocked, then implement coordinated error propagation so every rank raises consistently. The issue is done when the two-rank reproduction no longer hangs and all ranks report the writer failure.

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

説明

Summary

In deepspeed/runtime/checkpoint_engine/decoupled_checkpoint_engine.py:164-186, only designated DP writer ranks create self.ckpt_process (dp_writer_config is not None), while non-writer ranks have self.ckpt_process = None. Inside commit():

if self.ckpt_process is not None:
    if not self._check_process_alive():
        raise RuntimeError(f"[{ENGINE_NAME}] Cannot commit checkpoint: checkpoint process is not running.")
    ...
dist.barrier()

If a writer rank's checkpoint subprocess crashes or times out, the writer rank raises RuntimeError before reaching line 183 while all non-writer ranks proceed directly to dist.barrier() and hang indefinitely.

Affected Location
  • Repository: deepspeedai/DeepSpeed (master, deepspeed/runtime/checkpoint_engine/decoupled_checkpoint_engine.py:164-186)
Minimal Standalone Reproduction

2-rank Gloo group where rank 0's ckpt_process has exited with code 1 and rank 1 has ckpt_process = None:

  • Rank 0 exits with RuntimeError: [DecoupledCheckpointEngine] Cannot commit checkpoint: checkpoint process is not running.
  • Rank 1 hangs indefinitely inside dist.barrier().
Suggested Fix

Propagate writer commit errors across the process group (e.g., via dist.all_reduce on a status flag or dist.broadcast_object_list before/instead of bare dist.barrier()) so all ranks raise uniformly.

主要言語
Python
スター
43.3k
フォーク
5.1k
平均マージ
5日 10時間
マージ済み PR(30日)
85

環境構築

はじめの一歩

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

deepspeedai/DeepSpeed のほかの issue

deepspeedai/DeepSpeed の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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