-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
[DO NOT MERGE][Core] Revert "Fix benign error log during normal shutdown (#36270)" #36646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -568,7 +568,10 @@ def __init__( | |||||
| ) | ||||||
|
|
||||||
| with launch_core_engines( | ||||||
| vllm_config, executor_class, log_stats, addresses | ||||||
| vllm_config, | ||||||
| executor_class, | ||||||
| log_stats, | ||||||
| addresses, | ||||||
| ) as (engine_manager, coordinator, addresses): | ||||||
| self.resources.coordinator = coordinator | ||||||
| self.resources.engine_manager = engine_manager | ||||||
|
|
@@ -636,10 +639,10 @@ def __init__( | |||||
|
|
||||||
| def shutdown(self, timeout: float | None = None) -> None: | ||||||
| """Shutdown engine manager under timeout and clean up resources.""" | ||||||
| if self._finalizer.detach() is not None: | ||||||
| if self.resources.engine_manager is not None: | ||||||
| self.resources.engine_manager.shutdown(timeout=timeout) | ||||||
| self.resources() | ||||||
| self._finalizer.detach() | ||||||
| if self.resources.engine_manager is not None: | ||||||
| self.resources.engine_manager.shutdown(timeout=timeout) | ||||||
| self.resources() | ||||||
|
|
||||||
| def _format_exception(self, e: Exception) -> Exception: | ||||||
| """If errored, use EngineDeadError so root cause is clear.""" | ||||||
|
|
@@ -683,7 +686,7 @@ def monitor_engine_cores(): | |||||
| sentinels = [proc.sentinel for proc in engine_processes] | ||||||
| died = multiprocessing.connection.wait(sentinels) | ||||||
| _self = self_ref() | ||||||
| if not _self or not _self._finalizer.alive or _self.resources.engine_dead: | ||||||
| if not _self or _self.resources.engine_dead: | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing the
Suggested change
|
||||||
| return | ||||||
| _self.resources.engine_dead = True | ||||||
| proc_name = next( | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By removing the check on the return value of
self._finalizer.detach(), theshutdownmethod is no longer idempotent. If this method is called multiple times, it will attempt to shut down the engine manager and clean up resources repeatedly. This could lead to unexpected errors if the underlying shutdown and cleanup operations are not idempotent. It's safer to restore the check to ensure shutdown logic runs only once.