sgl-project/sglang · error · ValueError
tar material payload is empty
Error message
tar material payload is empty
What it means
A tar+offset:// style material URI referenced a member whose declared size is <= 0. The extractor refuses to materialize an empty range.
Source
Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/material_io.py:659
)
partial_path.replace(output_path)
except Exception:
partial_path.unlink(missing_ok=True)
output_path.unlink(missing_ok=True)
raise
return str(output_path)
def _stream_tar_member_material(
batch: Any,
uri: str,
*,
condition_type: str,
condition_index: int,
) -> str:
source_path, offset, size, member = _parse_tar_member_uri(uri)
if size <= 0:
raise ValueError("tar material payload is empty")
if not source_path.is_file():
raise FileNotFoundError(
f"tar material source does not exist or is not a file: {source_path}"
)
source_size = source_path.stat().st_size
if offset > source_size or size > source_size - offset:
available = max(0, source_size - offset)
raise ValueError(
f"tar material payload is truncated: expected {size} bytes, "
f"only {available} available"
)
output_path, partial_path = _material_output_paths(
batch,
condition_type=condition_type,
condition_index=condition_index,
source_name=member,
)View on GitHub (pinned to 0132848349)
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
Defensive patterns
Strategy: validation
Validate before calling
# after parsing your tar-member URI assert size > 0, 'tar member size must be positive'
Try / catch
except ValueError as e: reject the condition with empty payload
Prevention
- Generate tar-member URIs from tar header sizes, not manually
When it happens
Trigger: 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'.
Common situations: Malformed tar index metadata, empty file stored in the tar, or a URI template bug writing size=0.
Related errors
- tar material offset_data and size must be non-negative
- material URI has an invalid base64 payload
- material URI has invalid base64 padding
- material URI has data after base64 padding
- tar material source does not exist or is not a file: {source
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/fa045af1e8249cd4.
Report an issue: GitHub.