sgl-project/sglang · error · ValueError
extra_config['ssd_durability_mode'] must be one of: strict…
Error message
extra_config['ssd_durability_mode'] must be one of: strict, sync, relaxed, async
What it means
extra_config['ssd_durability_mode'] must be one of strict, sync, relaxed, async. Validation happens even if the UMBPDurabilityMode enum is unavailable (older mori or mocks), so invalid values always fail fast.
Solutions
- Use one of: strict, sync, relaxed, async (case-insensitive)
- Pick strict/sync for crash safety, relaxed/async for throughput as appropriate
Example fix
# before extra['ssd_durability_mode'] = 'fsync' # after extra['ssd_durability_mode'] = 'strict'
Defensive patterns
Strategy: validation
Validate before calling
assert str(extra.get('ssd_durability_mode','')).strip().lower() in ('strict','sync','relaxed','async') Type guard
def is_valid_durability(v) -> bool:
return isinstance(v, str) and v.strip().lower() in ('strict','sync','relaxed','async') Prevention
- Use only the four documented durability names
- Add config schema validation before server start
When it happens
Trigger: Setting ssd_durability_mode to an unrecognized string like 'fsync', 'none', or 'async_strict' in extra_config.
Common situations: Guessing durability names; carrying over config from a different store version where names differed.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- extra_config[ ] must be a boolean-like value (true/false…
- extra_config['spdk_passthrough'] must be a dict of spdk_*…
- extra_config['ssd_backend'] must be one of: file, spdk…
- extra_config['ssd_io_backend'] must be one of: posix…
- has entries, but rank_index=
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/f0678acc3a27b990.
Report an issue: GitHub.
Appendix: source
Thrown at python/sglang/srt/mem_cache/storage/umbp/umbp_store.py:351
if "eviction_policy" in extra:
cfg.eviction.policy = str(extra["eviction_policy"])
if "eviction_candidate_window" in extra:
cfg.eviction.candidate_window = int(extra["eviction_candidate_window"])
if "ssd_io_backend" in extra:
backend = str(extra["ssd_io_backend"]).strip().lower()
if backend not in ("posix", "io_uring"):
raise ValueError(
"extra_config['ssd_io_backend'] must be one of: posix, io_uring"
)
if UMBPIoBackend is not None:
cfg.ssd.io.backend = (
UMBPIoBackend.Posix if backend == "posix" else UMBPIoBackend.IoUring
)
if "ssd_durability_mode" in extra:
# Validate even when the enum is unavailable (older mori / mocks).
durability = str(extra["ssd_durability_mode"]).strip().lower()
if durability not in ("strict", "sync", "relaxed", "async"):
raise ValueError(
"extra_config['ssd_durability_mode'] must be one of: "
"strict, sync, relaxed, async"
)
if UMBPDurabilityMode is not None:
if durability in ("strict", "sync"):
cfg.ssd.durability.mode = UMBPDurabilityMode.Strict
else:
cfg.ssd.durability.mode = UMBPDurabilityMode.Relaxed
if "ssd_backend" in extra:
ssd_backend = str(extra["ssd_backend"]).strip().lower()
if ssd_backend not in ("file", "spdk", "spdk_proxy"):
raise ValueError(
"extra_config['ssd_backend'] must be one of: "
"file, spdk, spdk_proxy"
)
cfg.ssd.ssd_backend = ssd_backend
if "spdk_nvme_pci_addr" in extra:
cfg.ssd.spdk_nvme_pci_addr = str(extra["spdk_nvme_pci_addr"])View on GitHub (pinned to 0132848349)