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

Abierto
#9,192 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python, pytorch

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
43.4k
Forks
5.1k
Merge medio
5 d 10 h
PR fusionados (30 d)
85

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de deepspeedai/DeepSpeed

Todos los issues de deepspeedai/DeepSpeed

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.