Core dump epidemiology: fixing an 18-year-old bug
Mysterious return-to-bogus-address crashes in Rockset's C++ execution layer turned out to be two unrelated bugs: silent register corruption on a single bad Azure host, and an 18-year-old race in GNU libunwind's _Ux86_64_setcontext, which read the synthesized ucontext_t after moving %rsp past it, letting a frequent SIGUSR2 CPU-time signal clobber it during exception unwinding. The breakthrough came from switching from close inspection of individual cores to population analysis: an automated pipeline classified every production core dump from the past year, and the clean data set separated the two crash clusters by region, start date and node age. Fixes included denylisting the host, logging register state in the fatal signal handler, reusing VMs to make bad-node detection easier, and patching libunwind.
Related posts
- RocksDB development finds a CPU bug
RocksDB Blog mediumAdeptA RocksDB unit test that generated thousands of SST file unique IDs across many threads exposed a hardware bug: the RDSEED instruction on a newer AMD CPU sometimes returned 0 while reporting success, but only on some cores and only under memory load. The failure appeared only through libstdc++'s std::random_device, not through rdrand, /dev/urandom or libc++. It was reproduced by scaling the thread count to roughly the core count, and was mitigated with a Linux kernel patch that marks RDSEED unavailable, followed by an AMD microcode update tracked as a high-severity CVE. The takeaways are to test what you depend on, combine redundant entropy sources, and add sanity checks, because even CPUs can be wrong.
- Improving Firefox stability on Linux
Mozilla Hacks mediumAdeptMozilla went from being able to symbolicate under 20% of Linux Firefox crash reports to over 99% by scraping debug information for distro-packaged Firefox builds and their dependencies (GTK, Mesa, fontconfig, SQLite, etc.) from Arch, Debian, Fedora, OpenSUSE and Ubuntu repositories. The scripts convert that debug info into Breakpad symbol files, which the Socorro crash processor uses to turn minidumps into readable stack traces. With those traces the team caught distro-specific regressions such as a Debian fontconfig backport bug within days and sent fixes upstream to Mesa, GTK and glib. The crash analysis tooling was also rewritten in Rust on top of Sentry's crates, making it much faster and lighter on memory.
- Fuzzing rust-minidump for Embarrassment and Crashes – Part 2
Mozilla Hacks mediumAdeptFuzzing rust-minidump with cargo-fuzz and libfuzzer turned up a series of real bugs in a Rust rewrite of Breakpad's minidump processor that had otherwise shipped cleanly. They include an ARM64 stackwalker infinite loop that grew backtraces until OOM, a flipped comparison that silently emptied the MinidumpLinuxMaps RangeMap, OOMs from Vec::with_capacity on untrusted list lengths, and several integer overflows. The OOM fix checks that the remaining section bytes can actually hold the claimed item count, which bounds reservations to O(n) in the dump size. Rust's debug-build overflow panics and liberal assertions made each bug deterministically reproducible as a tiny checked-in test, and well-scoped issue reports with fixes made the fuzzing contributions genuinely useful to maintainers.
- Everything Is Broken: Shipping rust-minidump at Mozilla – Part 1
Mozilla Hacks mediumAdeptrust-minidump, a pure-Rust replacement for the minidump-processing half of Google Breakpad, has been Firefox's crash-processing backend for six months, running in about half the time of Breakpad and appearing more reliable. Part 1 covers what minidumps are and why Breakpad's permissive, multi-platform C++ parser became painful to maintain. It also explains why stackwalking over corrupted crash state is heuristic and error-prone. The bulk describes the testing strategy built before fuzzing exposed bugs: a synthetic minidump generator that deliberately shares no layout code with the parser, integration tests on real dumps, insta snapshot tests guarding the stable JSON output, and stackwalker unit tests.
- The case of the vanishing CPU: A Linux kernel debugging story
ClickHouse hardMaster
Intermittent, indefinite CPU saturation of ClickHouse Cloud pods, seen only on GCP, turned out to be a Linux kernel memory-management livelock. Pods sat just under their cgroup memory limit while every CPU spun in shrink_lruvec during memcg reclaim triggered by page-cache readahead on page faults. The investigation used gdb backtraces, bpftrace syscall latency histograms, perf top/stat, pidstat and an on-call runbook to reach a reproducible test case and a kernel fix, after which another kernel bug surfaced. One lesson along the way: signal-based user-space stack traces hide kernel time entirely, so gdb backtraces pointed the team at the wrong code.