velxio/backend
David Montero Crespo 52afdd6f23 fix(espidf): patch esp-hosted-mcu's sync-RPC race into every P4 build
Upstream esp-hosted-mcu 2.12.12 mints RPC uids and claims sync-response
table slots with no locking. Two tasks issuing sync RPCs in the same
instant cross-wire: the losing waiter re-reads a slot the winner already
cleared and asserts inside hosted_destroy_semaphore(NULL), panicking the
core the Arduino event task runs on -- so a P4 sketch associates, gets a
DHCP lease, and never sees WL_CONNECTED. Real boards dodge it by timing
jitter; the deterministic in-browser engine hits it on every run, which
is how it was found (watchpoint on the destroy's address, return address
resolved against the ELF).

Managed components are hash-checked and self-restoring, so the fix rides
the component manager's own escape hatch: after the configure that
fetches dependencies, esp32p4 arduino builds get a patched copy of
esp_hosted in components/, which overrides the managed one, and configure
runs once more to adopt it. The patch is five anchored replacements (a
portMUX around uid minting, slot claim, the waiter's read-wait-clear, and
the poster's give); if a future component bump moves the anchors, the
build proceeds UNPATCHED with a loud warning instead of guessing.

The reference diff and the full story live in velxio-prod:
project/espressif-devkits-2026-08/patches/ and STATUS.md (2026-08-26).
2026-08-26 06:52:54 +02:00
..
app fix(espidf): patch esp-hosted-mcu's sync-RPC race into every P4 build 2026-08-26 06:52:54 +02:00
board-indexes fix(docker): vendor drazzy.com board index + seed missing indexes at boot 2026-07-17 06:41:44 +02:00
scripts perf(compile): memoize ldgen - 41% of every ESP-IDF build was re-parsing linker fragments 2026-08-20 05:29:56 +02:00
sdk feat(chips): programmable retro CPU chips with external ROM 2026-05-18 23:38:18 -03:00
tests feat(espidf): honor CDCOnBoot menu option in 4-part FQBNs 2026-08-19 16:39:59 +02:00
.env.example
…
Dockerfile fix(docker): vendor drazzy.com board index + seed missing indexes at boot 2026-07-17 06:41:44 +02:00
debug_qemu.py
…
mcp_server.py
…
mcp_sse_server.py
…
requirements.txt fix(ci): cap mcp below 2.0 — the backend suite has not run since 2026-07-29 2026-08-10 17:14:39 +02:00