node
crash_error
ai_generated
partial
Segmentation fault (core dumped) in Node.js
ID: node/segfault-native-module
70%Fix Rate
80%Confidence
50Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 20 | active | — | — | — |
Root Cause
Node process crashed with segfault. Usually a native addon bug or memory corruption.
genericWorkarounds
-
90% success Rebuild native modules for current Node version: npm rebuild
npm rebuild
Sources: https://nodejs.org/api/addons.html
-
85% success Run with --report-on-fatalerror to get diagnostic report
node --report-on-fatalerror app.js
Sources: https://nodejs.org/api/report.html
-
78% success If reproducible, report to the native module's issue tracker with Node version info
# Include in the bug report: node -v && npm ls <native-module> node --report-on-fatalerror app.js # Attach the generated .report.json file to the issue
Sources: https://nodejs.org/api/report.html
Dead Ends
Common approaches that don't work:
-
Increase memory with --max-old-space-size
80% fail
Segfaults aren't OOM errors — more memory won't help
-
Use try/catch to handle segfaults
95% fail
Segfaults can't be caught by JavaScript — they crash the process
Error Chain
Frequently confused with: