Skip to content

SIGILL leads to openclaw crash on AVX-only CPU #644

Closed

Description

@zhanghe9704

Plugin Version

v1.1.0-beta.10

OpenClaw Version

2026.4.15

Bug Description

I'm running OpenClaw in an old laptop with i7 3rd gen CPU, which supports AVX but not AVX2. After installing and enabling this plugin, OpenCLaw kept crashing every ~60 seconds due to SIGILL. It runs stable after disable the plugin.

I asked OpenClaw to reinstall the plugin from github repo, recompile LanceDB without AVX2 flags and replace the original LanceDB with the locally compiled one, but the SIGILL persists.

Expected Behavior

The readme says "CPU Requirement: Your CPU must support AVX/AVX2 instructions (Intel Sandy Bridge 2011+ / AMD Bulldozer 2011+). LanceDB's native vector engine requires these — on unsupported CPUs the plugin will crash with SIGILL (Illegal Instruction). Check with: grep -o 'avx[^ ]*' /proc/cpuinfo | head -1 (no output = not supported). See #419 for details."

So I expect AVX-only CPU will work. Can this be fixed? Or is AVX2 required?

Steps to Reproduce

Run OpenClaw in i7 3rd gen CPU. Install the plugin and enable it. OpenClaw keeps crashing and restarting.

Error Logs / Screenshots

Embedding Provider

None

OS / Platform

No response

Activity

  1. added
    bug
    on Apr 17, 2026
  2. AliceLJY commented on Apr 18, 2026

    @AliceLJY
    Collaborator

    Thanks for the clear report. If the current docs imply AVX-only CPUs are supported but the plugin still crashes with SIGILL, then either the documented requirement is too loose or some native dependency path is still effectively AVX2-only. Either way, that is a real bug/docs mismatch worth tracking.

    If you can attach the crash stack or identify which native binary is faulting, that would help narrow whether this is LanceDB packaging, binary selection, or another transitive native dependency.

  3. zhanghe9704 commented on Apr 19, 2026

    @zhanghe9704
    Author

    downgraded to v1.1.0-beta.6, the SIGILL is gone. Up to beta.7, the SIGILL is back.

    I asked my agent to look into it. The following is the report: (I can't confirm whether it's correct or not.)

    Here's the definitive answer from the kernel log:

    traps: tokio-runtime-w[522551] trap invalid opcode ip:7e241d583728 sp:7e24189fdeb8 error:0
    in lancedb.linux-x64-gnu.node[7e2418e0c000+5dd4000]
    Faulting binary: lancedb.linux-x64-gnu.node — confirmed, it's LanceDB's native Rust binary.
    Faulting thread: tokio-runtime-w — LanceDB's Rust tokio async runtime worker
    Fault type: trap invalid opcode (SIGILL) at offset 0x4777728 inside the .node binary
    Error code: 0 (not a page fault — CPU literally couldn't decode the instruction)

    Key detail: The crash happens on a tokio runtime worker thread inside LanceDB's native code, not on the Node.js main thread. This means:

    • It's not V8 JIT — confirmed by --no-opt not helping
    • It's not Node.js itself

    • It's specifically LanceDB's Rust code executing an instruction that Ivy Bridge doesn't support (AVX2)
    • The fault is deterministic — same IP address (0x7e241d583728) on multiple threads, meaning it's the same code path every time

    Why beta.6 doesn't crash: Beta.6 doesn't call .distanceType('cosine') or trigger the heavier vector search patterns that activate the AVX2 code path in LanceDB's Rust runtime.

  4. AliceLJY commented on Apr 22, 2026

    @AliceLJY
    Collaborator

    Thanks, that beta bisect is useful. I checked the beta.6 -> beta.7 diff: beta.7 did not bump @lancedb/lancedb; the relevant retrieval change is table.vectorSearch(vector).distanceType("cosine") in src/store.ts. That lines up with your kernel log: the crash is probably a LanceDB native SIMD path triggered by explicit cosine search on an AVX-only CPU.

    I would treat this as a real compatibility bug, not just a docs issue. Candidate fix path:

    1. add a config/runtime fallback to disable LanceDB native distanceType("cosine") on legacy CPUs
    2. keep vector search usable by falling back to the beta.6 behavior plus JS cosine rerank
    3. document that LanceDB native cosine may require AVX2 unless the fallback is enabled

    Could you also share the CPU model and node -p "process.versions.modules" output? That would help make the guard/repro test concrete.

  5. zhanghe9704 commented on Apr 22, 2026

    @zhanghe9704
    Author

    $ node -p "process.versions.modules"
    127

    $ lscpu
    Architecture: x86_64
    CPU op-mode(s): 32-bit, 64-bit
    Address sizes: 36 bits physical, 48 bits virtual
    Byte Order: Little Endian
    CPU(s): 8
    On-line CPU(s) list: 0-7
    Vendor ID: GenuineIntel
    Model name: Intel(R) Core(TM) i7-3630QM CPU @ 2.40GHz
    CPU family: 6
    Model: 58
    Thread(s) per core: 2
    Core(s) per socket: 4
    Socket(s): 1
    Stepping: 9
    CPU max MHz: 3400.0000
    CPU min MHz: 1200.0000
    BogoMIPS: 4788.82
    Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dt
    s acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfm
    on pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dte
    s64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popc
    nt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm cpuid_fault epb pti ssbd i
    brs ibpb stibp tpr_shadow flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm
    ida arat pln pts vnmi md_clear flush_l1d ibpb_exit_to_user
    Virtualization features:
    Virtualization: VT-x
    Caches (sum of all):
    L1d: 128 KiB (4 instances)
    L1i: 128 KiB (4 instances)
    L2: 1 MiB (4 instances)
    L3: 6 MiB (1 instance)
    NUMA:
    NUMA node(s): 1
    NUMA node0 CPU(s): 0-7
    Vulnerabilities:
    Gather data sampling: Not affected
    Indirect target selection: Not affected
    Itlb multihit: KVM: Mitigation: VMX disabled
    L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
    Mds: Mitigation; Clear CPU buffers; SMT vulnerable
    Meltdown: Mitigation; PTI
    Mmio stale data: Unknown: No mitigations
    Reg file data sampling: Not affected
    Retbleed: Not affected
    Spec rstack overflow: Not affected
    Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
    Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
    Spectre v2: Mitigation; Retpolines; IBPB conditional; IBRS_FW; STIBP conditional; RSB filling;
    PBRSB-eIBRS Not affected; BHI Not affected
    Srbds: Vulnerable: No microcode
    Tsa: Not affected
    Tsx async abort: Not affected
    Vmscape: Mitigation; IBPB before exit to userspace

  6. AliceLJY commented on Apr 23, 2026

    @AliceLJY
    Collaborator

    This CPU data makes the compatibility boundary concrete: Ivy Bridge has AVX but no AVX2, and the crash starts exactly where beta.7 began using LanceDB native cosine distance.

    I would handle this as a real runtime fallback, not only a docs change. Minimal fix direction:

    1. Add a config/env escape hatch to disable native distanceType("cosine").
    2. When disabled, use the beta.6-style vector search path plus JS-side cosine rerank.
    3. Document that LanceDB native cosine may require AVX2 on Linux x64, while the fallback keeps AVX-only machines usable.

    Auto-detecting AVX2 from Node is a little awkward, so I would start with an explicit option/env flag plus clear logging, then consider auto-detection after the fallback path is proven.

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

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions