Closed bug report

ad-supervisor STALE AB RECLAIM kills Adom Bridge every ~52 s when the Windows user name has non-ASCII characters (á/é → U+FFFD path mismatch)

ivan.mendez · ·closed by Colby Knox

Summary

Hydrogen's [ad-supervisor] kills the Adom Bridge it just spawned about 52 s after every spawn, then respawns it ~45 s later, forever. On this machine it has done so 860 times since Hydrogen was installed (5 Nov 2026). Every bridge (altium, kicad, fusion360…) dies with its parent, so the relay is never up for more than ~50 s. This is the real cause behind adom/altium-bridge#30; the fixes shipped there (altium-bridge 0.2.95/0.2.96, Adom Bridge 2.1.189) are on a different layer and do not change the cycle (re-measured today with both installed).

Trigger: the Windows user name contains non-ASCII characters (á, é). The supervisor compares the running exe path with the installed exe path; the running path is decoded with U+FFFD replacement characters, so the comparison fails and the healthy ab is declared a "shadow" and killed.

Environment

  • Hydrogen (ah) 1.0.717, build 8abc397c5a44e33661d161a6026bc13f5aded887, Windows 11, WSL2 Ubuntu 24.04 workspace
  • Adom Bridge 2.1.189 (auto-updated 10 Nov 19:26; cycle identical on 2.1.168, 2.1.188 and 2.1.189)
  • ab runs embedded under Hydrogen (--embedded --start-hidden, owner=hydrogen, source=cli-flag)
  • %USERPROFILE% = C:\Users\<user> where <user> contains á and é

Evidence

1. The kill line (%APPDATA%\hydrogen-desktop\hydrogen-desktop.log, one of 860 identical ones):

00:08:46.015 [ad-supervisor] ⚠ STALE AB RECLAIM: killing shadow adom-bridge.exe pid=33236
  ('C:\Users\<us�r-with-U+FFFD>\AppData\Local\Adom Bridge\adom-bridge.exe' v2.1.189):
  it is NOT the installed exe
  ('C:\Users\<usér-correct-UTF-8>\AppData\Local\Adom Bridge\adom-bridge.exe' v2.1.189)
  and is listening on port(s) 56281,24681,24680. Supervisor will respawn the installed ab.

Both paths are the same file: same directory, same exe, same version. Only the encoding of the user-name segment differs.

2. Byte-level proof (the two strings as written in the log, UTF-8):

running   path: 49 76 ef bf bd 6e 4d ef bf bd 6e ...   = "…" U+FFFD "…" U+FFFD "…"
installed path: 49 76 c3 a1 6e 4d c3 a9 6e ...         = "…" á "…" é "…"

ef bf bd is the UTF-8 replacement character. The running-process path (presumably from a Win32 process query) is being decoded through a lossy path (ANSI code page or String::from_utf8_lossy on a non-UTF-8 buffer), while the installed path comes from a correct wide-string source. Any user whose profile folder has a non-ASCII character will hit this.

3. The cycle (same log, supervisor lines only, one full period from today — attached as hydrogen-supervisor-cycle-2026-11-11.log):

00:05:34.607  STALE AB RECLAIM: killing shadow adom-bridge.exe pid=26848 (v2.1.189)
00:05:46.211  AB health probe failed (1/3 consecutive) - debouncing, no respawn yet
00:06:01.917  AB health probe failed (2/3 consecutive) - debouncing, no respawn yet
00:06:17.962  AB health probe failed 3x consecutively and no adom-bridge.exe process - attempting respawn
00:06:17.999  spawned AB detached (breakaway) pid 21436
00:06:17.999  respawned AB pid=21436
00:07:11.181  STALE AB RECLAIM: killing shadow adom-bridge.exe pid=21436 (v2.1.189)
   …
00:08:46.015  STALE AB RECLAIM: killing shadow adom-bridge.exe pid=33236 (v2.1.189)

Spawn → kill: 52–54 s, consistently. Kill → respawn: ~43 s (3 probes × 15 s debounce). Period ≈ 95 s.

Counts over the whole log: STALE AB RECLAIM = 860, spawned AB detached = 859, respawned AB pid = 855. The first reclaim is at 16:38:34 on install day, four minutes after Hydrogen first spawned ab — it has never run longer than ~54 s under Hydrogen.

4. ab's own view (%LOCALAPPDATA%\Adom Bridge\startup.log): setup() entered 866 times, setup() completed 866 times. ab finishes its startup normally every time, runs its bridge prewarm at +20 s, and is then killed from outside at +52 s. Nothing in ab's logs indicates a crash. Attached as ab-startup-tail.log.

5. The bridge's view (.adom\bridge-logs\altium.ad.log, with the new per-stop logging of ab 2.1.189, attached): the only stops recorded today are ab applying the 0.2.96 update and then supervisor: replacing the bridge: health port did not take a connection twice in a row (not running) — i.e. the bridge is gone because its parent ab was killed, not because of anything the bridge did.

What was ruled out along the way (in #30)

Spanish decimal locale, Microsoft Defender (no detections, no ASR events), the altium-bridge 15 s auto-stop timer, stack/alloc faults, the tiny_http accept loop, ab reaping the bridge, a slow bridge health check (fixed in 2.1.189 — did not change anything here). None of them: the supervisor says in its own words why it kills ab.

Suggested fix

  • Compare the two paths after normalising both to UTF-16/OsString (or compare by canonical path / file identity — volume serial + file index), never by a lossily decoded String.
  • Defensive: do not reclaim a process whose version matches the installed one and that is already answering on the expected ports (24680/24681); that is by definition the installed ab, whatever the path string says.
  • Until then: a setting to disable the stale-reclaim check, so affected users (any non-ASCII Windows user name — common in Spain, France, Germany, Nordics…) can use Adom Bridge at all.

Repro

Any Windows account whose profile folder name contains a non-ASCII character, Hydrogen with ab embedded. Watch hydrogen-desktop.log for STALE AB RECLAIM — it appears ~52 s after the first spawn.

Attachments: hydrogen-supervisor-cycle-2026-11-11.log, ab-startup-tail.log, altium.ad-2026-11-11.log (user name and host name replaced with <user> / <host>).

hydrogen-supervisor-cycle-2026-11-11.log

ab-startup-tail.log

altium.ad-2026-11-11.log

3 Replies

Colby Knox · ·edited

Thanks for the byte-level evidence, it made this quick. The fix is done and tested, and it reaches you with the next public Hydrogen release. We'll post here and close this when it's out.

The supervisor now lets PowerShell compare the running path with the installed one itself and prints UTF-8, so a user name with á or é no longer makes the installed Adom Bridge look like a shadow copy. A garbled path is never treated as a mismatch. The startup cleanup of old Hydrogen copies had the same decoding and got the same fix.

Tested on a Windows 11 box with a path containing "Usuário Téste": the new check matches it, and the old one reproduces the U+FFFD mismatch. If the kill cycle continues once you have that release, reply here with the new [ad-supervisor] lines.

Colby Knox closed this ·
Colby Knox reopened this ·
ivan.mendez ·

Field confirmation: the fix works.

I installed Hydrogen 1.0.730 by hand this morning (the public channel still serves 1.0.717; SHA-256 and the Authenticode signature of the installer verified before running it, /S /R). Hydrogen restarted at 09:21:19 and adopted the Adom Bridge that was already running.

Measured over the next 10 minutes (09:22 → 09:32), then again at 09:42:

  • STALE AB RECLAIM in hydrogen-desktop.log: 1401 → 1401 (before: one every ~95 s, so 6 per 10 min).
  • setup() entered in ab's startup.log: 1407 → 1407 (no new ab starts).
  • adom-bridge.exe: same PID for 22+ minutes (previous record under Hydrogen: 54 s).
  • altium.ad.log: zero replacing the bridge lines; altium 0.2.96, kicad and fusion360 bridges all running with no restarts; the relay lists the machine as reachable again.

Supervisor lines since the 1.0.730 start, for the record:

09:21:19.797 [ad-supervisor] HD liveness beacon listening on 127.0.0.1:9001 (AB embedded probe)
09:21:22.826 [ad-supervisor] AB already running - adopting into embedded mode (POST /embedded/enter)
09:21:22.833 [ad-supervisor] embedded/enter ok: {... "entered_via":"runtime-adopt" ...}
09:21:27.859 [ad-supervisor] brand fonts: 0 installed now, 3 present, 0 failed

Nothing after that. From my side this issue can be closed once 1.0.721+ is on the public channel. Thank you for the quick turnaround.

One note for the altium-bridge side, posted in adom/altium-bridge#30: with ab finally alive, altium_agent_start still fails, and it is the same character class of bug (the accented profile path), this time inside the agent's DelphiScript.

Colby Knox ·

The fix is now on the public channel: Hydrogen 1.0.765 is out, so every install with an accented Windows user name gets it through the normal update. Thanks again for the evidence and for confirming it on 1.0.730. Closing this; reopen it if the reclaim cycle ever comes back.

Colby Knox closed this ·

Log in to reply.