debug-distributed-hang

Diagnose multi-GPU SGLang distributed inference hangs by locating rank divergence during collectives.

410|14|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/OpenMOSS/MOSS-VL --skill debug-distributed-hang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debug-distributed-hang
Source: https://github.com/OpenMOSS/MOSS-VL/tree/main/sglang/.claude/skills/debug-distributed-hang
Command: npx skills add https://github.com/OpenMOSS/MOSS-VL --skill debug-distributed-hang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Debug hanging issues in multi-GPU SGLang distributed inference by providing a structured workflow to locate divergence across ranks during collectives and restore progress.

Core Features & Use Cases

  • Per-rank logging patterns to capture divergence and enable diffing across ranks
  • Guided use of watchdogs, NCCL logs, and CUDA coredumps to identify hang causes
  • Binary-search methodology to locate the first point of divergence and apply fixes in TP/PP/DP/EP configurations
  • Use cases include diagnosing AllGather/AllReduce deadlocks and mismatched inputs in model-parallel inference

Quick Start

Run a multi-GPU SGLang run with per-rank logging enabled and follow the steps to locate the first diverging point and implement the resolution.

Frequently Asked Questions about debug-distributed-hang

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug distributed hangs in multi-GPU SGLang inference?

To debug distributed hangs in SGLang, enable per-rank logging and use a binary-search methodology to locate the first diverge point across ranks during NCCL collectives, then apply fixes to restore progress.

Why does my SGLang distributed inference hang during AllGather or AllReduce operations?

SGLang distributed inference hangs during AllGather or AllReduce when ranks diverge in state during collectives. You can identify the specific deadlock cause by inspecting NCCL logs and analyzing CUDA coredumps.

What's the best way to find mismatched inputs causing deadlocks in model-parallel inference?

The best way to find mismatched inputs in model-parallel inference is capturing per-rank logging patterns to diff rank states, then applying a binary-search methodology to pinpoint the first divergence point.

Does this distributed hang diagnosis workflow apply to tensor, pipeline, data, and expert parallelism setups?

Yes, this diagnosis workflow applies to TP, PP, DP, and EP setups in SGLang. It guides you through using watchdogs, collecting stack traces with py-spy, and inspecting NCCL logs to ensure consistent convergence.

What diagnostics are needed to resolve NCCL deadlocks in SGLang?

Resolving NCCL deadlocks in SGLang requires collecting stack traces, inspecting NCCL logs, enabling per-rank logging, and checking CUDA coredumps to identify rank divergence and implement the correct fixes.