{"record":{"id":"e6dac8e9fb655487","repo":"sgl-project/sglang","slug":"minimax-h3-audio-encode-failed-on-rank-0-owner-e","errorCode":null,"errorMessage":"MiniMax H3 audio encode failed on rank 0: {owner_error}","messagePattern":"MiniMax H3 audio encode failed on rank 0: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"critical","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/stages/audio_encoding.py","lineNumber":125,"sourceCode":"                    module=self.audio_vae,\n                ) as audio_vae:\n                    assert audio_vae is not None\n                    self.audio_vae = audio_vae\n                    batch.extra[MINIMAX_H3_REFERENCE_AUDIO_ROWS_EXTRA_KEY] = (\n                        self._encode_reference_payload(\n                            batch,\n                            plan,\n                            routed_materials,\n                        )\n                    )\n            except Exception as exc:\n                owner_exception = exc\n                owner_error = f\"{type(exc).__name__}: {exc}\"\n        owner_error = minimax_h3_replica_broadcast_error(owner_error)\n        if owner_error is not None:\n            if owner_exception is not None:\n                raise owner_exception\n            raise RuntimeError(\n                f\"MiniMax H3 audio encode failed on rank 0: {owner_error}\"\n            )\n        minimax_h3_replica_broadcast_extra(\n            batch, MINIMAX_H3_REFERENCE_AUDIO_ROWS_EXTRA_KEY\n        )\n\n    def _encode_reference_payload(self, batch: Req, plan, materials) -> dict:\n        from sglang.multimodal_gen.runtime.pipelines_core.stages.model_specific_stages.minimax_h3.material_io import (\n            minimax_h3_localize_material_uri,\n        )\n        from sglang.multimodal_gen.runtime.pipelines_core.stages.model_specific_stages.minimax_h3.prequeue import (\n            MINIMAX_H3_PROBE_FACTS_EXTRA_KEY,\n        )\n        from sglang.multimodal_gen.runtime.pipelines_core.stages.model_specific_stages.minimax_h3.reference_encoding import (\n            _AudioVAEDeterminismContext,\n            minimax_h3_encode_reference_audio_rows,\n        )\n","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/stages/audio_encoding.py#L107-L143","documentation":"Audio reference encoding runs only on rank 0; its exception (or error string) is broadcast across the replica group. If rank 0 failed and no exception object is available on this rank, a RuntimeError wrapping 'MiniMax H3 audio encode failed on rank 0: <owner_error>' is raised so all ranks fail together.","triggerScenarios":"Any exception inside the rank-0 audio tokenizer encode (corrupt reference audio, device OOM, missing weights) surfaces on non-owner ranks as this RuntimeError; on rank 0 the original exception is re-raised instead.","commonSituations":"Multi-replica (DP) inference where only one replica's audio encoder hits a bad input or OOM; debugging logs on non-zero ranks showing a wrapped error whose root cause is only in the rank-0 log.","solutions":["Inspect the rank-0 log for the underlying owner_error text and fix that root cause (corrupt audio file, OOM, missing component)","Verify reference audio files are readable and correctly formatted before submission","Reduce batch/audio reference size if the root cause is memory pressure"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    out = stage.forward(batch)\nexcept RuntimeError as e:\n    if \"audio encode failed on rank 0\" in str(e):\n        log_rank0_context(); raise","preventionTips":["Pre-validate reference audio files exist and decode","Monitor rank-0 memory; audio encode failures replicate cluster-wide"],"tags":["minimax-h3","audio-encoding","distributed","rank0"],"backgroundTag":"distributed-rank0-failure","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}