Skip to content

fix(hub): a start ends a hub that holds the lock and no longer answers (#398) - #399

Merged
7schmiede merged 1 commit into
mainfrom
fix/hung-hub
Oct 30, 2026
Merged

7schmiede merged 1 commit into
mainfrom
fix/hung-hub

Conversation

@7schmiede

Copy link
Copy Markdown
Member

Mitigates #398. The root cause of the hang is still open there.

  • Symptom: a hub stopped serving and kept port 4250 and its state lock for hours. Every start (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.
  • Fix: ensure_running now ends such a hub and starts a new one. A hub counts as hung only when all of these hold: it runs, its hub.json names 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 as hub_hung.
  • Refactor: the CLI's end_process (for unanswering daemons) moves to devstack_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:

  • New unit test a_hub_is_hung_when_it_runs_listened_here_and_is_old_enough.
  • devstack-hub and CLI unit tests pass; clippy and fmt are clean.
  • On this machine, the hung hub was replaced by hand with Stop-Process + devstack hub start. The new path itself was not run against a really hung hub.

🤖 Generated with Claude Code

#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>
@7schmiede
7schmiede merged commit 2ac31a4 into main Oct 30, 2026
13 checks passed
@7schmiede
7schmiede deleted the fix/hung-hub branch October 30, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant