Skip to content

v3.5.0 — Hardware watchdog + SRP server auto-recovery

Choose a tag to compare

@jnilo1 jnilo1 released this 18 May 17:23
· 16 commits to main since this release

Highlights

Two robustness improvements aimed at the same failure mode — the gateway losing critical state across a reboot or power cut.

  • Hardware watchdog driver (rtl819x_wdt v1.0) — auto-recover from a kernel hang in ~23 s instead of needing a manual power cycle. Soft-lockup blind spot plugged via panic notifier (closes a class of otbr-agent busy-syscall hangs that previously rode out the watchdog forever, see issue #99).
  • SRP server auto-recovery in S70otbr — Matter-over-Thread sensors no longer disappear from Home Assistant for up to ~1 hour after every reboot. A one-shot disable && sleep 30 && enable cycle on the SRP server bumps the UDP port and forces every attached child to re-register. End-to-end registry repopulation in 15-17 s.

Kernel

Hardware watchdog driver rtl819x_wdt v1.0

  • /dev/watchdog registered with the kernel framework; restart handler at priority 192 supersedes arch_reset.
  • Slowclk CDBR rework — dedicated 25 kHz slowclk DT fixed-clock; OVSEL=1001 now overflows at ~671 s (was ~671 ms). DT timeout-sec=60 exposed to userspace; BusyBox feeder pings every 30 s.
  • Soft-lockup recovery via panic notifier (WDT-008): driver registers on panic_notifier_list at INT_MAX priority and writes WDTCNR=0 from the notifier — end-to-end hang recovery drops from "never" to ~23 s.
  • Operator diagnostics via /sys/class/watchdog/watchdog0/ (15 attributes).
  • User-facing documentation at 3-Main-SoC-Realtek-RTL8196E/32-Kernel/files-6.18/drivers/watchdog/README.md.

Hardening enablers for autonomous recovery

  • LOCKUP_DETECTOR + SOFTLOCKUP_DETECTOR + BOOTPARAM_SOFTLOCKUP_PANIC — soft lockup at 22 s → panic() → watchdog notifier path.
  • SOFTLOCKUP_DETECTOR_INTR_STORM + IRQ_TIME_ACCOUNTING — auto-prints the storming IRQ (top offender by CPU time) directly in the panic banner.
  • PANIC_ON_OOPS=y + PANIC_TIMEOUT=10 — any oops becomes a panic (was: oops logged, box limped on forever).
  • DETECT_HUNG_TASK=y + DEFAULT_HUNG_TASK_TIMEOUT=60 + DETECT_HUNG_TASK_BLOCKER=y — blocked-task detection with the blocker reported alongside (warn-only).
  • KALLSYMS=y + KALLSYMS_ALL=y — readable symbol names in softlockup / panic / oops traces.
  • PRINTK_TIME=y — every dmesg line gets a relative timestamp.

Serial-console diagnostics surface

  • MAGIC_SYSRQ=y + MAGIC_SYSRQ_SERIAL=y — BREAK→SysRq dispatch (sysrq-b, sysrq-c, sysrq-t).

SysRq dispatch fix on 8250 serial driver

  • Restores BREAK→SysRq dispatch broken by upstream 8324a54f604d in Linux 6.18 vanilla. Three patches under patches-6.18/ mirroring the upstream RFC v2 to linux-serial (with Ilpo Järvinen's Reviewed-by on 2/3 + 3/3).

Userdata

SRP server auto-recovery in S70otbr

  • One-shot recovery cycle in the background loop: once Thread state has been up for 120 s, if ot-ctl child table shows ≥ 1 attached child, runs disable && sleep 30 && enable on the SRP server.
  • Bumps the SRP UDP port via OPENTHREAD_CONFIG_SRP_SERVER_PORT_SWITCH_ENABLE; BR republishes new port in Thread Network Data; attached children re-register within seconds at next data-poll.
  • Cost: 30 s of SRP downtime once at boot. Empty child table (e.g. freshly flashed gateway) skips the cycle.

Upgrade & flash

Use flash_install_rtl8196e.sh to upgrade from a previous v3.x release — it preserves /userdata/etc/ (including radio.conf, Thread network credentials, dropbear keys, authorized_keys). See 3-Main-SoC-Realtek-RTL8196E/35-Migration/README.md for v2.x upgrade paths.

Full CHANGELOG: 3-Main-SoC-Realtek-RTL8196E/CHANGELOG.md