Closed bug report

A bridge update swap (altium 0.2.96 → 0.2.97) kept calls in flight for ~47 min with nothing saying an update was running

Colby Knox · ·edited ·closed by Colby Knox

Adom Bridge 2.1.189 · Hydrogen 1.0.730 · altium-bridge 0.2.96 → 0.2.97 auto-update · Windows 11 · reported by a user in altium-bridge#30

What happened. On 2026-11-12 Adom Bridge auto-updated the altium bridge from 0.2.96 to 0.2.97. From 17:56 to 18:43 local time (about 47 minutes), calls to the altium bridge (altium_readiness, update_check) did not complete, and 3–4 requests showed as in flight. The bridge then came back by itself and has worked normally since.

What made it hard. Nothing said an update swap was in progress, so the user could not tell "updating" from "stuck" and spent time guessing.

Asks

  1. While a bridge update swap is in progress, say so in bridge_list and status for that bridge (and in the error a waiting call gets), with when it started.
  2. Look into why this swap took ~47 minutes.

1 Reply

Colby Knox ·

Fixed in Adom Bridge 2.1.190, 2.1.191 and 2.1.192, all on the insiders channel. Public is still 2.1.189.

Ask 1: say when an update is running. (2.1.190)

  • Every bridge_list row has an activity block. It shows:
    • each call in flight, with its verb, caller, age and stage. "sent to bridge" means the bridge has not answered yet. "getting the bridge ready" means Adom Bridge is still checking, starting or updating it.
    • an update in progress, with its versions, step and start time;
    • a start in progress;
    • how the last update ended, and how long it took.
  • status.bridgeUpdates.inProgress lists every bridge that is busy right now.
  • A call that arrives during an update answers bridge_updating with the update's step and start time. bridge_busy lists the calls in flight.
  • Each update writes its start, any wait, and its outcome with its duration to the bridge's lifecycle log (bridge_log_read).

Ask 2: why it took about 47 minutes. We reproduced it on our test machine with a test bridge and three calls in flight.

  • The update stopped the old process. Calls that arrived during the swap found its port refusing connections.
  • Each of those calls counted the others as work in progress and took the "busy, not dead" path, which leaves a bridge alone while other calls run. Adom Bridge's supervisor took the same path.
  • So nobody started the bridge while any call was in flight. A client that keeps 3 or 4 calls going keeps the bridge down until the calls stop.

That matches the report: 3 to 4 requests in flight, then the bridge came back by itself.

The fixes

  • A port that refuses connections is never "busy" (2.1.191). The calls and the supervisor start the bridge right away.
  • A slow start no longer holds everyone (2.1.191). A freshly started bridge whose /health is slow counts as up after about 13 s. It used to hold every other caller for up to 6.5 minutes.
  • One update per bridge at a time (2.1.192). A routine check and refresh_bridges could each start an update of the same bridge, and the second restarted the process the first had just started.

Proof on the test machine. Same sequence each time: three 12-second calls, then an update.

Version Result
2.1.190 2 calls answered bridge_busy after 15 s. The third sat in "getting the bridge ready" for over 3 minutes, and the bridge stayed down.
2.1.191 Update applied in 6 s. All three calls ran on the new version within about 35 s of arriving.
2.1.192 Two updates started together. One ran and the other waited, then found the bridge current. One download.

We could not get logs from the reporting machine, so this is the mechanism we reproduced, not a confirmed match for that run. If it happens again on 2.1.190 or later, bridge_list and the bridge's lifecycle log will name the cause.

Colby Knox closed this ·

Log in to reply.