Skip to content

Fix Linux wheel illegal-instruction crashes - #511

Merged
cjacoby-sptfy merged 3 commits into
masterfrom
cjacoby/issue-454-reproduction
Sep 23, 2026
Merged

cjacoby-sptfy merged 3 commits into
masterfrom
cjacoby/issue-454-reproduction

Conversation

@cjacoby-sptfy

@cjacoby-sptfy cjacoby-sptfy commented Sep 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes #454 by preventing Linux x86_64 wheels from accidentally requiring CPU instructions newer than the project’s documented baseline.

The manylinux build previously used -march=native. Because wheel builders may run on newer CPUs, this could compile host-specific instructions into the distributed wheel. On older CPUs, importing pedalboard could then terminate with SIGILL (Illegal instruction).

Changes

  • Default Linux x86 builds to the AVX baseline using -mavx.
  • Preserve native optimization as an explicit opt-in with USE_MARCH_NATIVE=1.
  • Explicitly disable native optimization in wheel-building CI.
  • Add a compatibility smoke test for manylinux x86_64 wheels under QEMU CPU models representing:
    • Intel Ivy Bridge
    • AMD EPYC Milan
  • Verify that the installed wheel can import pedalboard and process audio with Gain.
  • Document the Linux x86_64 AVX requirement.

Validation

Native GCP machines

The exact manylinux x86_64 wheels produced by this PR’s CI run were tested on native GCP VMs using:

  • Intel Ivy Bridge
  • AMD Milan

All CPython wheels from 3.10 through 3.15 successfully imported and processed audio on both machines: 12/12 passed.

As a negative control, the published pedalboard==0.9.21 CPython 3.11 wheel reproduced the original failure on both machines:

Illegal instruction (core dumped)
exit=132

This confirms that the test environments can detect the original incompatibility.

CI and local testing

  • All 36 wheel-building CI jobs passed.
  • The new QEMU compatibility check passed for CPython 3.10–3.15 manylinux x86_64 wheels.
  • Full local Linux test suite:
    • 26,761 passed
    • 50 skipped

The only non-passing job in the CI run was the macOS Python 3.15 test job, which timed out after six hours. It did not report a test failure and does not exercise the Linux wheel-building path changed here.

Co-authored-by: Codex <noreply@openai.com>
@cjacoby-sptfy cjacoby-sptfy added the Also Test Wheels Trigger wheel creation on all platforms via GitHub Actions. label Sep 17, 2026
Co-authored-by: Codex <noreply@openai.com>
@cjacoby-sptfy
cjacoby-sptfy marked this pull request as ready for review September 21, 2026 20:25

@caravanuden caravanuden left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! just a couple questions

Comment thread .github/workflows/all.yml
Comment thread scripts/test_linux_wheel_cpu_compatibility.py

@tdhopper tdhopper left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reproduced the existing bug in docker and verified the changes resolve it.

@cjacoby-sptfy
cjacoby-sptfy merged commit 1fe30eb into master Sep 23, 2026
76 of 77 checks passed
@cjacoby-sptfy
cjacoby-sptfy deleted the cjacoby/issue-454-reproduction branch September 23, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Also Test Wheels Trigger wheel creation on all platforms via GitHub Actions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pedalboard 0.9.21 causes 'Illegal Instructions' on linux

3 participants