fix(cli): time out stalled model downloads#2415
Open
miguel-heygen wants to merge 1 commit into
Open
Conversation
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.
Root cause
The shared model downloader had no inactivity timeout. If a server opened a successful response but stopped delivering bytes,
pipeline()waited forever and left a zero-byte.tmpfile. This surfaced while Kokoro downloadedkokoro-v1.0.onnx.Fix
The timeout measures inactivity, not total download duration, so slow downloads continue while bytes are arriving.
Regression coverage
Adds a red-first test with a 200 response that never delivers data. It verifies prompt rejection and cleanup of both the partial and destination files.
Validation
Reviewer action
Confirm the 30-second inactivity window is appropriate for model hosts; it does not cap total transfer duration.