Repository navigation
Description
What happens
On the appliance, one driver TDR leaves the serve process with a dead context, and nothing in it notices: the
request that hit the TDR is answered with the runtime's error, and every later request on that same process fails the
same way — while a fresh process on the same, already power-cycled device answers 200.
Measured on the c22 board (rc-2026-11-04-c22, amdxdna 0007, boot 12:23 AST), from /data/logs/.../lemond.log and the
same boot's dmesg (captured on ryzen, ~/tmp-ort/puppy-c22-hw/):
| when | what | result |
|---|---|---|
| 12:24:27 | 1bit unified -m /data/models/Qwen3-0.6B -p 8001, private route dx, dx: kernel set serves up to 4096 cached tokens (128 attention blocks) |
ready in 606 ms |
| 12:56:27 | a chat that crossed ~512 positions | SSE frame npu runtime: invalid call (code 614): state 8, run 0 of 28; dmesg aie2_tdr_recover_all: Array stopped dispatching, power-cycling NPU |
| 13:10 | a short request on the SAME serve pid (alive 44 min) | HTTP 500, same 614, and a second TDR (aie2_tdr_work_func: Device isn't making progress → power-cycle) |
| 13:10 | Lemonade unload + load (serve pid 39326 exits, new serve process) | 200 OK, coherent text, no module reload |
So the device recovers (0007 power-cycles it), the client does not. Reproduce-on-demand from the orchestration:
max_tokens 400 → 429 positions OK, 480 → 509 OK, 600 → crosses 512 → 614 + 1 TDR, fresh backend each time
(temperature 0, /no_think).
Where it comes from, in public code
npu/lane.cpp waits on a runlist; runlist::wait() (npu/npu_rt_api.h) throws when a run did not complete, and the
runtime's message is the one above. app/unified.cpp catches it, writes the error frame (stream) or a 500 (non-stream),
and carries on serving on a context the driver has already power-cycled under it. The engine cannot rebuild that
context: the hwctx and BOs belong to the private runtime's session (npu/private_route.h), and there is no public call
to re-create one.
Proposal (smallest fix with measured evidence behind it)
1bit unified answers the failing request exactly as today, then exits non-zero, which is the contract serve
already implements for a backend that lost its device (app/serve_watchdog.h, device_lost_line → kill, exit non-zero,
Lemonade's BackendWatchdog reloads). On this device a reloaded backend is the measured-good state (the 13:10 row above).
Teardown stays cooperative: stop accepting, let the workers join, let the Engine destruct, return 1 — no thread killed,
no _exit().
Known limit, and it is another issue's: a load started ~2 s after an evict can die twice on the appliance (#1010), so the
user's Retry may need one more attempt. That is the reload path, not this defect.
Scope
- Engine side only. The driver half (a TDR's
hwctx_restartfailing with-22andrestore data not reclaimed) is amdxdna: one TDR leaves the NPU array unrecoverable on the appliance (hwctx_restart -22, 'restore data not reclaimed'), so a single wedged request needs a reboot #1005. - The wedge trigger itself (firmware stall at ~512 positions on the board, Context ID 15 / DPU PC 0xffffffff) is still
unexplained and is not claimed here. forward-serve's lane path throws from the samerunlist::wait(); this issue is the1bit unifiedserve the
appliance runs.
Activity
bong-water-water-bong commentedon Nov 4, 2026
Local rows for this issue, so the record is not only the board's: with the c22 board's own binary and kernels on this box's fleet boot, the ladder is clean, so the wedge does not reproduce here (details in #1017) — and the fix's healthy-path row matches.
[DONE], 0 TDR[DONE], 0 TDRamdxdna.*ERROR/Array stopped dispatchingLogs:
~/lb/c22ladder-20261104/run3.log(payload) andrun5.log(fixed), each under onenpu-holdticket.The
614 → exit 1row is not in this table, and I will not claim it: getting a614on this boot on demand needs pi-hrx-fabric's provocation (modprobe amdxdna tdr_timeout_ms=1+ one long dispatch), i.e. a module reload, which is an owner decision. Asked in~/briefs/TNPUFEAT-STATE.mdunder## OWNER. If declined, the c23 appliance'schat-npu-after-tdrrow is the measurement.npu: a failed runlist ends the serve instead of leaving it answering …