Skip to content

Illegal instruction (SIGILL) on Intel Pentium Gold - binary requires AVX #98

@JosefJezek

Description

@JosefJezek

Description

The d3k CLI crashes immediately with Illegal instruction (core dumped) on CPUs that lack AVX instruction set support. The pre-compiled @d3k/linux-x64 binary appears to be compiled with AVX/AVX2 instructions, which are not available on lower-end x86_64 processors.

Steps to Reproduce

  1. Install dev3000 on a machine with an Intel Pentium Gold (or similar CPU without AVX)
  2. Run d3k (or the binary directly)
  3. Observe: Illegal instruction (core dumped), exit code 132

Environment

  • OS: Ubuntu 24.04.4 LTS (Noble Numbat)
  • Kernel: 6.17.0-14-generic
  • CPU: Intel Pentium Gold G6400 @ 4.00GHz (x86_64, no AVX/AVX2)
  • Node.js: v22.14.0
  • dev3000 version: 0.0.170
  • @d3k/linux-x64 version: 0.0.170

Root Cause

The CPU flags on this machine include SSE4.1, SSE4.2, POPCNT, AES, but not AVX or AVX2. The Intel Pentium Gold G6400 (Comet Lake) does not support AVX.

The pre-compiled binary at @d3k/linux-x64/bin/dev3000 uses instructions beyond what this CPU supports, resulting in SIGILL.

Suggested Fix

Compile the Linux x64 binary targeting a baseline x86_64 instruction set (e.g., SSE4.2 or x86-64-v2) instead of requiring AVX/AVX2 (x86-64-v3). This would ensure compatibility with a wider range of x86_64 processors, including Intel Pentium, Celeron, and older Core series.

Alternatively, provide separate binaries for different x86-64 microarchitecture levels (v2, v3).

Metadata

Metadata

Assignees

No one assigned

    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