A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 10, 01:30 UTC
[EPLB][BugFix]Possible deadlock fix (#32418)
Signed-off-by: ilmarkov <markovilya197@gmail.com> Signed-off-by: Tyler Michael Smith <tlrmchlsmth@gmail.com> Co-authored-by: Tyler Michael Smith <tlrmchlsmth@gmail.com>
Ilya Markov committed
Jan 16, 2026 at 15:11 UTC
c9a533079cc8c991c527eab029dbc990b4dc9d5d
1 file changed
+17
-2
vllm/distributed/eplb/eplb_state.py
+17
-2
@@ -970,8 +970,23 @@ class EplbState:
970
ep_group: ProcessGroup,
971
is_profile: bool = False,
972
):
973
- if not model_state.buffer_lock.acquire(blocking=False):
974
- return
973
+ # We call move_to_workspace only when ep_buffer_ready is 1.
974
+ # It means we only need to wait for the lock for a short time.
975
+ max_retries = 6 # 1 minute max
976
+ retries = 0
977
+ while not model_state.buffer_lock.acquire(blocking=True, timeout=10.0):
978
+ retries += 1
979
+ if retries >= max_retries:
980
+ raise RuntimeError(
981
+ f"Rank {ep_group.rank()}: buffer_lock timeout after "
982
+ "{max_retries * 10}s"
983
+ )
984
+ logger.warning(
985
+ "Rank %d: EPLB buffer_lock acquire failed, retrying (%d/%d)",
986
+ ep_group.rank(),
987
+ retries,
988
+ max_retries,
989
+ )
990
try:
991
assert model_state.new_physical_to_logical_map is not None
992
device_index = model_state.cuda_device_index or self.cuda_device_index