Repository navigation
Description
What happens
On the 1bit OS appliance, a model load that starts within ~2 s of an evict can die twice in a row in its first
100 ms, so POST /api/v1/load answers 500 and a client that asked for the model gets an error it can do nothing
about. The next client-triggered load works, so this is a startup race, not a broken model.
Measured on the c22 board boot (4 Nov, /data/logs/20261104T162322-ad2dddb7/lemond.log), on the acceptance check's own
evict + reload path (chat-npu-stream), i.e. the shape every appliance user hits when a model is swapped:
12:24:25.203 [Info] (Server) Unload request received # evict the NPU model
12:24:25.204 [Info] (ServerProcess) Stopping /opt/1bit-package/1bit/1bit (PID 30996)
12:24:25.404 [Info] (ProcessManager) Process terminated, waiting for GPU driver cleanup...
12:24:27.405 [Info] (Router) Evict all completed. # a fixed 2 s wait, not a readiness signal
12:24:27.408 [Info] (Server) Ensuring model loaded: Qwen3-0.6B-NPU-1bit ctx_size=4096, onebit_backend=hrx
12:24:27.410 [Info] (ServerProcess) Started ... (PID 36205)
12:24:27.413 [Info] (Process) 1bit serve: an NPU model directory runs on --device npu
12:24:27.510 [Error] (ServerProcess) /opt/1bit-package/1bit/1bit (PID 36205) had exited with code 1 # 100 ms later
12:24:27.512 [Warn] (Router) Load failed with non-file-not-found error, evicting all models and retrying...
12:24:27.514 [Info] (ServerProcess) Started ... (PID 36229)
12:24:27.615 [Error] (ServerProcess) /opt/1bit-package/1bit/1bit (PID 36229) had exited with code 1 # 75 ms later
12:24:27.617 [Error] (Server) Error 500: POST /api/v1/load
12:24:28.347 [Info] (Server) POST /api/v1/chat/completions - 200 OK # the next request loads it fine
Why the cause is not visible yet
Both children died before the point where they print anything about the NPU kernel set, so the failure is at device /
context creation — and the reason line is exactly what engine #999 adds (the NPU child's stderr is copied into lemond's
log). This payload was cut before #999 merged, so the appliance has no reason string: WrappedServer can only say
"Missing required drivers or dependencies / Incompatible model file". Any c23 cut carries the evidence.
Why it matters for a release
- It is the reload path, which is on the appliance's daily-use surface (menu item 4 model list/pull, the web app's
model switch) and on the acceptance check (the check's own row hit it on the c22 board). - The 500 names nothing a user can act on.
What would settle it
- A cut carrying npu: keep the reason for a mid-stream failure, and gate the streaming NPU chat that failed on the c21 board #999, then the same evict+load in a loop (e.g. 20×) on the board with the NPU free, and read the
child's stderr from/data/logs/<boot>/lemond.log. - Suspect: the 2 s
waiting for GPU driver cleanupis a fixed sleep, not a readiness check — the context destroy of the
previous process may still be in flight when the next process opens the device (same class as thehwctx_restart
/Resume failed -19teardown window in 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). - If it is that window, the fix belongs where the appliance waits: wait on the device being free (or retry the child with
backoff) rather than a constant sleep — the retry is already there, it just gives up after one.
Activity
npu: an NPU load that follows an evict retries for 2.5 s instead of e…