ad-supervisor STALE AB RECLAIM kills Adom Bridge every ~52 s when the Windows user name has non-ASCII characters (á/é → U+FFFD path mismatch)
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 decodedString. - Defensive: do not reclaim a process whose
versionmatches 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>).
3 Replies
Log in to reply.