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

Đang mở
#9,192 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python, pytorch

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
43.3k
Fork
5.1k
Merge trung bình
5 ngày 10 giờ
Pull request đã merge (30 ngày)
85

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của deepspeedai/DeepSpeed

Tất cả issue của deepspeedai/DeepSpeed

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.