Skip to content

Bundled bun.native binary crashes with SIGILL on CPUs without AVX2 #2041

Description

@mrboxs

Describe the bug

vp create --package-manager bun silently fails (exit code 1) because the bundled bun.native binary shipped with vp crashes with SIGILL (signal 4, exit code 132) on CPUs that lack AVX2 support.

The system's own bun binary (same version 1.3.14) works fine.


Reproduction

Steps to reproduce:

  1. Run on a CPU without AVX2 (e.g. Intel Ivy Bridge i5-3470S)
  2. Execute vp create @tanstack/start --package-manager bun -- myapp --yes
  3. Observe: no project created, exit code 1, no visible output from template

Direct test of the bundled binary:

$ timeout 5 ~/.vite-plus/package_manager/bun/1.3.14/bun/bin/bun.native --version
timeout: the monitored command dumped core
exit: 132

The system bun works:

$ /home/mrboxs/.bun/bin/bun --version
1.3.14

Steps to reproduce

  1. Install vp via curl -fsSL https://vite.plus | bash
  2. Run vp create @tanstack/start --package-manager bun -- myapp --yes
  3. No project created, exit code 1

System Info

$ vp env current
Environment:
  Version  24.18.0
  Source   lts

Tool Paths:
  node  /home/mrboxs/.vite-plus/js_runtime/node/24.18.0/bin/node
  npm   /home/mrboxs/.vite-plus/js_runtime/node/24.18.0/bin/npm
  npx   /home/mrboxs/.vite-plus/js_runtime/node/24.18.0/bin/npx

$ vp --version
vp v0.2.2
  • OS: Arch Linux, Linux 7.0.10-arch1-1 x86_64
  • CPU: Intel Core i5-3470S @ 2.90GHz (SSE4.2 + AVX, no AVX2)

Used Package Manager

bun


Logs

Bundled bun binary MD5: 7d0efc01d1124bb79ca444cb9cb404af (92MB)
System bun binary MD5: 0233916fabdff93d1da22d583555fa76

The bundled binary appears to be compiled with AVX2 instructions not supported on Ivy Bridge and older CPUs.


Workaround

mv ~/.vite-plus/package_manager/bun/1.3.14/bun/bin/bun.native{,.bak}
ln -sf ~/.bun/bin/bun ~/.vite-plus/package_manager/bun/1.3.14/bun/bin/bun.native

Suggested Fix

  1. Rebuild bun.native targeting -march=x86-64-v2 (no AVX2 requirement)
  2. Or fall back to system bun when bundled binary fails with SIGILL
  3. Or detect CPU features and download appropriate bun build at install time

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions