Skip to content

The hub stopped answering and kept its lock: no start could replace it #398

Closed

Description

@7schmiede

Seen (0.32.0, Windows)

The hub on a maintainer's machine stopped serving about six minutes after it started and stayed that way for hours. It still held port 4250 and its state lock, but:

  • A new connection was refused, even though the port was still in Listen.
  • 11 connections it had accepted from the dashboard (Edge) sat in CloseWait: the browser had given up, and the hub never answered or closed them.
  • The process was idle (no CPU over several seconds, 23 threads all waiting). It looked like a deadlock, not a busy loop.
  • hub.log's last line was a forwarded POST /hub/stacks/<id>/api/v1/lanes/<lane>/restart that answered 200. Before it came an agent_started (Orca) and two update/checks. Nothing was logged after that.

Every start after that failed: devstack up, devstack hub start and the MCP server's start all ended with another devstack instance owns …\hub\lock, and devstack hub status said "not running". The daemons were not affected. Only ending the hub by hand helped.

Not known yet

The cause of the hang. No debugger and no symbols were at hand, so there is no stack dump. Things to look at next time:

  • a std::sync::Mutex held across a call that waits, or two locks taken in different orders, on a runtime worker
  • a blocking call on a runtime worker that never returns

Done about it

A hub that holds the lock, runs, said it listens on the port, started more than 60 s ago and does not answer is now ended by the next start (ensure_running: devstack up, devstack ui, devstack hub start, the MCP server), with a hub_hung line in the log. The daemon has had a similar rule for a while (end_unanswering_daemon, behind devstack down --all). This turns the symptom into a short gap instead of a dead dashboard; the root cause stays open here.

Next time it happens

Before ending it, take a dump (procdump -ma <pid>, or Task Manager → Create dump file) and keep the build's PDB, so the threads can be read.

🤖 Generated with Claude Code

Activity

  1. added
    bug
    on Oct 30, 2026
  2. 7schmiede commented on Nov 10, 2026

    @7schmiede
    MemberAuthor

    Closing: no hung hub since the watchdog came (0.34.0).

    • 30 days of the maintainers' pool telemetry (three members, Windows) hold no hub_hung and no hub_stuck line. Every hub start without an update before it followed minutes or hours of silence; the one checked against the machine's event log was a reboot of Windows.
    • One member's own hub.log since mid-October has no hub_stuck line, and its state directory no hub-stuck-*.dmp.

    The check also showed that the telemetry could not have shown a hang: the hub's last lines never left (hub_stop once in the pool against 66 times in the member's log), and hub_hung was dropped by the start that wrote it. #506 fixes both, so the next one shows in the pool.

    If it comes back: the watchdog writes a dump (hub-stuck-<ms>.dmp beside hub.log) and the release has the PDB (devstack-x86_64-pc-windows-msvc-pdb.zip).

    🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions