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

Aperta
#9,192 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python, pytorch

Direzione di ricerca

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.

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

Descrizione

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.

Lingua principale
Python
Stelle
43.4k
Fork
5.1k
Merge medio
5g 10h
PR unite (30g)
85

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 deepspeedai/DeepSpeed

Tutte le issue di deepspeedai/DeepSpeed

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.