sgl-project/sglang · error · RuntimeError

MiniMax H3 final output ffprobe timed out after 30 seconds

Error message

MiniMax H3 final output ffprobe timed out after 30 seconds

What it means

Final-output validation shells out to ffprobe with a 30-second timeout to read the generated MP4's media metadata. If ffprobe does not return within 30 seconds (huge files, network-mounted storage, overloaded machine), a RuntimeError wrapping subprocess.TimeoutExpired is raised.

Source

Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/video_adapter.py:383

    try:
        probe = subprocess.run(
            [
                "ffprobe",
                "-v",
                "error",
                "-show_entries",
                "stream=codec_type,codec_name,pix_fmt,width,height,avg_frame_rate,nb_frames,duration,sample_rate,channels:format=format_name,duration",
                "-of",
                "json",
                str(path),
            ],
            check=True,
            capture_output=True,
            text=True,
            timeout=30,
        )
    except subprocess.TimeoutExpired as exc:
        raise RuntimeError(
            "MiniMax H3 final output ffprobe timed out after 30 seconds"
        ) from exc
    except FileNotFoundError as exc:
        raise RuntimeError(
            "ffprobe is required to validate final MiniMax H3 output"
        ) from exc
    except subprocess.CalledProcessError as exc:
        detail = (exc.stderr or "").strip()
        suffix = f": {detail}" if detail else ""
        raise RuntimeError(
            f"ffprobe failed for final MiniMax H3 output{suffix}"
        ) from exc

    try:
        payload = json.loads(probe.stdout)
    except (TypeError, ValueError) as exc:
        raise RuntimeError(
            "ffprobe returned invalid JSON for MiniMax H3 output"

View on GitHub (pinned to 0132848349)

Solutions

  1. Move output_path to fast local storage (local NVMe/tmpfs)
  2. Reduce system load or generation concurrency so ffprobe completes quickly
  3. Retry the request — timeout is often transient
  4. File a feature request for a configurable probe timeout if long videos are normal
Defensive patterns

Strategy: retry

Validate before calling

import shutil, subprocess
assert shutil.which("ffprobe") is not None
# keep outputs on local disk to keep probe fast

Try / catch

try:
    fields = adapter.validate_final_outputs_sync(paths, batch)
except RuntimeError as e:
    if "timed out" in str(e):
        import time; time.sleep(5)
        fields = adapter.validate_final_outputs_sync(paths, batch)  # retry once
    else:
        raise

Prevention

When it happens

Trigger: _probe_minimax_h3_output_fields runs ffprobe against an output file on slow storage (NFS) or a very large/long MP4, exceeding the 30s subprocess timeout.

Common situations: output_path on network filesystems; heavily loaded GPU hosts during generation; extremely long-duration videos.

Understand the failure class

Related errors


AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28). Data as JSON: /api/errors/6b824be1c85082d2. Report an issue: GitHub.