Debugging
-
nftables rule ordering surprised me
A two-hour outage caused by a harmless-looking rule insertion into the wrong chain position, and what I learned about nftables evaluation
-
A compiler optimization I didn't know existed until it broke
Tail call optimization, manual trampolines, and a crash that took me three days to trace to the optimizer
-
PLT and GOT: the indirection I never noticed
Dynamic linking on ELF is a two-step dance through the PLT and the GOT, and once you see it you cannot unsee it
-
The panic in a goroutine that took down prod
A nil deref in a background worker crashed our whole service because Go's panic model doesn't care that you spawned a goroutine to handle errors safely
-
TIL: git bisect run automates the bisect
Give bisect a script that exits 0 for good and non-zero for bad. It'll do the rest.
-
CPU caches explained through a slow hash table
A hash table that benchmarked beautifully in isolation was five times slower under realistic load, and L2 cache misses explained why
-
Linking errors on Linux: an afternoon with ld
Undefined symbols, multiple definitions, and the weekend I finally understood how --as-needed and --no-undefined interact
-
The branch predictor ate my microbenchmark
I was sure one version of a hot loop was faster; I was wrong; it was the CPU making me look smart
-
TIL: ltrace is strace for library calls
Different tool, adjacent niche. Handy when the bug lives in libc-level behavior, not syscalls.
-
TIL: strace -k gives you syscall backtraces
strace -k shows the stack that led to each syscall, not just the syscall itself.
-
TIL: perf-map-agent for JVM flamegraphs
Attaching perf to a JVM produces garbage unless you tell perf where the JIT-compiled symbols are.
-
The day I learned Mach-O segments matter
Shipping a Go binary that loaded fine on Linux but segfaulted on macOS led me down a rabbit hole of executable file formats
-
TIL: Go pprof labels for attributing CPU time
pprof.Labels lets you tag goroutines and filter flamegraphs by tag.
-
TIL: redis-cli MONITOR is still a footgun, not a tool
MONITOR prints every command the server handles. Very tempting. Very bad for prod.
-
The pprof graph that taught me to read assembly
A CPU profile pointed at a line with a simple map lookup, and pprof's disasm view sent me down a real rabbit hole