Repository navigation
runtime: a background loop starts again after a panic - #13
Merged
Merged
Conversation
nats::connect spawns threads and panics when the OS has none. version_watch runs on a bare thread, so a burst of connections during boot, under a thread limit, ended it for good with nothing to show for it, and a promoted version no longer reached that instance until a restart. control::supervise has the same shape. Both now run through background(): a named thread, restarted after a panic. e2e/http-in-bound.sh turned master's CI red on the v0.4.0 commit, about one run in two, because its burst landed during boot. It now waits for the boot to finish, and checks directly that the version watch is alive after the burst. Two pipelines there used grep -q under pipefail, which reads an early exit of grep as a failure: they no longer do. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018wXgxT2UoFSZfqhAE1Tb5V
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.
ciis red on master at the v0.4.0 commit:e2e/http-in-bound.shfound a panic in about one run in two. It is a real defect, and a narrow one.version_watchruns on a bare thread, andnats::connectpanics when the OS has no thread to give. A burst of connections landing on its first connection, under a thread limit, ended it for good with nothing to show for it, and a promoted version no longer reached that instance until a restart. With the burst 5 s after boot: 0 panics in 10 runs.control::supervisehas the same shape.background(): a named thread, restarted after a panic.grep -qunderpipefail, which reads an early exit ofgrepas a failure: they no longer do.The check that wants no panic at all runs after boot, so a burst during boot is covered by a unit test and a repeated local run, where the thread panicked and stayed alive, not by this script.
Local: 48 unit tests,
http-in-boundnine times in a row, and the transport, governed, emit-subject and doc-example suites.🤖 Generated with Claude Code
https://claude.ai/code/session_018wXgxT2UoFSZfqhAE1Tb5V