Skip to content

Bun 1.3.14 segfault (SIGILL) on Linux x86_64 #33890

Closed as not planned
Closed as not planned

Description

@tarsyc

Environment

  • opencode: 1.17.10 (upgraded from 1.17.9, same crash)
  • Bun: 1.3.14 (bundled)
  • OS: Ubuntu 22.04.5 LTS, kernel 5.15.0-125-generic
  • CPU: AMD EPYC 9T24 96-Core (Zen4, full AVX-512 support)
  • Memory: 64GB RAM

Symptom

opencode TUI crashes after running for a short period with:

panic: Segmentation fault at address 0x13CB0
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

Illegal instruction

Activity

  1. github-actions commented on Jun 25, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. changed the title [-]Bun 1.3.14 segfault (SIGILL) on Linux x86_64 — AMD EPYC Zen4 (AVX-512)[/-] [+]Bun 1.3.14 segfault (SIGILL) on Linux x86_64[/+] on Jun 25, 2026
  3. jjiangweilan commented on Jun 25, 2026

    @jjiangweilan

    same thing can happen on Windows 11

  4. dmancilla85 commented on Jun 25, 2026

    @dmancilla85

    Same on Windows 11 24GB RAM i7-11
    Downgrading to v1.17.9 solve the issue in my case

  5. simonklee commented on Jun 25, 2026

    @simonklee
    Member

    These windows issues are a different thing AFAIK. For that please try installing the last version that we just released v1.17.11

  6. cloph-dsp commented on Jun 25, 2026

    @cloph-dsp

    @simonklee can i safely update? will it work now?

  7. JRedeker commented on Jun 27, 2026

    @JRedeker
    Contributor

    Additional data point: faulting IP disassembles to a deliberate ud2 panic, not an AVX/illegal-SIMD instruction

    • opencode 1.17.11 (latest), bundled Bun v1.3.14 (Linux x64 baseline)
    • WSL2 kernel 6.6.114.1-microsoft-standard-WSL2, Intel i7-12700K (avx2, no avx512), 41 GiB RAM (not OOM; 19 GiB free, load 1.68 at crash)
    • dmesg:
      traps: HeapHelper[...] trap invalid opcode ip:2607064 ... in opencode[24c8000+36e6000]
      opencode: HeapHelper: potentially unexpected fatal signal 4
      

    The binary is ET_EXEC, so the runtime IP maps 1:1 to the file. objdump -d at 0x2607064:

    2607045: e8 36 de 02 00   call 2634e80      # memset-loop helper (calls memset@plt)
    260705f: e8 1c de 02 00   call 2634e80
    2607064: 0f 0b            ud2               # <-- faulting IP
    2607066: cc               int3              # int3 padding (noreturn site)
    ...
    2607070: 55               push %rbp         # clean next-function prologue
    

    This is a deliberate panic/abort trap (ud2) on the Bun/JSC GC thread (HeapHelper), reached just after a memset/allocation helper — not a CPU-incompatible SIMD instruction. The binary embeds Rust panic machinery (std::panicking::begin_panic_handler, std::panicking::rust_panic_with_hook); ud2 is the standard Rust/Zig panic→abort trap.

    Triage note for the broader "invalid opcode" bucket (incl. #33595): a Bun/Zig ud2 panic produces the identical kernel trap invalid opcode / fatal signal 4 message as a genuine missing-AVX illegal instruction. The two are only distinguishable by disassembling the faulting IP. This instance is unambiguously a GC/runtime panic (this issue / #22084 bucket), not an AVX-baseline mismatch — the CPU here has no AVX-512 yet the binary is the baseline build, and the trapping byte is 0f 0b ud2, not an EVEX/zmm op.

    Reproduced on the latest 1.17.11, so the current release does not fix it. Crash recovered cleanly via process auto-restart; application state intact. Aggravating context: high concurrency (3+ primary sessions in one project + several vite dev servers) → elevated GC pressure on the HeapHelper thread.

  8. github-actions commented on Aug 27, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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