---
title: "Reverse debugging at scale"
description: "Meta continuously records Intel Processor Trace (Intel PT) data for all running processes in production, keeping it in a bounded circular buffer."
url: "https://swe.quest/articles/reverse-debugging-at-scale-38ad4795201fdcca"
canonical: "https://engineering.fb.com/2021/04/27/developer-tools/reverse-debugging/"
source: "Meta Engineering"
published: "2021-04-27"
difficulty: "hard"
kind: "Case study"
reading_minutes: 7
tags: ["debugging","developer-tools","hardware","linux","performance"]
---

# Reverse debugging at scale

A post on [Meta Engineering](https://swe.quest/sources/meta.md), published 2021-04-27, 7 min read, Case study. Original: [https://engineering.fb.com/2021/04/27/developer-tools/reverse-debugging/](https://engineering.fb.com/2021/04/27/developer-tools/reverse-debugging/)

## Summary

Meta continuously records Intel Processor Trace (Intel PT) data for all running processes in production, keeping it in a bounded circular buffer. An eBPF kernel probe notifies the collector within milliseconds of a crash, so the crashed process's trace is saved before other processes overwrite it. Traces and binaries are stored for offline analysis, where an LLDB plugin decodes taken and not-taken branches against the binary, symbolicates the executed instructions, and builds a function call tree that makes reverse-step-over and reverse breakpoints cheap. The same timestamped traces also support latency analysis that sampled call stacks miss, with visualization planned for Meta's Tracery tool and VSCode.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Debugging](https://swe.quest/tags/debugging.md) (Engineering practices)
- [Developer tools](https://swe.quest/tags/developer-tools.md) (Engineering practices)
- [Hardware](https://swe.quest/tags/hardware.md) (Infrastructure)
- [Linux](https://swe.quest/tags/linux.md) (Infrastructure)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)

## Prerequisites

- debugger concepts
- CPU instruction tracing ([easy posts on Hardware](https://swe.quest/tags/hardware.md?difficulty=easy))
- eBPF basics ([easy posts on Linux](https://swe.quest/tags/linux.md?difficulty=easy))

## Keywords

Intel Processor Trace, LLDB, eBPF, Tracery, VSCode, reverse debugging

## Related posts

- [Magic-trace: Diagnosing tricky performance issues easily with Intel Processor Trace](https://swe.quest/articles/magic-trace-diagnosing-tricky-performance-issues-easily-with-intel-processor-bf89d988f02b1230.md): Jane Street Tech Blog · 2022-01-11 · Hard · 14 min read · Performance engineering, Hardware, Linux, Debugging, Functional programming
  Magic-trace is an open-source tool that uses Intel Processor Trace in circular-buffer mode to capture roughly the last 10ms of execution before a chosen function call, then renders every function call on a nanosecond-resolution timeline in a forked Perfetto UI.
- [Strobelight: A profiling service built on open source technology](https://swe.quest/articles/strobelight-a-profiling-service-built-on-open-source-technology-6a094fead0e4b62a.md): Meta Engineering · 2025-01-21 · Medium · 12 min read · Performance engineering, Observability, Linux, Cost optimization, Compilers
  Strobelight is Meta's fleet-wide profiling orchestrator, running 42 profilers (mostly eBPF-based, plus ad-hoc bpftrace scripts) on every production host with safeguards against PMU counter conflicts, concurrency limits and queuing.
- [Improving Firefox stability on Linux](https://swe.quest/articles/improving-firefox-stability-on-linux-d17615a93e9d8285.md): Mozilla Hacks · 2021-05-19 · Medium · 6 min read · Debugging, Linux, Observability, Open source, Rust
  Mozilla 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 case of the vanishing CPU: A Linux kernel debugging story](https://swe.quest/articles/the-case-of-the-vanishing-cpu-a-linux-kernel-debugging-story-3db1aa1b81ec8319.md): ClickHouse · 2025-03-05 · Hard · 32 min read · Linux, Memory management, Debugging, Performance engineering, Incidents & postmortems
  Intermittent, indefinite CPU saturation of ClickHouse Cloud pods, seen only on GCP, turned out to be a Linux kernel memory-management livelock.
- [Trace similarity systems on top of ClickHouse to analyze crash stack traces from our CI](https://swe.quest/articles/trace-similarity-systems-on-top-of-clickhouse-to-analyze-crash-stack-traces-c60df248c0d43431.md): ClickHouse · 2025-09-24 · Medium · 9 min read · Debugging, CI/CD, SQL, Algorithms, Testing
  ClickHouse built a crash-deduplication pipeline for its CI that groups similar stack traces from fuzzing, stress and functional tests using the TraceSim similarity method, implemented almost entirely in ClickHouse SQL.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
