Skip to content

rig_https_live against github.com fails ~1 run in 3 on the U64E, on master as well as on branches #147

Description

@JC-000

Found while hardware-verifying #145 (PR #146). It is not caused by that change — it reproduces on an image built from master.

Rate

U64E 601A96, fw v3.15-78-g71480a9d, 48 MHz, onchip profile, tools/uci/rig_https_live.py against github.com:443, all runs 2026-08-28 within about an hour, freshly power-cycled at the start:

image failures
4a1a9fe5 — pre-#145 (i.e. master + #143) 2 / 4
ca1e1c8e / d728b9c6 — with the #145 TOD fix 4 / 11

So roughly one run in three, on both. Passing runs are unremarkable: HTTP 200, CFIN at 47-49 s.

Two signatures

A — $86 UCI_ERR_READ_FAIL, stall at RX. Screen reaches CH SH HK1 KEYS ENC1 RX and stops. net_last_error=$86, net_tcp_state=$00, http_status=$0000, uci_read_hdr=$FFFF (the no-data sentinel). $86 is set when uci_check_err sees the error bit after a SOCKET_READ push; that path forces NET_TCP_ERROR, and net_tcp_close then returns the state to CLOSED.

Note this is the documented …KEYS ENC1 RX screen from CLAUDE.md's device gotchas, with net_last_error=$86 — i.e. it presents exactly as the "real device wedge" half of that discriminator, but a power cycle is not required and the next run frequently passes. (Separately: $86 also appears on fully passing runs, since it is set by the read that ends a normal fetch — corrected in the docs on #143.)

B — $88 UCI_ERR_NO_SOCKET at connect. Fails early, ~33 s, uci_read_hdr never populated. TCP_CONNECT did not yield a socket.

What has been ruled out

Leading hypotheses (from the firmware lane, GideonZ/1541ultimate#814's author)

  1. TIME_WAIT PCB pressure. #814 bounds the UCI socket table, not lwip's pools. A TCP socket closed mid-connection lingers in TIME_WAIT holding a PCB after the table slot is already freed. A signature-A failure parks the machine mid-connection, so a transient open failure on the next run — signature B — is consistent. That would make A and B one story: A causes B.
  2. Stale-handle EBADF. #814 makes READ/WRITE/CLOSE on a handle the target does not own return an error rather than passing it to lwip. A read on a socket closed underneath us now produces an error bit, which is exactly $86. Worth noting this failure mode did not exist before #814, though signature A also reproduces on our pre-UCI adapter: CIA1 TOD is never started, so the TOD-bounded waits (uci_wait_idle / uci_wait_not_busy / resp reads) are unbounded on real hardware #145 image, which was run against the same firmware.

Suggested next steps

  • Re-run the same matrix against the pre-#814 firmware still on the device at /USB1/update_v3.15-74-g6b5ffc21.u64 to see whether the rate changes. That discriminates "our bug, newly visible" from "firmware behaviour change".
  • Capture the STATUS-channel string on the $86 path rather than collapsing it to one error code — the firmware returns ASCII (85,ERROR OPENING SOCKET, 12,SEND ERROR: 9, …) and we currently discard which one.
  • Check whether signature B only ever follows a signature-A run. If so, hypothesis 1 is confirmed and the fix is client-side teardown after a stalled connection.

Not blocking #146; that PR is green on this device and this predates it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions