Skip to content

SIGILL crash on AMD Ryzen Zen 3 (no AVX-512 support) — all sessions crash #38986

Closed as not planned

Description

@NiabKungg

Description

Version: 1.18.5
Platform: Linux x64
CPU: AMD Ryzen 5 5600H (Zen 3)
Installed from: /opt/OpenCode/ai.opencode.desktop (packaged binary)

Issue

OpenCode Desktop crashes with SIGILL (Illegal Instruction) on every session.
The binary contains AVX-512 instructions that AMD Zen 3 CPUs do not support.

Evidence

The compiled binary at /opt/OpenCode/ai.opencode.desktop includes AVX-512
instructions using zmm registers:

vaddps -0x1e2b8d2(%rip),%zmm0,%zmm8 ; EVEX-encoded, requires AVX-512
vfmadd213ps %zmm0,%zmm2,%zmm7 ; EVEX-encoded, requires AVX-512
kmovd %edi,%k0 ; AVX-512 mask register

Ryzen 5 5600H (Zen 3) flags include AVX and AVX2 but NOT AVX-512.

Coredump confirms all crashes are SIGILL on the main binary:

  • 5+ cores, all signal=SIGILL, executable=/opt/OpenCode/ai.opencode.desktop

20+ crash dumps accumulated in Crashpad/pending/

Expected

Binary should be compiled without AVX-512, or with runtime dispatch
to fall back on CPUs lacking AVX-512 support.

Workaround

CLI (opencode command) works fine — uses system Node.js runtime
without the AVX-512 requirement.

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on Jul 26, 2026

    @github-actions
    Contributor

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

    These issues all cover the same root cause: bundled Bun/native binaries including AVX-512 or AVX2 instructions that crash on CPUs lacking those extensions. Your report adds useful evidence (AMD Zen 3 + desktop AppImage path) that may help narrow down the packaging issue.

  2. lqmnah commented on Aug 25, 2026

    @lqmnah

    Confirming this on Intel, not just AMD Zen 3 — and still present 16 releases later.

    Environment

    • opencode 1.18.21 (crashes) / 1.18.22 (currently installed, auto-updated)
    • Bun 1.3.14 (bundled), binary 184,498,304 bytes
    • Ubuntu 26.04 LTS, kernel 7.0.0-30-generic, x86_64
    • CPU: Intel Core i9-14900KF (Raptor Lake), microcode 0x133
    • Installed via npm (~/.opencode/bin/opencode), not the desktop package

    CPU lacks AVX-512

    avx512f  : absent
    avx512bw : absent
    avx512vl : absent
    avx2     : present
    

    This matters for scope: every Intel consumer CPU from 12th gen onward lacks AVX-512
    (disabled because of the E-cores). So this is not an AMD-specific bucket — it covers
    Alder Lake, Raptor Lake, and Meteor Lake desktops/laptops as well as Zen 3.

    Same evidence in the npm binary

    Disassembling .text of the installed binary:

    %zmm register uses    : 6888
    %k1-%k7 mask registers: 2575
    

    Concrete EVEX instructions present:

    vbroadcasti32x4 -0x22b9e5f(%rip),%zmm5
    vinserti64x4    $0x1,%ymm3,%zmm4,%zmm3
    vshufi64x2      $0x0,%zmm4,%zmm4,%zmm4
    

    Kernel traps

    Two crashes, the same instruction pointer, different threads and different model
    providers:

    Aug 23 18:10:22 kernel: traps: HeapHelper[504903] trap invalid opcode
      ip:2607064 sp:7217591ec8d0 error:0 in opencode[21a3064,24c8000+36e6000]
    
    Aug 24 16:04:32 kernel: traps: opencode[3915644] trap invalid opcode
      ip:2607064 sp:7ffd19044c90 error:0 in opencode[21a3064,24c8000+36e6000]
    

    Crash 1 was on a local Ollama provider, crash 2 on a remote OpenAI-compatible endpoint,
    so it is below the provider layer — consistent with what #33595 argues.

    One difference worth noting

    For us this is intermittent, not every session: 2 crashes in roughly 40 hours of
    heavy agentic use, both during long tool-call loops, rather than a crash on every start.
    That fits a rarely-taken code path containing AVX-512 rather than a hot one.

    Possibly related on the same host: opencode run twice hung indefinitely with no output
    and no upstream request ever sent (once ~19 minutes, zero completed turns, model server
    idle with nothing loaded) and had to be killed. No log line after the run started. Not
    claiming it is the same defect, only that it appeared on the same build.

    Ruled out here: system OOM (55 GiB free at crash 1), machine fault (the later reboot was
    a clean systemd-reboot), and the Raptor Lake Vmin-shift errata (microcode 0x133,
    zero MCEs).

    Happy to attach a full backtrace — systemd-coredump is now capturing cores on this host
    with ProcessSizeMax=16G, so the next occurrence on 1.18.22 will produce one.

  3. bronger commented on Sep 30, 2026

    @bronger

    I this “illegal instruction” with OpenCode 1.18.33 on an AMD Turion II. Is this the same problem, or are such very old CPUs even another issue?

  4. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

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