Skip to content

RP2350W hangs in wifiConnect on the 7th peer cycle, tripping the watchdog #4173

Closed

Description

@zackees

Summary

bash autoresearch rp2350w --net-peer completes six full peer cycles and then the RP2350W hangs inside wifiConnect on the seventh, long enough to trip the watchdog. Reproducible: two consecutive runs failed at cycle 7/10.

The good news first, because it is the larger part of the result: the peer network works. Each cycle runs wifiConnect → join the C6 SoftAP → startNetServer → HTTP RP2350W→ESP32-C6 → HTTP ESP32-C6→RP2350W → stopNet → serial ping, and cycles 1-6 complete all of it. Bidirectional HTTP between the two MCUs is proven on hardware.

Evidence

--- Peer network cycle 1/10 ---   RP2350W serial RPC ping: PASS
...
--- Peer network cycle 6/10 ---   RP2350W serial RPC ping: PASS
--- Peer network cycle 7/10 ---
  Network peer autoresearch failed: No response with ID 112 within 4.79s
Run Failure
1 No response with ID 115 within 2.54s
2 No response with ID 112 within 4.79s

Same cycle both times, different request IDs and timeouts — a deterministic failure point rather than flakiness.

It is a watchdog reset, not a dropped reply. Querying the board immediately after:

ping       -> {"message":"pong","success":true,"uptimeMs":43785,
                "lastResetCause":"WATCHDOG","lastResetWasWatchdog":true}
wifiStatus -> {"ip":"","apIp":"","status":"IDLE","success":true,"connected":false}

lastResetWasWatchdog: true with a ~44 s uptime means the device rebooted mid-cycle. The RPC did not time out because a reply was lost; it timed out because the device was resetting. That distinction matters — this is not the "request/reply loops drop replies" class documented in ci/autoresearch/rpc_bench.py, and it is not a --net-peer harness fault.

The failing call is the first RPC of the cycle: the loop prints cycle 7/10 and dies before wifiConnect returns (ci/autoresearch/net.py:536).

Interpretation

Something in the CYW43 connect path degrades across repeated connect/stopNet cycles and blocks on the seventh long enough to exceed the loop watchdog. Six is suspiciously consistent, which points at an exhaustible resource (socket/netif/DHCP state not fully released by stopNet, or an lwIP/CYW43 handle leak) rather than a timing race.

Worth noting the board recovers on its own — the watchdog reboots it and wifiStatus returns to IDLE. So this degrades a long soak rather than bricking the fixture.

Reproduce

bash autoresearch rp2350w --net-peer \
  --upload-port /dev/ttyACM1 --peer-upload-port /dev/ttyACM0 --timeout 240

Fixture

Confirmed Raspberry Pi Pico 2 W — 2E8A:F00F, status.platform "Raspberry Pi Pico 2 W (RP2350)", wifiStatus reporting real state rather than UNSUPPORTED. ESP32-C6 peer at 303A:1001, ser 8C:BF:EA:CF:87:B4. Linux (NixOS 6.18.48), fbuild 2.5.23.

Related: #3832 (gap 10 — network-carried JSON-RPC on RP2350W), #4097 (stabilize RP2350W peer cycles).

Generated with Claude Code

https://claude.ai/code/session_01KkufoNxfnNRU9psT3R9F51

Activity

  1. zackees commented on Sep 7, 2026

    @zackees
    MemberAuthor

    The connect/stop lifecycle is not the cause — narrowing this down

    My original write-up guessed that "something in the CYW43 connect path degrades across repeated connect/stopNet cycles". That is wrong, and it is worth recording so nobody spends time there.

    Drove wifiConnect + stopNet directly over serial RPC, 12 consecutive cycles, no AP present:

    baseline ping -> uptimeMs 5377948, lastResetCause SOFTWARE, lastResetWasWatchdog false
    cycle  1: connect 1.17s  stop 0.15s  ok=True
    cycle  2: connect 0.33s  stop 0.34s  ok=True
    cycle  3: connect 0.37s  stop 0.34s  ok=True
    ...
    cycle 12: connect 0.36s  stop 0.34s  ok=True
    

    Twelve cycles, stable to the hundredth of a second, well past the 7 where --net-peer dies. No drift, no watchdog reset, and the board had ~90 minutes of uptime beforehand with lastResetCause: SOFTWARE.

    So WiFi.mode(WIFI_STA) → beginNoBlock → WiFi.end() repeated is fine on its own. Whatever exhausts itself is in one of the steps the bare loop skips.

    What that leaves

    The full peer cycle (ci/autoresearch/net.py:534) does more than connect/stop:

    1. wifiConnect
    2. poll wifiStatus until it actually associates with the C6 SoftAP and gets a DHCP lease
    3. startNetServer — opens a listening HTTP socket
    4. runNetClientTest RP→C6 — outbound HTTP
    5. runNetClientTest C6→RP — inbound HTTP against the server from 3
    6. stopNet

    The bare loop exercises only 1 and 6. So the candidates are the association/DHCP path or, more likely, socket/lwIP resources from the HTTP server and client not being fully released by stopNet — a listener or PCB leaking once per cycle until the pool runs dry on the seventh.

    That also fits the failure shape better than a driver-state theory: it is the first call of cycle 7 that hangs long enough to trip the watchdog, consistent with an allocation blocking rather than a link failing.

    Suggested next probe

    Same style of targeted loop, but adding startNetServer (and ideally one runNetClientTest) to each iteration, with the C6 SoftAP up. If it dies at 7 with the server included but not without, the leak is in the server/socket teardown rather than in CYW43.

    Environment unchanged: RP2350W 2E8A:F00F on /dev/ttyACM1, fbuild 2.5.23, NixOS.

    Generated with Claude Code

    https://claude.ai/code/session_01KkufoNxfnNRU9psT3R9F51

  2. zackees commented on Sep 7, 2026

    @zackees
    MemberAuthor

    Isolated to the HTTP transfer — and it is pathologically slow

    Continued the incremental probes, adding one step of the peer cycle at a time. Two more branches eliminated, and the remaining one looks bad.

    Association + DHCP + server socket are clean. Ten cycles with the C6 SoftAP actually up and the RP genuinely associated:

    cycle  1: join 6.2s ip=192.168.4.2 srv 0.34s(ok=True port=80) stop 0.33s
    cycle  2: join 6.3s ip=192.168.4.2 srv 0.33s(ok=True port=80) stop 0.33s
    ...
    cycle 10: join 6.3s ip=192.168.4.2 srv 0.33s(ok=True port=80) stop 0.34s
    

    Flat through cycle 7 and past it. So the socket-teardown theory I suggested last time is also wrong — startNetServer/stopNet do not leak.

    That leaves runNetClientTest, and it takes 26.57 s.

    cycle 1: ip=192.168.4.2 http 26.57s ok=True total 30.3s
    

    For one HTTP request to 192.168.4.1:80 over a local SoftAP link. Every other operation in the cycle is sub-second:

    Step Time
    wifiConnect 0.36 s
    associate + DHCP ~6.3 s
    startNetServer 0.33 s
    runNetClientTest 26.57 s
    stopNet 0.33 s

    It succeeds (ok=True), so this is not a retry-until-failure path — the transfer genuinely takes that long.

    Why that matters for the cycle-7 hang

    net.py calls runNetClientTest with max_wait=30.0, and the peer cycle makes two of them (RP→C6 and C6→RP). At 26.57 s each, the run is already within ~3.4 s of its own timeout on a healthy first cycle. Any per-cycle degradation, or the second direction being slower than the first, crosses it.

    That reframes the bug: rather than a resource leaking to exhaustion at exactly seven, this looks like an operation that is marginal from cycle 1 and eventually loses a race it was always close to. It also fits the watchdog reset — a blocking call of that length is the same hazard #3956 records for pollOtaArtifactUpdate ("a full firmware download can exceed the configured 5000 ms timeout and reset the board mid-upgrade").

    Suggested direction

    The question is no longer "what leaks" but "why does a single local HTTP GET take 26.5 s". Candidates: a DNS or connect timeout being burned before falling through, Nagle/delayed-ACK interaction on the CYW43 link, or a fixed receive timeout the client waits out rather than closing on content-length.

    Whoever picks this up should time the phases inside runNetClientTest on device — connect, send, first byte, complete — since a 26 s wall almost always turns out to be one fixed timeout rather than slow throughput.

    Both probes ran with the boards healthy throughout: no watchdog resets, RP associating at 192.168.4.2 every cycle, C6 SoftAP steady at 192.168.4.1:80.

    Generated with Claude Code

    https://claude.ai/code/session_01KkufoNxfnNRU9psT3R9F51

  3. zackees commented on Sep 7, 2026

    @zackees
    MemberAuthor

    Correction: that 26.57 s is 12 requests, not one

    I described the previous measurement as "one HTTP request to 192.168.4.1:80". That is wrong, and it overstates the anomaly. runNetClientTest (examples/AutoResearch/AutoResearchNet.cpp:1041) issues 12 HTTP requests per call:

    • 7 GETs — /ping, /status, /leds, /rpc/discover, /rpc/ping, /rpc/status, /rpc/unknown
    • 4 POSTs to /rpc
    • 1 payload echo test

    So 26.57 s is roughly 2.2 s per request, not a 26 s single-request wall. That is slow for a local SoftAP link but a lot more ordinary than what I implied, and it does not point at one fixed timeout the way I suggested. Please disregard the "time the phases inside the request" recommendation as stated — it was premised on a single request.

    It also explains why no watchdog fires during the call: the loop feeds it between requests (FastLED.watchdog().feed() after each), so a long total duration is expected and handled by design.

    What still stands

    The budget pressure is real, and it is the part worth keeping:

    • net.py calls runNetClientTest with max_wait=30.0
    • the peer cycle makes two such calls per cycle (RP→C6, then C6→RP)
    • one measured call already takes 26.57 s on a healthy first cycle

    That is ~3.4 s of headroom against its own timeout, from cycle 1, before any degradation. So the earlier conclusion holds even though my per-request figure was wrong: this looks like an operation that is marginal from the start rather than a resource that exhausts itself at exactly seven.

    Revised suggestion

    Rather than hunting a single fixed timeout, the useful questions are:

    1. Why ~2.2 s per request on a link where association takes 6 s and everything else is sub-second — is a connection being torn down and re-established per request?
    2. Is max_wait=30.0 simply too tight for a 12-request suite over CYW43, in which case the fix may be the budget rather than the transport?

    Timing per-request inside the loop would answer the first cheaply, since the call already iterates and could log each one.

    Boards remain healthy; no watchdog resets across any of these probes.

    Generated with Claude Code

    https://claude.ai/code/session_01KkufoNxfnNRU9psT3R9F51

  4. zackees commented on Sep 7, 2026

    @zackees
    MemberAuthor

    Root cause found: the drain loop waits out a fixed deadline

    runRpHttpRequestTest (examples/AutoResearch/AutoResearchNet.cpp:855) reads each response like this:

    const uint32_t deadline_ms = millis() + 2000;
    ...
    while (static_cast<int32_t>(millis() - deadline_ms) < 0 &&
           (client.connected() || client.available())) {
        while (client.available() && response_length + 1 < sizeof(response)) { ... }
        FastLED.watchdog().feed();
        delay(1);
    }

    It exits on the 2 s deadline or on the peer closing. With HTTP keep-alive the server does not close, so client.connected() stays true and the loop burns the remaining deadline after the body has already arrived.

    The arithmetic matches exactly: 12 requests per runNetClientTest at ~2.2 s each = ~26.4 s, against the 26.57 s measured. That is the whole 26.5 s, and it is idle waiting rather than transfer time.

    Which completes the chain for this issue: 26.5 s per call → two calls per cycle → a 30 s max_wait with ~3.4 s of headroom on a healthy first cycle → eventually loses a race it was always close to.

    This also corrects my previous suggestion. I wrote that "the fix may be the budget rather than the transport". That was wrong — raising max_wait would have masked a transport that idles away ~90% of its time.

    An attempted fix that I am not proposing

    I tried stopping on peer idle (150 ms after the last byte) plus a full-buffer break, keeping the 2 s deadline as the hard ceiling. Measured on hardware, 8 cycles:

    HTTP time Result
    before 26.57 s ok=True
    after 7.3 – 11.4 s ok=False on 7 of 8

    Roughly 2.8x faster and incorrect: only cycle 3 passed all 12 sub-tests. Breaking on idle truncates responses before the expected fragment arrives, so the content assertions fail intermittently. I reverted it rather than trade correctness for speed, and the tree is unchanged.

    What a real fix needs

    Stop on completeness, not on silence:

    • parse Content-Length from the response headers and read exactly that many body bytes; or
    • handle the chunked terminator where the server uses chunked encoding; and
    • keep the 2 s deadline purely as a ceiling for a server that never replies.

    The 256-byte response buffer complicates it — with a body longer than the buffer, the loop must keep draining to reach completion while only recording the first 256 bytes, otherwise the socket is left mid-response.

    That is worth doing: it should cut runNetClientTest from ~26.5 s to a few seconds and remove the budget pressure at its source rather than papering over it. But it wants a proper test rather than an unattended guess, which is why I am reporting it instead of pushing a patch.

    Both boards remained healthy throughout; the RP2350W is back on the unmodified build.

    Generated with Claude Code

    https://claude.ai/code/session_01KkufoNxfnNRU9psT3R9F51

  5. zackees commented on Sep 7, 2026

    @zackees
    MemberAuthor

    Baseline measured: 9/9, and it rules out both of my fix attempts

    Ran the same 9-cycle probe against the unmodified build:

    cycle 1: http 26.76s ok=True      cycle 6: http 26.84s ok=True
    cycle 2: http 26.82s ok=True      cycle 7: http 26.78s ok=True
    cycle 3: http 26.77s ok=True      cycle 8: http 26.69s ok=True
    cycle 4: http 26.68s ok=True      cycle 9: http 26.92s ok=True
    cycle 5: http 26.76s ok=True
    

    9/9 passing, spread under 0.25 s. Slow, but completely reliable and near-deterministic — which follows from the mechanism: waiting out a fixed 2 s per request is insensitive to when data actually arrives.

    Against that, both attempts to speed it up were regressions:

    Approach Cycles passing HTTP time
    baseline 9/9 26.68 – 26.92 s
    stop on 150 ms peer idle 1/8 7.3 – 11.4 s
    stop on Content-Length 6/9 8.1 – 20.4 s

    Both reverted; PR #4182 closed. The 12.3 s spread on the second one is the diagnostic: if Content-Length were present and parsed on every response, timings would cluster. They do not, so some responses on this path likely use chunked encoding or a header form my parse missed, and those still fall through to the 2 s deadline. A correct fix must handle the chunked terminator too.

    What this settles for the cycle-7 hang

    At 26.8 s the content assertions pass every single time, across nine consecutive cycles including cycle 7. So the --net-peer failure is not these HTTP checks failing, and not the RP2350W degrading over cycles — the board is fine at cycle 9 of a direct probe.

    That leaves the timing budget itself. net.py allows max_wait=30.0 per call and makes two calls per cycle:

    • measured RP -> C6: ~26.8 s, leaving ~3.2 s of headroom
    • the C6 -> RP direction is not covered by my probe and is the remaining unknown

    So the most likely story is that the second direction, or the pair together, crosses a limit that the first direction alone never does. Someone with the fixture should time the C6 -> RP call specifically; that is the one measurement still missing.

    Where the real fix lies

    Not in the budget — 26.8 s of a 30 s allowance spent almost entirely idle is the defect, and raising max_wait would hide it. But it needs completion detection that handles both Content-Length and chunked responses, verified to hold 9/9. That is a bigger piece of work than it looked, and the two shortcuts both failed.

    The header/body separation from #4182 is independently correct — response[256] currently holds headers and body, so long headers can push the asserted fragment out of the window — and could be landed on its own.

    Boards remained healthy throughout; RP2350W is back on the unmodified build, tree clean.

    Generated with Claude Code

    https://claude.ai/code/session_01KkufoNxfnNRU9psT3R9F51

  6. zackees commented on Sep 7, 2026

    @zackees
    MemberAuthor

    The missing measurement: the two directions differ by ~10x

    Timed both directions of the peer cycle against the same link, 5 cycles, unmodified build:

    cycle 1: fwd 27.07s ok=True | rev 2.61s ok=True passed=12 | pair 29.68s
    cycle 2: fwd 27.02s ok=True | rev 2.79s ok=True passed=12 | pair 29.80s
    cycle 3: fwd 27.12s ok=True | rev 2.80s ok=True passed=12 | pair 29.92s
    cycle 4: fwd 26.73s ok=True | rev 4.54s ok=True passed=12 | pair 31.27s
    cycle 5: fwd 26.57s ok=True | rev 0.23s ok=False passed=None | pair 26.80s
    
    • fwd = RP2350W as HTTP client, fetching from the C6 — 26.6 – 27.1 s
    • rev = ESP32-C6 as HTTP client, fetching from the RP2350W — 0.23 – 4.54 s

    Same 12-request suite, same SoftAP link, both returning 12/12. The C6 client does in ~2.7 s what the RP client takes ~27 s to do.

    That is the cleanest possible confirmation that the RP-side client drain loop is the defect — not the network, not the CYW43 link, and not the RP2350W in general. When the RP is the server, the same 12 requests complete in under 3 s.

    It also disposes of a theory worth naming: the reverse direction is not the hidden cost I suggested last time. It is nearly free.

    Total per cycle sits right on the limit

    The pair totals are the other half of the story:

    cycle pair total
    1 29.68 s
    2 29.80 s
    3 29.92 s
    4 31.27 s

    net.py allows max_wait=30.0 per call, and each individual call does fit — 27 s and 2.8 s both clear it. But the cycle's HTTP work is consuming ~30 s of wall clock on its own, with essentially all of it spent idling inside the RP client. Cycle 4 crossed 31 s purely from the reverse call drifting to 4.5 s.

    So the margin is not comfortable anywhere, and almost all of it is recoverable: ~24 s of the 27 s forward call is the fixed 2 s-per-request wait, not transfer.

    A new failure mode at cycle 5

    cycle 5: rev 0.23s ok=False passed=None
    

    The reverse call failed fast — 0.23 s, no sub-test results at all — meaning the C6 could not reach the RP2350W's server, rather than any request failing. The forward direction in that same cycle was fine (26.57 s, ok=True).

    That is a different shape from everything else here and may be the actual cycle-7 mechanism: not a slow degradation, but the RP's listening socket becoming unavailable after several cycles while the RP itself stays healthy. Worth a focused look at startNetServer/stopNet socket reuse across cycles — noting my earlier probe of those two RPCs in isolation ran 10 clean cycles, so it likely needs the HTTP traffic to reproduce.

    Standing summary for this issue

    Generated with Claude Code

    https://claude.ai/code/session_01KkufoNxfnNRU9psT3R9F51

  7. zackees commented on Sep 7, 2026

    @zackees
    MemberAuthor

    Retracting the "listening socket" lead

    I suggested the fast reverse-direction failure seen once at cycle 5 "may be the actual cycle-7 mechanism". Accumulated data says no — it is sporadic, not a pattern, and not tied to a cycle number.

    Reverse direction (ESP32-C6 as client fetching from the RP2350W), across three runs:

    run cycles reverse failures
    1 5 1 (cycle 5)
    2 3 0
    3 2 0
    total 10 1

    One failure in ten cycles, at cycle 5 rather than 7, with the other nine at 2.6 - 4.5 s and 12/12. That is a ~10% sporadic event, not the deterministic cycle-7 mechanism I implied. Anyone picking this up should not spend time on socket-reuse in startNetServer/stopNet on the strength of my earlier comment.

    What is actually established for this issue

    • forward direction (RP as client): 26.6 - 27.1 s, 9/9 passing, spread < 0.25 s
    • reverse direction (C6 as client): 0.23 - 4.54 s, 9/10 passing
    • cause of the forward cost: the drain loop waits out a fixed 2 s deadline per request because client.connected() does not go false promptly despite Connection: close; 12 requests x ~2.2 s = the 26.5 s measured, almost all idle
    • pair total per cycle: 29.5 - 31.3 s
    • eliminated: CYW43 connect/stop lifecycle (12 clean cycles), association + DHCP + startNetServer (10 clean cycles), a single fixed per-request timeout, and reverse-direction cost
    • two attempts to shorten the forward path both regressed correctness against a 9/9 baseline and were reverted (fix(autoresearch): read RP HTTP responses to completion, not to a deadline (#4173) #4182 closed)

    The remaining question is unchanged and narrow: why does the RP-side HTTP client spend ~2 s per request idle when the C6 client does the same 12 requests in under 3 s? A correct fix needs completion detection that handles both Content-Length and chunked responses, verified to hold 9/9.

    Further probing here is currently limited by host memory pressure on this bench rather than by the boards, which have stayed healthy throughout.

    Generated with Claude Code

    https://claude.ai/code/session_01KkufoNxfnNRU9psT3R9F51

  8. zackees commented on Sep 7, 2026

    @zackees
    MemberAuthor

    Resolved by #4196 — 10/10 cycles, including cycle 7

    Ran the full bidirectional peer cycle directly over RPC (wifiConnect → associate → startNetServer → HTTP RP→C6 → HTTP C6→RP → stopNet), which exercises the same firmware path as --net-peer without the harness:

    cycle 1: fwd  9.15s ok=True | rev 2.82s ok=True passed=12 | pair 11.97s
    cycle 2: fwd 11.35s ok=True | rev 2.88s ok=True passed=12 | pair 14.23s
    cycle 3: fwd  9.12s ok=True | rev 2.61s ok=True passed=12 | pair 11.72s
    cycle 4: fwd  9.37s ok=True | rev 2.79s ok=True passed=12 | pair 12.16s
    cycle 5: fwd  8.10s ok=True | rev 2.93s ok=True passed=12 | pair 11.03s
    cycle 6: fwd  9.14s ok=True | rev 2.88s ok=True passed=12 | pair 12.02s
    cycle 7: fwd  8.36s ok=True | rev 2.81s ok=True passed=12 | pair 11.16s
    cycle 8: fwd  8.85s ok=True | rev 2.57s ok=True passed=12 | pair 11.42s
    cycle 9: fwd  8.91s ok=True | rev 2.58s ok=True passed=12 | pair 11.49s
    cycle 10: fwd 7.20s ok=True | rev 2.82s ok=True passed=12 | pair 10.02s
    
    before after
    forward call 26.6 – 27.1 s 7.2 – 11.4 s
    pair per cycle 29.5 – 31.3 s 10.0 – 14.2 s
    outcome failed at cycle 7 10/10 passing

    Cycle 7 — the one that reproducibly killed this before, twice — is unremarkable here at 11.16 s.

    Why this closes the loop on the diagnosis

    The mechanism was the timing budget, exactly as the measurements suggested. net.py allows max_wait=30.0 per call and makes two per cycle; before the fix the pair consumed 29.5–31.3 s of wall clock, with cycle 4 measured at 31.27 s — already over. Almost all of it was the RP client idling out a fixed 2 s deadline per request, 12 requests per call.

    With the drain loop reading to completion, the same work takes a third of the time and the budget is no longer close.

    Caveats, stated plainly

    • This is the peer cycle driven directly over RPC, not bash autoresearch --net-peer. The firmware path is the same; the harness path still needs fbuild-daemon leaks the serial fd, breaking the next run; 'daemon stop' cannot see it fbuild#1426 (daemon retains the serial fd after deploy) before a full end-to-end run is possible here.
    • 10 cycles is what the harness itself runs, so it matches the failing case, but it is not a long soak.
    • The sporadic reverse-direction failure I saw once earlier (1 in 10, at cycle 5) did not recur in these 10; with the earlier data that is 1 in 20 overall. Still unexplained, still not cycle-7-shaped.

    Recommend this issue stays open until a real --net-peer run passes, but the mechanism is identified and the fix is validated on the hardware path.

    Generated with Claude Code

    https://claude.ai/code/session_01KkufoNxfnNRU9psT3R9F51

  9. zackees commented on Sep 7, 2026

    @zackees
    MemberAuthor

    Confirmed through the real harness — cycle 7 passes

    The previous result was via direct RPC, which I flagged as a proxy. Ran the actual command that originally failed:

    bash autoresearch rp2350w --net-peer --upload-port /dev/ttyACM1 \
        --peer-upload-port /dev/ttyACM0 --timeout 300
    
    --- Peer network cycle 6/10 ---
      RP2350W serial RPC ping: PASS
    --- Peer network cycle 7/10 ---
      RP2350W serial RPC ping: PASS
    --- Peer network cycle 8/10 ---
      RP2350W serial RPC ping: PASS
    --- Peer network cycle 9/10 ---
    

    8 consecutive cycles passed, zero failures. Cycle 7 — which killed this run twice before with No response with ID 115 and ID 112, each time a watchdog reset — passes without comment.

    The run stopped during cycle 9 when my session's supervisor killed the process. That is a host-side interruption on my end, not a test failure: there are no failed/error/No response lines anywhere in the log, and both boards stayed enumerated and healthy.

    Status

    This is the end-to-end confirmation I said this issue should wait for. With #4196:

    before after
    forward call 26.6 – 27.1 s 7.2 – 11.4 s
    pair per cycle 29.5 – 31.3 s 10.0 – 14.2 s
    direct-RPC cycles failed at 7 10/10
    harness cycles failed at 7 8/8 before an unrelated interruption

    The mechanism was the timing budget: max_wait=30.0 per call, two calls per cycle, and the pair was already consuming 29.5–31.3 s — cycle 4 measured 31.27 s, over budget — almost all of it the RP client idling out a fixed 2 s deadline across 12 requests per call.

    I would still like to see a clean 10/10 through the harness before closing, since mine stopped at 9 for reasons unrelated to the firmware. But cycle 7 passing in the real harness is the specific evidence that was missing.

    Generated with Claude Code

    https://claude.ai/code/session_01KkufoNxfnNRU9psT3R9F51

  10. zackees commented on Sep 7, 2026

    @zackees
    MemberAuthor

    Closing on a completed 10/10 run. I said earlier in this thread I would not close on partial evidence, so here is the full run.

    bash autoresearch rp2350w --net-peer --peer-environment esp32c6 --timeout 1500, on master with #4196 merged:

    --- Peer network cycle 1/10 ---   RP2350W serial RPC ping: PASS
    --- Peer network cycle 2/10 ---   RP2350W serial RPC ping: PASS
    --- Peer network cycle 3/10 ---   RP2350W serial RPC ping: PASS
    --- Peer network cycle 4/10 ---   RP2350W serial RPC ping: PASS
    --- Peer network cycle 5/10 ---   RP2350W serial RPC ping: PASS
    --- Peer network cycle 6/10 ---   RP2350W serial RPC ping: PASS
    --- Peer network cycle 7/10 ---   RP2350W serial RPC ping: PASS   <- the cycle that hung
    --- Peer network cycle 8/10 ---   RP2350W serial RPC ping: PASS
    --- Peer network cycle 9/10 ---   RP2350W serial RPC ping: PASS
    --- Peer network cycle 10/10 ---  RP2350W serial RPC ping: PASS
                                      ESP32-C6 serial RPC ping: PASS
    
    NET PEER AUTORESEARCH PASSED (10 reconnect cycles)
    

    Exit 0. Cycle 7 — where the original hang tripped the watchdog — passes, and the run continues cleanly through 10 with both boards still answering serial RPC at the end. Neither board wedged.

    Evidence chain for the fix (#4196): the root cause was AutoResearchNet.cpp draining the HTTP response against a deadline rather than reading to completion, so a status line split across TCP segments left the connection mid-response and the next cycle inherited the desync. Replaced with a completion-based read — read_line() for the status line and headers, then exactly Content-Length body bytes. Two earlier attempts were rejected by measurement against a 9/9 baseline before this one (150ms idle-stop scored 1/8; Content-Length-only scored 6/9), and #4182 was closed as a result.

    One trap worth recording for whoever runs this next. My first attempt today failed at cycle 2 with:

    Network peer autoresearch failed: No response with ID 18 within 0.0201s
    

    That reads exactly like a device hang, and I nearly filed it as one. It is not. --timeout defaults to 30s and is documented as the monitor-phase timeout, but --net-peer uses it as a whole-run deadline across all ten cycles (deadline = time.monotonic() + timeout in ci/autoresearch/net.py). Cycle 1 plus the two RPC connects consume it, and every later RPC gets whatever milliseconds remain. A 20ms RPC timeout is indistinguishable from an unresponsive board at a glance.

    --net-peer needs a generous --timeout (I used 1500s). It would be worth either giving the peer modes their own default or renaming the flag, since the current behaviour turns an operator omission into a convincing false hardware failure. Happy to file that separately if useful.

  11. moved this from Triage to Done in FastLED Trackeron Sep 7, 2026
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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions