Skip to content
Machine Learning
Skill

/sglang-prod-incident-triage

Replay-first debug flow for SGLang serving problems. Use when a live or recent server shows health-check failures, latency or throughput regressions, queue growth, timeouts, distributed stalls, crash dumps, wrong outputs after deploys, or PD/EP/HiCache issues, and the job is to

From plugin
ai-infra-auto-driven-skills
1.2k10 skills

Claude Code

$ npx -y skills add BBuf/AI-Infra-Auto-Driven-SKILLS --skill sglang-prod-incident-triage --agent claude-code

SKILL.md

sglang-prod-incident-triage.SKILL.md
name: sglang-prod-incident-triage
description: Replay-first debug flow for SGLang serving problems. Use when a live or recent server shows health-check failures, latency or throughput regressions, queue growth, timeouts, distributed stalls, crash dumps, wrong outputs after deploys, or PD/EP/HiCache issues, and the job is to turn the problem into a replay plus the right next debug tool.

SGLang Serving Debug

Use the maintained [source contracts](../../docs/upstream-source-contracts.md) when applying historical evidence to a current branch. The review/history corpora retain their own capture dates; they do not certify today's dispatch or numerical defaults. For kernel replacements, verify that the real model executes the candidate before treating end-to-end tests as coverage.

Overview

Use this skill to turn a live serving problem into a debug path you can replay.

Use one loop:

  • collect a baseline bundle
  • save the failing request or crash dump
  • replay on a clean target
  • only then switch tools

Do not start with profiling.

Version-sensitive live-server signals:

  • `--enable-session-radix-cache` plus `/close_session`: agent or RL rollouts

that forget to close sessions can look like unexplained KV growth

  • current Rust ingress enforces API/admin keys and supports profiling;

older Rust builds differ. Confirm the ingress binary and source revision before interpreting a 401 or 404 (see the endpoint reference).

This skill should work with more focused skills instead of re-implementing them:

  • `debug-cuda-crash` when replay plus coredump points to a CUDA crash path
  • `debug-distributed-hang` when the problem is clearly a TP/PP/DP/EP hang
  • `llm-torch-profiler-analysis` when the issue is already narrowed to a

compute-side path

Three examples are included:

  • TTFT spike with low queue time
  • replay-first CUDA crash flow
  • request-shaped distributed hang flow

Output Contract

Return:

  • problem class
  • what was checked
  • strongest signal so far
  • current best guess
  • what was ruled out
  • next step
  • production risk

When To Use It

  • `/health` or `/health_generate` is unhealthy
  • latency or throughput regressed under serving load
  • queue size grows while health still looks green
  • one request class times out or hangs
  • the server crashes only after some requests
  • outputs changed after a deploy, topology change, or weight switch
  • one older commit is known-good and a newer commit is known-bad

Workflow

1. Collect a baseline bundle

Confirm the ingress and build first. Current Rust route assembly includes load, metrics (when enabled), HiCache and profile controls but no `/ready` route (it is only exempt from auth), so `/ready` returns 404 there; Python route parity is not universal. A 404 can mean an older build, an unmounted optional route or an ingress difference. Record status and response body, then consult the actual route module. Health/readiness are different checks.

If a live server is reachable, collect a read-only bundle before anything more intrusive:

python3 scripts/incident_artifact_tool.py collect-bundle \
  --base-url http://127.0.0.1:30000 \
  --outdir /tmp/incident_bundle

python3 scripts/incident_artifact_tool.py summarize-bundle \
  /tmp/incident_bundle

If the server is protected:

python3 scripts/incident_artifact_tool.py collect-bundle \
  --base-url http://127.0.0.1:30000 \
  --token "$SGLANG_BEARER_TOKEN" \
  --outdir /tmp/incident_bundle

The bundle script collects:

  • `/ready`
  • `/health`
  • `/health_generate`
  • `/model_info`
  • `/server_info`
  • `/v1/loads?include=all`
  • `/v1/loads?include=core,queues,disagg,spec`
  • `/metrics`
  • `/hicache/storage-backend` on a best-effort basis

If stale or corrupt HiCache contents are the working diagnosis, capture the bundle and relevant request dumps before calling `POST /hicache/storage-backend/clear`. That endpoint clears the attached backend's contents without detaching it; treat it as destructive and use it only when losing the cached contents is acceptable. Attach, detach, and clear details are in [references/endpoints-and-signals.md](references/endpoints-and-signals.md).

Use the summary for a quick read on:

  • health vs. active health state
  • topology and runtime flags
  • point-in-time queue and token usage
  • TTFT / E2E / queue-time heuristics from Prometheus metrics

If the summary says the bundle was captured while the server was idle, recollect it during traffic or move quickly to dump plus replay.

If no live server is reachable, start from the best dump or log already available:

  • crash dump
  • request dump
  • logs
  • CUDA coredump
  • OTel trace
  • torch profile

2. Save the failing request

Read [references/decision-tree.md](references/decision-tree.md) only if the problem class is still unclear:

  • server down or unhealthy
  • latency or throughput regression
  • wrong output or behavior regression
  • intermittent timeout or hang

Then preserve the request payload that actually triggers the problem:

  • crash path: use `--crash-dump-folder`
  • non-crash path: enable request dump or save the exact trigger request

Do not jump straight from a live symptom to low-level debugging without first saving something you can replay.

3. Replay on a clean target

Read [references/endpoints-and-signals.md](references/endpoints-and-signals.md) when you need help reading the baseline bundle or the replay target.

Read [references/replay-trace-profile.md](references/replay-trace-profile.md) when you need the replay, trace, profile, or bisect paths.

Standard order:

1. collect baseline bundle 2. capture request dump or crash dump 3. restart a clean debug target if needed 4. replay the same issue 5. collect replay-time logs and dumps

4. Only go deeper after replay

Replay

Use replay when:

  • a crash dump exists
  • a request dump exists
  • the problem depends on request shape or workload mix

If a crash dump exists, summarize it first:

python3 scripts/inciden
Read more
@bbuf
Ships withai-infra-auto-driven-skills

**Agent-ready skills for LLM serving benchmarks, profiler triage, capacity planning, model Day-0 support, incident triage, and model PR history across SGLang, vLLM, TensorRT-LLM, and TokenSpeed — plus SGLang PR and article explainer videos.** Plain SKILL.md

Stars on GitHub

Momentum

stars in total
1.2k
Star history of BBuf/AI-Infra-Auto-Driven-SKILLS on GitHub, a chart by star-history.com

More skills from other plugins.

analyze-ci

analyze-ci

Analyze failed GitHub Action jobs. Takes one or more GitHub URLs (job, workflow-run, or PR) and summarizes each failure with root…

mlflow9d29k
@mlflow@mlflowInstall Skill
hf-cli

hf-cli

Hugging Face Hub CLI (`hf`) for downloading, uploading, and managing models, datasets, spaces, buckets, repos, papers, jobs, and…

skills3w11k
@huggingface@huggingfaceInstall Skill
feast-architecture

feast-architecture

Internals of the Feast codebase — how each component works, where the key abstractions live, and the data flow through the…

feast13d7.4k
@feast-dev@feast-devInstall Skill
add-ecosystem

add-ecosystem

Add a new ecosystem and base model to basemodel.constants.ts. Use when onboarding a new model family from providers like Baidu,…

civitai9d7.3k
@civitai@civitaiInstall Skill

Questions about sglang-prod-incident-triage.

Which coding agents can use sglang-prod-incident-triage?
sglang-prod-incident-triage installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.