[Bugfix][KV Offload] Isolate tiering shutdown failures (#52290)
Signed-off-by: Alex <jihui.huang@daocloud.io> Co-authored-by: Or Ozeri <oro@il.ibm.com>
AlexHuang committed
Sep 1, 2026 at 17:24 UTC
c35551f892f1aa3ace67c0d8cde74eafd00b6e69
1 file changed
+22
-3
vllm/v1/kv_offload/tiering/manager.py
+22
-3
@@ -927,7 +927,26 @@ class TieringOffloadingManager(OffloadingManager):
927
928
@override
929
def shutdown(self) -> None:
930
- """Shutdown all tiers and release resources."""
931
- for tier in self.secondary_tiers:
932
- tier.shutdown()
930
+ """Shut down secondary tiers before releasing primary resources.
931
+
932
+ Every secondary tier is given a shutdown attempt. If any shutdown
933
+ fails, preserve the primary mmap because a failed tier may still use it.
934
+ """
935
+ shutdown_error: Exception | None = None
936
+ for tier_idx, tier in enumerate(self.secondary_tiers):
937
+ try:
938
+ tier.shutdown()
939
+ except Exception as exc:
940
+ shutdown_error = exc
941
+ logger.exception(
942
+ "Failed to shut down secondary tier #%d "
943
+ "(tier_type=%s, impl_class=%s)",
944
+ tier_idx,
945
+ tier.tier_type,
946
+ type(tier).__name__,
947
+ )
948
+
949
+ if shutdown_error is not None:
950
+ raise shutdown_error
951
+
952
self.primary_tier.shutdown()