Repository navigation
Bound the updater's network legs with deadlines - #263
Merged
Merged
Conversation
fetch-update-manifest and download-update waited on the network indefinitely, and since update checks run on the backend serve thread family-wide, one black-holed peer took the update surface down with it — which is why several products grew private watchdogs around rivet's own copy loop. The copy loop now waits for byte availability through peek-bytes-avail!-evt under a stall deadline with an optional total cap, and the manifest fetch runs its blocking connect inside a custodian-owned worker that a connect+idle deadline shuts down. Defaults are 60 seconds idle/stall and 30+60 connect+idle; products override them per call. Deterministic tests hold a pipe open, drip bytes past the stall bound, and park the deadline wrapper on never-evt.
fetch-update-manifest and download-update waited on the network indefinitely, and since update checks run on the backend serve thread family-wide, one black-holed peer took the update surface down with it — which is why several products grew private watchdogs around rivet's own copy loop. The copy loop now waits for byte availability through a peek-bytes-avail!-evt under a stall deadline with an optional total cap (handle-evt normalizes the completion to one value), and the manifest fetch runs its blocking connect inside a custodian-owned worker that a connect+idle deadline shuts down. Defaults are 60 seconds idle/stall and 30+60 connect+idle; products override them per call. Deterministic tests hold a pipe open, drip bytes past the stall bound, and park the deadline wrapper on never-evt.
This was referenced Oct 16, 2026
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.
Closes #249 and #253.
fetch-update-manifest/download-updatewaited on the network indefinitely, and update checks run on the backend serve thread family-wide, so a black-holed peer parked the update surface forever — the root cause behind every product's private watchdog.copy-limited!waits for byte availability through apeek-bytes-avail!-evtunder a stall deadline (default 60 s) with an optional total cap; a stalled peer raises a retryable error.fetch-update-manifestruns its blocking connect inside a custodian-owned worker that a connect+idle deadline (defaults 30+60 s) shuts down; products override via keyword arguments.The remaining issues in this cluster (#243/#244/#248/#250/#251/#240 and the DX set) build on these deadlines and follow in separate slices.