Skip to content

fix(ci): install libslirp0 for QEMU jobs - #3865

Closed
zackees wants to merge 1 commit into
masterfrom
fix/qemu-libslirp
Closed

zackees wants to merge 1 commit into
masterfrom
fix/qemu-libslirp

Conversation

@zackees

@zackees zackees commented Aug 6, 2026 •

Copy link
Copy Markdown
Member

Problem

esp32s3_qemu_rmt / qemu_test fails with exit code 127 before running any test:

qemu-system-xtensa: error while loading shared libraries:
libslirp.so.0: cannot open shared object file: No such file or directory
QEMU ESP32S3 test-emu failed: failed: QEMU exited with code 127

Observed on https://github.com/FastLED/FastLED/actions/runs/31091411573/job/92583052211.

Cause

The Espressif qemu-system-* binaries that fbuild downloads are dynamically linked
against libslirp.so.0 (user-mode networking) in addition to libSDL2-2.0.so.0.
.github/workflows/qemu_template.yml installed only libsdl2-2.0-0, and
ubuntu-latest does not ship libslirp0 by default. The failure is intermittent
across jobs only because the runner image occasionally has it pulled in transitively.

Fix

Add libslirp0 to the existing runtime-library install step in the shared QEMU
workflow template. This single change covers all three consumers:
qemu_esp32c3_test.yml, qemu_esp32dev_test.yml, qemu_esp32s3_test.yml.

Validation

CI is the test for this change — the QEMU jobs on this PR exercise the modified
step directly. No source files are touched.

Refs #3864

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Fixed Espressif QEMU workflow failures by installing required runtime libraries.
    • Added documentation explaining QEMU’s dynamic dependencies and missing-library errors.

The Espressif qemu-system-* binaries fbuild downloads are dynamically
linked against libslirp.so.0 in addition to libSDL2. ubuntu-latest does
not ship libslirp0 by default, so QEMU aborted at startup with

    qemu-system-xtensa: error while loading shared libraries:
    libslirp.so.0: cannot open shared object file

and the job failed with exit code 127 before running any test.

Add libslirp0 to the runtime library install step in the shared QEMU
workflow template, which covers the esp32c3, esp32dev and esp32s3 jobs.

Co-Authored-By: Claude <[email protected]>
@coderabbitai

coderabbitai Bot commented Aug 6, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 021925cc-1f3e-4f83-a4e8-39df4b45c8ce

📥 Commits

Reviewing files that changed from the base of the PR and between e1190d4 and 9a21e71.

📒 Files selected for processing (1)
  • .github/workflows/qemu_template.yml

📝 Walkthrough

Walkthrough

The QEMU GitHub Actions workflow now installs both libsdl2-2.0-0 and libslirp0. The dependency step also documents these runtime requirements and the missing-library failure.

Changes

QEMU Runtime Dependencies

Layer / File(s) Summary
Install QEMU runtime libraries
.github/workflows/qemu_template.yml
The workflow installs libslirp0 alongside libsdl2-2.0-0 for the downloaded Espressif QEMU binary. The step documents the runtime dependencies and failure condition.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: installing libslirp0 for QEMU CI jobs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/qemu-libslirp

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zackees

zackees commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

Note on scope of this fix — one open question

libslirp0 is the right thing to install regardless, but I want to flag an asymmetry so this isn't over-claimed:

In the failing run (31091411573), esp32s3_qemu_rmt died with libslirp.so.0: cannot open shared object file (exit 127) while esp32s3_qemu_lcd passed — same workflow file, same template, same ubuntu-latest image, same qemu-system-xtensa. A plain missing-system-package would have failed both identically.

That points at the Espressif QEMU tarball, which bundles its own lib/libslirp.so.0 and resolves it via rpath: a partial/raced extract in fbuild's toolchain cache would leave one job's copy missing the bundled lib while another job's cache entry is intact. Installing the system libslirp0 still fixes that case, because the loader falls back to the system path — so this change is a valid mitigation either way, but the underlying cache race (if that's what it is) would belong in fbuild.

The QEMU jobs on this PR exercise the modified step directly; I'll confirm from their results before merging.

Refs #3864

@zackees

zackees commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

Closing unmerged — this fix belongs in fbuild, not here.

fbuild downloads, caches, extracts and invokes the QEMU binary; FastLED never sees the toolchain. Patching qemu_template.yml to install a shared library on fbuild's behalf would go stale the moment fbuild bumps the QEMU revision, and it would mask the underlying bug rather than fix it — the same reason deployment is fbuild's job.

The asymmetry I flagged above reinforces it: esp32s3_qemu_lcd passed while esp32s3_qemu_rmt failed in the same run on the same image, which a missing distro package cannot explain. That points at a raced/partial extract of the Espressif tarball's bundled lib/libslirp.so.0 in fbuild's toolchain cache — squarely fbuild's territory.

Filed as FastLED/fbuild#1266, with atomic toolchain extraction as the suggested fix so the whole class is addressed. That issue also proposes fbuild provision the QEMU runtime deps outright, which would let us delete the pre-existing libsdl2-2.0-0 workaround from qemu_template.yml too.

Refs #3864

@zackees zackees closed this Aug 6, 2026
@zackees
zackees deleted the fix/qemu-libslirp branch August 6, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant