Repository navigation
fix(hub): a start ends a hub that holds the lock and no longer answers (#398) - #399
Merged
Merged
Conversation
#398) A hub stuck for hours kept port 4250 and its state lock; every start (`up`, `ui`, `hub start`, the MCP server) failed on the lock until it was ended by hand. `ensure_running` now ends a hub that runs, said it listens on the port, started more than a minute ago and does not answer, then starts a new one; `hub_hung` goes to the log. The pid helper moves from the CLI to devstack-proc (`end_pid`) to serve both. The hang's cause stays open in #398. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 30, 2026
Merged
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.
Mitigates #398. The root cause of the hang is still open there.
devstack up,devstack ui,devstack hub start, the MCP server) failed with another devstack instance owns …\hub\lock until the hub was ended by hand.ensure_runningnow ends such a hub and starts a new one. A hub counts as hung only when all of these hold: it runs, itshub.jsonnames this port, it started more than 60 s ago, nothing answers on the port, and the lock is held. The end goes to the log ashub_hung.end_process(for unanswering daemons) moves todevstack_proc::end_pid, so the CLI and the hub share it.No review card: a bug fix, no change to a concept, contract or term.
Tests:
a_hub_is_hung_when_it_runs_listened_here_and_is_old_enough.devstack-huband CLI unit tests pass; clippy and fmt are clean.Stop-Process+devstack hub start. The new path itself was not run against a really hung hub.🤖 Generated with Claude Code