Skip to content

os/v3 puppy: /bin/1bit-release-check dies at PPID=\$! (readonly), so the board gets no RESULT line and the next NPU client is refused code 102 #1176

Closed

Description

@bong-water-water-bong

/bin/1bit-release-check never printed a RESULT: line on the c27 board (5 Nov 2026, rc-2026-11-05-c27, e3026513), so the appliance's own u4-release-check row reded as no RESULT line; rc=1 with nothing to act on.

Root cause

os/mini/release-check.sh line 1244 (chat-npu-queue-plain, added by #1033):

PPID=$!

PPID is a readonly bash builtin. Under bash that assignment is a fatal error:

$ bash -c 'echo before; PPID=1; echo after'; echo rc=$?
before
bash: line 1: PPID: readonly variable
rc=1

Under busybox ash it is silently allowed, which is why a shell that never ships the check could not catch it.

Measured on the board's own logs (/data/logs/20261105T215124-6fe5d357/): the check printed rows through
chat-npu-queue : PASS and then stopped at chat-npu-queue-plain - no RESULT line, exit 1.

What it cost

The row before the crash had a 1000-token streamed chat in flight. The script died without ending it, and the
driver kept that hwctx:

  • 21:55:37Z a later run's backend started and every request was refused npu runtime: device error (code 102): No such device, while amdxdna logged aie2_hwctx_init: Alloc hw resource failed, ret -19 (33 lines);
  • 21:55:52Z (kernel 319.2 s) aie2_legacy_tdr_detect: TDR timeout detected - Context ID: 15 - and the watchdog
    power-cycled the NPU (TDR: 1 context(s) skipped, being torn down).

So one missing RESULT line became five red NPU rows in the next run plus a device TDR on the same boot.

Fix

  1. PPID=$! -> QPLPID=$! (and wait "$QPLPID").
  2. An EXIT trap: a death before the footer prints
    RESULT: FAIL (this check died before its footer: N row(s) ran, M failed) and unloads the NPU model, so a
    check that dies cannot leave the device held with a turn in flight. A normal run is untouched (the footer sets
    RC_FOOTER=1 first).

Proven both ways with no board and no NPU: rowproof on the c27 image's own bytes (extracted from its
puppy_*.sfs, sha256 729e5a1dd054) reproduces the death and the missing RESULT line; the fixed script prints the
row's verdict, and a deliberately fatal run still gets its RESULT line and its unload call.

Activity

  1. added a commit that references this issue on Nov 5, 2026
    9e52661
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions