[sglang-miles] Fix post_process_weights deadlock in RL in-place mode - #29670
Merged
ByronHsu merged 1 commit intoJun 29, 2026
Conversation
ByronHsu
requested review from
Ying1123,
hnyls2002,
merrymercy and
xiezhq-hermann
as code owners
June 29, 2026 18:12
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
ByronHsu
force-pushed
the
byron/fix-v0513-pause-aware-post-process
branch
from
June 29, 2026 18:19
a323af7 to
a705d50
Compare
ByronHsu
force-pushed
the
byron/fix-v0513-pause-aware-post-process
branch
from
June 29, 2026 18:28
a705d50 to
23d9898
Compare
maocheng23
approved these changes
Jun 29, 2026
ByronHsu
merged commit Jun 29, 2026
d15e190
into
sgl-project:sglang-miles-v0.5.13
38 of 42 checks passed
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
Restore the pause-aware locking behavior for
post_process_weightson thesglang-miles-v0.5.13branch.This is the
post_process_weightshunk from the earlier pause-aware deadlock fix in #22754, which appears to have been lost during the v0.5.13tokenizer_control_mixin.pyrefactor.sglang-miles-v0.5.12skippedmodel_update_lock.writer_lockwhen the engine was already paused. During the v0.5.13 refactor totokenizer_control_mixin.py,post_process_weightsbecame an unconditional writer-lock acquisition. That can deadlock withpause_generation(mode="in_place"):The result is that health generation stops making progress and post-load processing can time out.
Fix
self.is_pauseunderis_pause_cond.model_update_lock.writer_lockonly when the engine is not paused.nullcontext()while paused, matching the pause-aware behavior from the earlier miles branch.Validation
CI States
Latest PR Test (Base): ❌ Run #28393955205
Latest PR Test (Extra): ❌ Run #28393954957