{"record":{"id":"6b824be1c85082d2","repo":"sgl-project/sglang","slug":"minimax-h3-final-output-ffprobe-timed-out-after-30","errorCode":null,"errorMessage":"MiniMax H3 final output ffprobe timed out after 30 seconds","messagePattern":"MiniMax H3 final output ffprobe timed out after 30 seconds","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/video_adapter.py","lineNumber":383,"sourceCode":"    try:\n        probe = subprocess.run(\n            [\n                \"ffprobe\",\n                \"-v\",\n                \"error\",\n                \"-show_entries\",\n                \"stream=codec_type,codec_name,pix_fmt,width,height,avg_frame_rate,nb_frames,duration,sample_rate,channels:format=format_name,duration\",\n                \"-of\",\n                \"json\",\n                str(path),\n            ],\n            check=True,\n            capture_output=True,\n            text=True,\n            timeout=30,\n        )\n    except subprocess.TimeoutExpired as exc:\n        raise RuntimeError(\n            \"MiniMax H3 final output ffprobe timed out after 30 seconds\"\n        ) from exc\n    except FileNotFoundError as exc:\n        raise RuntimeError(\n            \"ffprobe is required to validate final MiniMax H3 output\"\n        ) from exc\n    except subprocess.CalledProcessError as exc:\n        detail = (exc.stderr or \"\").strip()\n        suffix = f\": {detail}\" if detail else \"\"\n        raise RuntimeError(\n            f\"ffprobe failed for final MiniMax H3 output{suffix}\"\n        ) from exc\n\n    try:\n        payload = json.loads(probe.stdout)\n    except (TypeError, ValueError) as exc:\n        raise RuntimeError(\n            \"ffprobe returned invalid JSON for MiniMax H3 output\"","sourceCodeStart":365,"sourceCodeEnd":401,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/video_adapter.py#L365-L401","documentation":"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.","triggerScenarios":"_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.","commonSituations":"output_path on network filesystems; heavily loaded GPU hosts during generation; extremely long-duration videos.","solutions":["Move output_path to fast local storage (local NVMe/tmpfs)","Reduce system load or generation concurrency so ffprobe completes quickly","Retry the request — timeout is often transient","File a feature request for a configurable probe timeout if long videos are normal"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"import shutil, subprocess\nassert shutil.which(\"ffprobe\") is not None\n# keep outputs on local disk to keep probe fast","typeGuard":null,"tryCatchPattern":"try:\n    fields = adapter.validate_final_outputs_sync(paths, batch)\nexcept RuntimeError as e:\n    if \"timed out\" in str(e):\n        import time; time.sleep(5)\n        fields = adapter.validate_final_outputs_sync(paths, batch)  # retry once\n    else:\n        raise","preventionTips":["Write outputs to local NVMe, not NFS","Avoid probing while the host is saturated with other ffprobe jobs"],"tags":["minimax-h3","ffprobe","timeout","subprocess"],"backgroundTag":"subprocess-timeout","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}