{"record":{"id":"fa045af1e8249cd4","repo":"sgl-project/sglang","slug":"tar-material-payload-is-empty","errorCode":null,"errorMessage":"tar material payload is empty","messagePattern":"tar material payload is empty","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/material_io.py","lineNumber":659,"sourceCode":"            )\n        partial_path.replace(output_path)\n    except Exception:\n        partial_path.unlink(missing_ok=True)\n        output_path.unlink(missing_ok=True)\n        raise\n    return str(output_path)\n\n\ndef _stream_tar_member_material(\n    batch: Any,\n    uri: str,\n    *,\n    condition_type: str,\n    condition_index: int,\n) -> str:\n    source_path, offset, size, member = _parse_tar_member_uri(uri)\n    if size <= 0:\n        raise ValueError(\"tar material payload is empty\")\n    if not source_path.is_file():\n        raise FileNotFoundError(\n            f\"tar material source does not exist or is not a file: {source_path}\"\n        )\n    source_size = source_path.stat().st_size\n    if offset > source_size or size > source_size - offset:\n        available = max(0, source_size - offset)\n        raise ValueError(\n            f\"tar material payload is truncated: expected {size} bytes, \"\n            f\"only {available} available\"\n        )\n\n    output_path, partial_path = _material_output_paths(\n        batch,\n        condition_type=condition_type,\n        condition_index=condition_index,\n        source_name=member,\n    )","sourceCodeStart":641,"sourceCodeEnd":677,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/material_io.py#L641-L677","documentation":"A tar+offset:// style material URI referenced a member whose declared size is <= 0. The extractor refuses to materialize an empty range.","triggerScenarios":"Calling minimax_h3_localize_material_uri with a tar-member URI whose size component parses to 0 or negative, e.g. 'tar+offset:///a.tar#off=0,size=0'.","commonSituations":"Malformed tar index metadata, empty file stored in the tar, or a URI template bug writing size=0.","solutions":["Check the tar archive actually contains non-empty content for that member","Regenerate the tar-member URI from the correct tar header size","Skip the condition if the empty asset is expected"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# after parsing your tar-member URI\nassert size > 0, 'tar member size must be positive'","typeGuard":null,"tryCatchPattern":"except ValueError as e: reject the condition with empty payload","preventionTips":["Generate tar-member URIs from tar header sizes, not manually"],"tags":["tar","minimax-h3","material-uri"],"backgroundTag":"invalid-uri-reference","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}