- Component
sys/dev/watchdog/watchdog.c- Found on
- Reading the source while debugging Pi 5 hangs
- Status
- Drafted
- Written
The watchdog code was read closely while chasing unexplained hangs on the Pi 5. The variable that stores the software timeout action, wd_softtimeout_act, appears exactly twice in watchdog.c: where it is defined and where the ioctl sets it. The callback that runs when the software timeout expires never reads it; it uses the action meant for the hardware timeout. So watchdogd --softtimeout --softtimeout-action printf does not do what it says.
The code is the same in releng/15.0, releng/15.1 and main, and has not changed since the 2013 commit that added both actions. Found by reading only; the reproducer has not been run yet. The report, with steps to reproduce, is drafted in freebsd-rpi-wifi under docs/.