#39002·openpilot

chestnut: losing the USB device while driving kills modeld, no small model fallback

Author: sshaneCreated Sep 22, 2026Updated Sep 24, 2026
Labelsbug

Route: aebd8f1d4ea16066/000002da--4fbcd5ec3e at 418 s, engaged.

A bulk IN on 0x81 returned an I/O error. Chestnut was healthy right before (15.2 V, PCIe up, 44 °C) and stayed enumerated at 5 Gbps; hardwared's control reads kept working. Port link error counter runs at ~80/s the whole time the car is on (0/s over 17 min on the desk), so this is the link in this install.

The fallback then failed:

  • tinygrad's host device still had the dead AMD device in its pending map, so the small model's first input copy raised "NPY hang detected".
  • put_bool("ChestnutActive", False) is an async write, so the next iteration's get_bool still read True and the small-model failure was handled as another big-model fallback.
  • Third exception crashed modeld, and manager doesn't restart crashed processes. "Process Not Running" for the rest of the drive despite the alert saying the small model is available.

(claude proposed, can ignore) Fix: drop the dead device from tinygrad's pending maps on fallback, gate the re-raise on a local flag. A link-error-rate alert would have flagged this before the crash.