ceac: race-guard duplicate sglang launch when instance still loading#493
Open
catoneone wants to merge 1 commit into
Open
ceac: race-guard duplicate sglang launch when instance still loading#493catoneone wants to merge 1 commit into
catoneone wants to merge 1 commit into
Conversation
A 60 GB model takes ~3-5 min to load shards into the GPU. During that window /model_info doesn't 200 yet, so the worker's existing probe in _ensure_sglang_running concluded 'no server' and spawned ANOTHER launch — both processes then tried to load the same model into the same GPU concurrently, the second OOMed at allocator ~136 GB of 143 GB, and the worker burned the 15-min readiness deadline waiting on a launch that never finishes. Before launching, SSH-pgrep for sglang.launch_server. If one's already there, skip the launch and just poll /model_info — the loading instance will come up on its own.
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.
Summary
_ensure_sglang_runningprobed/model_infowith a 10 s timeout and treated any non-200 as 'server dead → launch a new one'. But a 60 GB ckpt takes ~3-5 min to load shards into GPU memory, and during that window/model_infodoesn't 200 yet. The worker then spawned a secondsglang.launch_server— both processes raced to allocate ~136 GB of model into the same 143 GB GPU, the second OOMed mid-load, and the worker spent the next 15 min on the readiness deadline waiting for a launch that never finishes.Production today:
5HWMR5yt7Cjob failed after 15 min withGPU 0 has a total capacity of 139.35 GiB of which 182.00 MiB is free, with twosglang.launch_serverprocesses alive on the GPU host.Add a SSH
pgrep -f sglang.launch_serverbefore the launch step — if one is alive, skip the launch and just poll/model_infountil it comes up.Test plan