Skip to content

Bun crashes on non-AVX2 CPUs (all versions after v1.3.8) #30613

Description

@DoKoB0512

How can we reproduce the crash?

Bun crashes when running a simple project on a CPU without AVX2 support using any bun version > v1.3.8. Steps below reproduce the issue from a fresh project.

Steps to reproduce

  1. Use a machine/VM with a non-AVX2 CPU (e.g., older Intel/AMD CPU or a VM with AVX2 disabled).
  2. Install any bun version after v1.3.8.
  3. Create a new blank project using bun init and choose blank.
  4. Run bun index.ts

Expected behavior

bun runs the script and prints "hello" (or runs the program) without crashing.

Actual behavior

Bun crashes immediately when running the script.
Bun v1.3.14 (0d9b296) Linux x64 (baseline)
Linux Kernel v6.0.0 | glibc v2.39
Args: "bun" "index.ts"
Features: jsc no_avx2 no_avx tsconfig
Builtins: "bun:main"
Elapsed: 16425ms | User: 13835ms | Sys: 2456ms
RSS: 7.96GB | Peak: 4.02GB | Commit: 7.96GB | Faults: 0 | Machine: 30.00GB

CPU lacks AVX support. Please consider upgrading to a newer CPU.
panic(main thread): Segmentation fault at address 0x39E2EC00000
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

To send a redacted crash report to Bun's team,
please file a GitHub issue using the link below:

https://bun.report/1.3.14/Ba10d9b296gCggggigD4664tE+ypRgwgnuC6n1/uCmj67uCg02u8Dok4k6D+/3xpF+y0xpFm73rmF0973jEq/ykgDmsyppDg1qguCq5/zhD+6gguCuohysC00hhsC8u5gsCy8wKA285Bgggg4uB

Illegal instruction (core dumped)

Relevant log output

Bun v1.3.14 (0d9b296a) Linux x64 (baseline)
Linux Kernel v6.0.0 | glibc v2.39
Args: "bun" "index.ts"
Features: jsc no_avx2 no_avx tsconfig
Builtins: "bun:main"
Elapsed: 16425ms | User: 13835ms | Sys: 2456ms
RSS: 7.96GB | Peak: 4.02GB | Commit: 7.96GB | Faults: 0 | Machine: 30.00GB

CPU lacks AVX support. Please consider upgrading to a newer CPU.
panic(main thread): Segmentation fault at address 0x39E2EC00000
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

To send a redacted crash report to Bun's team,
please file a GitHub issue using the link below:

 https://bun.report/1.3.14/Ba10d9b296gCggggigD4664tE+ypRgwgnuC6n1/uCmj67uCg02u8Dok4k6D+/3xpF+y0xpFm73rmF0973jEq/ykgDmsyppDg1qguCq5/zhD+6gguCuohysC00hhsC8u5gsCy8wKA285Bgggg4uB

Illegal instruction (core dumped)

Stack Trace (bun.report)

Bun v1.3.14 (0d9b296) on linux x86_64_baseline [AutoCommand]

Segmentation fault at address 0x39E2EC00000

Features: tsconfig, jsc, no_avx2, no_avx

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions