debug-distributed-hang

Diagnose distributed-inference hangs in SGLang across parallel setups using per-rank traces.

Updated Jun 4, 2026
One-click install
npx skills add https://github.com/annealing-inversion/sglang-kimi-deferral --skill debug-distributed-hang-annealing-inversion
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debug-distributed-hang
Source: https://github.com/annealing-inversion/sglang-kimi-deferral/tree/main/.claude/skills/debug-distributed-hang
Command: npx skills add https://github.com/annealing-inversion/sglang-kimi-deferral --skill debug-distributed-hang-annealing-inversion

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Multi-GPU SGLang runs can hang due to diverging state across ranks; this Skill provides techniques to locate the root cause and stabilize distributed inference.

Core Features & Use Cases

  • Per-rank logging and traces to pinpoint divergence
  • Py-spy watchdogs, NCCL debug steps, and CUDA coredump workflows
  • Binary-search methodology to identify the first diverge point and apply fixes
  • Use cases: debugging TP/PP/DP/EP hangs during AllGather/AllReduce and related collectives

Quick Start

Provide your multi-GPU run context to the tool and let it guide you through attaching py-spy, enabling NCCL logs, and collecting per-rank traces to identify the diverge point.

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 SGLang hangs during collective operations?

To debug distributed SGLang hangs, apply per-rank logging and traces to pinpoint divergence, use py-spy watchdogs for stack snapshots, enable NCCL debug steps, and perform binary-search methodology to locate the first diverge point.

Why does multi-GPU inference hang in tensor-parallel and pipeline-parallel setups?

Multi-GPU inference hangs in tensor-parallel and pipeline-parallel setups occur due to diverging state across ranks. Identifying the first diverge point through per-rank traces and cross-rank divergence analysis stabilizes the distributed run.

Can I use py-spy to trace SGLang NCCL hangs?

Yes, you can use py-spy as a watchdog to trace SGLang NCCL hangs. Attach py-spy to the running processes to capture stack traces, which helps locate the exact diverge point during AllGather or AllReduce collectives.

What is the best way to identify cross-rank divergence in distributed inference?

The best way to identify cross-rank divergence in distributed inference is using a binary-search methodology to locate the first diverge point, combined with per-rank logging and cross-rank divergence analysis to stabilize multi-GPU runs.

Do I need CUDA core-dumps to diagnose distributed SGLang hangs?

You need CUDA core-dumps guidance as part of deterministic debugging workflows to diagnose distributed SGLang hangs. Collecting core-dumps alongside per-rank traces helps identify the root cause of multi-GPU run failures.