Skip to content

NodeDB warmstore (#10705) causes hard reboot on RP2350/W5500 at full-DB nodes.proto save #10746

Description

@cvaldess

Category

Bug report

Hardware

RP2350 (Raspberry Pi Pico 2) + WIZnet W5500 Ethernet + Ebyte E22 (SX1262).
DIY variant wiznet_5500_evb_pico2_e22p. USB-powered, no battery connected.

Firmware version

develop after #10705 ("Pr1 nodedb warmstore", 79a7dcc46, merged 2026-06-18).

Description

On RP2350/W5500, the device hard-reboots (no panic, no "Rebooting" log — abrupt output cutoff) exactly at Save /prefs/nodes.proto, once the node DB fills up and an eviction fires. On a busy mesh the DB reaches capacity in ~3 minutes, so the board enters a reboot loop and never stays online.

Bisected to #10705: a build from the immediately-preceding commit (pre-warmstore) runs the identical save path with a full DB and survives indefinitely (15+ min, many full-DB saves). The only functional difference is the warmstore feature.

Steps to reproduce

  1. Flash develop (incl. Pr1 nodedb warmstore #10705) onto an RP2350 + W5500 board.
  2. Place it on a populated mesh so the node DB fills to capacity.
  3. Watch the serial log: it reboots at the first Save /prefs/nodes.proto after Node database full ... Erasing oldest entry.

Expected

Saving a full NodeDB completes without resetting the device.

Actual (failing build, #10705 — reboots at uptime ~193 s)

INFO  | [Router] Node database full with 120 nodes and 332168 bytes free. Erasing oldest entry
INFO  | [Router] Adding node to database with 120 nodes and 332216 bytes free!
DEBUG | [Router] Save to disk 16
DEBUG | [Router] Opening /prefs/nodes.proto, fullAtomic=0
INFO  | [Router] Save /prefs/nodes.proto
<<< abrupt cutoff / reboot — no further output >>>

Control (pre-warmstore build — survives, 15+ min uptime)

INFO  | 01:15:17 918 [Router] Node database full with 100 nodes ... Erasing oldest entry
INFO  | 01:15:17 918 [Router] Adding node to database with 100 nodes ...
DEBUG | 01:15:17 918 [Router] Module 'routing' wantsPacket=1
... txGood=16, txRelay=13, rxGood=43, rxBad=0    (continues normally)

(Note the capacity tell: warmstore raises MAX_NUM_NODES 100->120; the failing build reports "120 nodes", the healthy one "100 nodes".)

Analysis

Save /prefs/nodes.proto is logged before pb_encode + the flash write (NodeDB::saveProto), so the reset happens during the write itself. With a full DB the warmstore eviction path now demotes the evicted node into the warm tier and writes a second persisted file (/prefs/warm.dat via warmStore.saveIfDirty()) on top of the (now larger, 105->112 B/node) nodes.proto. The most likely cause is the hardware watchdog firing during the longer blocking flash write, since the board is on stable USB power with no battery — brownout is ruled out. A crash inside the demote->double-write path is also possible.

Notes

Reproduced only on RP2350/W5500 so far; not confirmed on other targets. Happy to capture the reset reason / a fault dump if useful, or test a patch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-logsDevice logs requested for triage

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions