Skip to content

Commit

Permalink
[Core] print error before deadlock (#3459)
Browse files Browse the repository at this point in the history
  • Loading branch information
youkaichao authored Mar 19, 2024
1 parent b37cdce commit 6a9c583
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions vllm/engine/ray_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,17 @@ def __getattr__(self, name):
return getattr(self.worker, name)

def execute_method(self, method, *args, **kwargs):
executor = getattr(self, method)
return executor(*args, **kwargs)
try:
executor = getattr(self, method)
return executor(*args, **kwargs)
except Exception as e:
# exceptions in ray worker may cause deadlock
# see https://github.com/vllm-project/vllm/issues/3455
# print the error and inform the user to solve the error
msg = (f"Error executing method {method}. "
"This might cause deadlock in distributed execution.")
logger.exception(msg)
raise e

def get_node_ip(self) -> str:
return get_ip()
Expand Down

0 comments on commit 6a9c583

Please sign in to comment.