Skip to content
Latchkey

Node "Bus error (core dumped)" in a N-API addon in CI

A native N-API addon triggered a SIGBUS ("Bus error"), crashing Node with no JavaScript stack. This is a low-level fault - usually an ABI mismatch, a corrupted binary, or a memory-mapping issue on the runner.

What this error means

The job dies abruptly with "Bus error (core dumped)" and a non-zero exit, no JS error. It often appears right when a specific native module loads or does heavy work, and may be intermittent.

node
Bus error (core dumped)
# exit code 135, no JavaScript stack trace

Common causes

Native addon ABI mismatch

A binary built for a different Node ABI is loaded against the running Node, faulting at the binary boundary.

Corrupted binary or memory-mapping fault

A truncated download or a constrained/odd memory mapping on the runner causes a SIGBUS during mmap-backed access.

How to fix it

Rebuild or reinstall the native addon

Reinstall cleanly so the addon binary matches the active Node ABI.

Terminal
rm -rf node_modules
npm ci
# or rebuild native modules in place
npm rebuild

Pin a Node version with matching prebuilds

Use a Node version the addon publishes a compatible binary for, and verify the download is intact.

  1. Match the Node major to the addon prebuild ABI.
  2. Clear caches that may hold a truncated binary.
  3. Re-run to confirm the crash was a transient/corruption issue.

How to prevent it

  • Keep the Node ABI aligned with native addon prebuilds.
  • Rebuild native modules after Node version changes.
  • Latchkey self-healing managed runners auto-retry transient SIGBUS/corrupted-binary crashes and cache verified native binaries to avoid faulting downloads.

Frequently asked questions

What causes ""Bus error (core dumped) napi addon""?
A binary built for a different Node ABI is loaded against the running Node, faulting at the binary boundary.
How do I fix "Bus error (core dumped) napi addon"?
Reinstall cleanly so the addon binary matches the active Node ABI.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card