[Core] print error before deadlock (#3459)

This commit is contained in:
youkaichao 2024-03-18 21:06:23 -07:00 committed by GitHub
parent b37cdce2b1
commit 6a9c583e73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,8 +33,17 @@ try:
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()