10 parts · 17 chapters
Backend Debugging and Diagnostics
The backend mirror of the DevTools course. Production problems are found with a method, not with luck: start from the symptom, narrow with metrics, confirm with traces and profiles, then prove the cause with the right low-level tool. Every chapter here ends in a command you run against a real process.
Ten parts: the diagnostic method; processes and syscalls; CPU profiling across runtimes; memory, leaks and GC; locks and contention; network debugging; database-side diagnosis; core dumps and debuggers; eBPF tools; and the lab, a service with one deliberate pathology per route at modules/bdiag/lab/server.mjs.
methodSymptom, scope, hypothesis, evidence, fix, verify.
syscallsstrace, ltrace, lsof, ss, /proc.
profilingperf, pprof, async-profiler, py-spy, clinic and flame graphs.
memoryHeap dumps, leaks, GC logs across runtimes.
network and DBtcpdump, Wireshark, curl timing, slow logs and lock views.
the labSeven pathologies to diagnose with real tools, measured numbers included.
00
The Diagnostic Method
Six steps · Checklists and traps
2 ch · ~12 min01Processes and System Calls
strace and ltrace · /proc, lsof and ss
2 ch · ~12 min02CPU Profiling Across Runtimes
Profilers by runtime · On-CPU, off-CPU and differential profiles
2 ch · ~12 min03Memory, Leaks and GC
Finding the kind of memory first · GC logs and pauses
2 ch · ~12 min04Locks and Contention
Seeing waiting
1 ch · ~8 min05Network Debugging
curl timings, dig and openssl · tcpdump and Wireshark
2 ch · ~12 min06Database-Side Diagnosis
What the database sees right now · Correlating with application traces
2 ch · ~12 min07Core Dumps and Debuggers
Cores, gdb and runtime debuggers
1 ch · ~8 min08eBPF Tools for the Impatient
Questions, answered from the kernel
1 ch · ~8 min09The Lab
Run it and break it · Worksheet
2 ch · ~12 minBuilt on Node, Computers and SREUses the measurement habits from Computers part 10, the observability from SRE part 8, and Node part 9 for JavaScript-specific profiling.