Segmentation fault! Low-level debugging for JS developers
summary
Server-side crashes produce a core file that debuggers can read so you get a real stack instead of "segmentation fault": use GDB or LLDB with the executable and debug symbols, or compile a debug build of NodeJS (about half an hour) to get line numbers. V8 supplies a gdbinit and LLDB plugin with commands to print JS values and stacks. A node flag converts JS exceptions into native crashes for postmortem cores. For runtime tracing use strace -f -e trace=connect,read,write -s 124 to see DNS, IPv6 attempts and the exact HTTP bytes.
AI-written summary · about
chapters (11)
- 0:00Introduction and background
- 1:49Understanding segmentation faults
- 5:19Debugging with core dumps
- 7:28Debug builds for deeper insight
- 10:42Inspecting memory and variables
- 12:06V8 debugging with GDB
- 13:30Node.js crash analysis
- 15:39Node.js flags for debugging
- 18:07Strace for system interactions
- 23:23Tracing network requests
- 25:31Summary and tools overview
related talks
50mPost-Mortem Debugging in Node.js
57mTroubleshooting Node.js Applications Under the Hood
28mPost mortem NodeJS debugging
25mNode js applications diagnostics under the hood
20mCore Files
50mDebugging Node.js in Production
23mBringing JavaScript Back to Life
23mThrow Me a Lifebuoy: Debugging Node.js in Production with Diagnostic Reports
