fix(ipc): retry proc acquisition when spawns fail#1669
Open
rosetta-livekit-bot[bot] wants to merge 1 commit into
Open
fix(ipc): retry proc acquisition when spawns fail#1669rosetta-livekit-bot[bot] wants to merge 1 commit into
rosetta-livekit-bot[bot] wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 93866f2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 33 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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
Fixes #5868. When every worker process fails to initialize,
launch_jobpreviously hung forever on_warmed_proc_queue.get()because nothing was ever put on the queue, and the 3-attempt retry loop was unreachable.Split the responsibility:
_acquire_procnow owns the wait-for-a-warmed-process loop. It racesqueue.get()against every in-flight spawn task and only retries once all in-flight spawns settle without producing a proc — so peer spawns still in flight don't burn a retry attempt. AfterMAX_ACQUIRE_ATTEMPTSsuch cycles, it raises aRuntimeError.launch_jobkeeps its own 3-attempt budget for post-acquire launch failures (the original retry semantics, untouched).Alternative considered
#5871 uses
Nonesentinels on_warmed_proc_queueto unblock waiters when a spawn fails. Two issues with that approach:Nonesentinels), solaunch_jobconsumes another sentinel without ever requesting a new process.MAX_ATTEMPTS=3becomes "fail 3 sentinels and give up".