[Serve] Fix proxy state crash on ActorUnschedulableError during RayService incremental upgrade - #65069
Closed
ryanaoleary wants to merge 2 commits into
Closed
[Serve] Fix proxy state crash on ActorUnschedulableError during RayService incremental upgrade#65069ryanaoleary wants to merge 2 commits into
ActorUnschedulableError during RayService incremental upgrade#65069ryanaoleary wants to merge 2 commits into
Conversation
Signed-off-by: Ryan O'Leary <ryanaoleary@google.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the proxy actor shutdown logic in proxy_state.py by handling ActorUnschedulableError and wrapping the shutdown and kill operations in try...except blocks to log warnings on failure. Feedback was provided to refactor the kill method because placing the is_shutdown() check inside the graceful shutdown try block could lead to misleading error logs and redundant kill attempts if the initial kill fails.
Signed-off-by: Ryan O'Leary <ryanaoleary@google.com>
Contributor
Author
|
reopened here: #65076, meant to push to my fork |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes an issue where the Ray Serve controller loop crashes with an uncaught
ActorUnschedulableErrorwhen attempting to shut down a proxy pinned to a dead or non-existant node. This PR wraps the shutdownray.get()call in atry...exceptblock, allowing the controller to gracefully clean up the dead proxy handle.When does this bug occur?
This race condition occurs when a proxy actor is created on a node that dies while the creation is still pending. It can be seen during RayService incremental upgrades when GCS Fault Tolerance with Redis is enabled:
PENDING_CREATION.alive_node_idsand callsshutdown()on the pending proxy handle.ray.get()throws anActorUnschedulableError, crashing the controller.Related issues
This issue was brought up in discussion in the KubeRay slack channel.
Additional information