Skip to content

ci(avr8js): uno_avr8js_test hangs 30 min then 'daemon error: request failed' on every master push #2645

Closed

Description

@zackees

Symptom

Every push to master since the fbuild test-emu migration is failing the uno_avr8js_test workflow with the exact same pattern:

  1. ci-compile.py uno --examples Test --verbose completes the firmware build successfully (~30s).
  2. uv run fbuild test-emu --emulator avr8js ... then sits silently for 30 minutes with zero output.
  3. Step fails with:
    error: daemon error: request failed: error sending request for url (http://127.0.0.1:8765/api/test-emu)
    

Concrete failing runs (all on master, all identical mode):

Two distinct failure modes by fbuild version

  • fbuild 2.2.9 and earlier: Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'avr8js' imported from /tmp/.tmpXXX/headless.mjs — this is FastLED/fbuild#291, fixed by FastLED/fbuild#292 (merged 2026-05-30).
  • fbuild 2.2.10 / 2.2.11 (current): silent 30-minute hang in the daemon's /api/test-emu handler, terminating with daemon error: request failed: error sending request. This is a new regression after Arduino M0 / M0 Pro Support #292 landed (or a separate bug only the support sk9822 #291 fix unmasked).

The 30 min figure looks like a daemon connection-idle timeout — the request is sent, the daemon accepts it but never produces a response, and eventually the connection drops.

Why this matters

  • AVR8JS CI is permanently red on master, masking any real Arduino Uno regressions.
  • Each failing run burns ~32 min of runner time per push (30 min hang + setup).
  • Pattern is identical to the (closed-without-merge) FastLED/fbuild#130 which described the same daemon error: request failed symptom for test-emu.

QEMU is not affected

The same fbuild test-emu pipeline works for the QEMU templates (qemu_esp32dev_test.yml / qemu_esp32c3_test.yml / qemu_esp32s3_test.yml) — see run https://github.com/FastLED/FastLED/actions/runs/26700714508. So this is specific to the avr8js daemon code path, not a general fbuild daemon problem.

Proposed FastLED-side fix (this issue)

I cannot fix the fbuild daemon itself from this repo, but we can stop bleeding CI time and gather better diagnostics:

  1. Add a step-level timeout-minutes to the fbuild test-emu step so it fails fast (≤8 min) instead of 30.
  2. Run uv run fbuild daemon restart immediately before test-emu to guarantee a fresh daemon for the avr8js request (the build subprocess otherwise leaves the daemon in whatever state it ended in).
  3. On failure, dump fbuild daemon status and tail the daemon log (fbuild show daemon --lines 200) into the uploaded artifact so the next iteration has real evidence of what the daemon was doing during the hang.

The restart is cheap (1-2s) and may actually unblock the avr8js path; if it doesn't, the timeout + diagnostics make the next debugging cycle tractable.

Upstream tracking

The root cause needs an fbuild-side fix. Should be filed against FastLED/fbuild once we have daemon-log evidence from the diagnostic dump.


Best-guess defaults used while filing:

  • Scope: avr8js_docker_template.yml only (don't touch QEMU template — QEMU works today, no regression risk).
  • Timeout cap: 8 minutes (covers slowest historical QEMU success at ~5 min plus headroom).
  • Diagnostic dump: on failure only, into the existing avr8js_output.log artifact.

Edit any of the above directly on this issue if a different scope is wanted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions