forked from ray-project/ray
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Serve][Core] Fix serve_long_running memory leak by fixing GCS pubsub…
… asyncio task leak (ray-project#29187) Debugged with @simon-mo and @scv119 . The Serve long running test was failing due to a memory leak in dashboard.py. The root cause was in the GCS pubsub code, with the _close: asyncio.Event object adding millions of waits every few minutes without the waits ever being killed, causing the _close._waiters queue to grow without bound. The root cause is when awaiting with FIRST_COMPLETED, the caller is responsible for killing the unfinished task. This PR: Fixes the memory leak by canceling the close task if it wasn't done. (Contributed by @simon-mo) This PR also adds some side improvements to the release test: Use lower-memory instances so that memory leaks aren't hidden by the instances having a lot of available memory Gracefully handle the case where the wrk fails, which previously caused the release test output to be overwritten in a tight loop, which led to a hard-to-interpret errors being surfaced to the release test infrastructure Use different ports for the dashboard agents on the multiple cluster_utils virtual nodes to prevent port conflict Signed-off-by: Weichen Xu <[email protected]>
- Loading branch information
1 parent
ce40544
commit 40381de
Showing
5 changed files
with
69 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
cloud_id: {{env["ANYSCALE_CLOUD_ID"]}} | ||
region: us-west-2 | ||
|
||
max_workers: 0 | ||
|
||
head_node_type: | ||
name: head_node | ||
instance_type: c5.2xlarge | ||
|
||
worker_node_types: | ||
- name: worker_node | ||
instance_type: c5.2xlarge | ||
min_workers: 0 | ||
max_workers: 0 | ||
use_spot: false | ||
|
||
aws: | ||
TagSpecifications: | ||
- ResourceType: "instance" | ||
Tags: | ||
- Key: anyscale-user | ||
Value: '{{env["ANYSCALE_USER"]}}' | ||
- Key: anyscale-expiration | ||
Value: '{{env["EXPIRATION_2D"]}}' | ||
|
||
BlockDeviceMappings: | ||
- DeviceName: /dev/sda1 | ||
Ebs: | ||
VolumeSize: 300 | ||
DeleteOnTermination: true |
This file contains 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
This file contains 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