cap icon indicating copy to clipboard operation
cap copied to clipboard

[bug] On older CPU architectures

Open AnARCHIS12 opened this issue 2 weeks ago • 4 comments

On older CPU architectures (such as Intel Xeon E5 v2 / Ivy Bridge, Sandy Bridge, or certain budget VPS virtual CPU profiles) that lack AVX2 support, @duckdb/node-api crashes at startup with SIGILL: Illegal instruction. This causes the Cap server to either fail or be unable to persist analytics events.

AnARCHIS12 avatar Nov 14 '26 21:11 AnARCHIS12

are you using the latest version of capd?

tiagozip avatar Nov 15 '26 12:11 tiagozip

Latest version

AnARCHIS12 avatar Nov 15 '26 14:11 AnARCHIS12

could you paste the full crash log and the output of docker inspect <your image> --format '{{index .Config.Labels "org.opencontainers.image.version"}}'?

tiagozip avatar Nov 15 '26 19:11 tiagozip

Hi, here are the details from our server:

  1. Output of docker inspect tiago2/cap:latest --format '{{index .Config.Labels "org.opencontainers.image.version"}}': 1.4.4-slim

(Image metadata also shows org.opencontainers.image.revision: 38afee6c84fcf48c0edb2466aa4b27d287a59c30, org.opencontainers.image.created: 2026-10-22T10:15:17.549Z, and package.json has capd 4.0.2 with @duckdb/node-api 2.0.0-r.1.)

  1. Complete crash log: ============================================================ Bun v1.4.4 (38afee6c8) Linux x64 Linux Kernel v6.12.107 | glibc v2.41 CPU: sse42 popcnt avx Args: "bun" "run" "./src/index.js" Features: jsc no_avx2 process_dlopen Builtins: "bun:main" "node:assert" "node:child_process" "node:crypto" "node:dns/promises" "node:fs" "node:net" "node:path" "node:util"

Elapsed: 98ms | User: 203ms | Sys: 59ms RSS: 59.71 MB | Peak: 59.71 MB | Commit: 0.14 GB | Faults: 0 | Machine: 67.40 GB

panic(main thread): Illegal instruction at address 0x7F66DDFE033B Crashed while loading native module: /usr/src/app/node_modules/@duckdb/node-bindings-linux-x64/duckdb.node oh no: Bun has crashed. This indicates a bug in Bun.

  1. Context: The host CPU is an Intel(R) Xeon(R) CPU E5-2697 v2 @ 2.70GHz (sse42 popcnt avx, no_avx2). Cap crashes immediately at startup (exit code 132 / SIGILL) when src/events/open-store.js -> src/events/duckdb.js loads /usr/src/app/node_modules/@duckdb/node-bindings-linux-x64/duckdb.node, because the prebuilt DuckDB native binary requires AVX2 instructions.

AnARCHIS12 avatar Nov 15 '26 19:11 AnARCHIS12