LLMpediaThe first transparent, open encyclopedia generated by LLMs

rr (software)

Generated by GPT-5-mini
Note: This article was automatically generated by a large language model (LLM) from purely parametric knowledge (no retrieval). It may contain inaccuracies or hallucinations. This encyclopedia is part of a research project currently under review.
Article Genealogy
Parent: GDB Hop 4
Expansion Funnel Raw 39 → Dedup 0 → NER 0 → Enqueued 0
1. Extracted39
2. After dedup0 (None)
3. After NER0 ()
4. Enqueued0 ()
rr (software)
Namerr
DeveloperMozilla Corporation, Linux Foundation contributors
Released2013
Programming languageC++, Python
Operating systemLinux
GenreDebugger, Software development tool
LicenseMPL 2.0

rr (software) rr is an open-source record-and-replay debugger for Linux designed to capture and deterministically replay execution of user-space applications. It enables developers to record a program run including interrupts, signals, and system-call results, then replay the execution for detailed debugging and analysis. rr integrates with GNU Debugger-compatible tools to provide reversible debugging and precise failure reproduction.

Overview

rr implements lightweight deterministic recording of single-threaded and multithreaded applications on x86-64 Linux kernel systems, capturing nondeterministic inputs such as scheduling, asynchronous events, and I/O. The project focuses on reproducibility so that developers can investigate crashes reported from environments like Mozilla Firefox, Chromium, or continuous integration systems with tools such as GDB and Valgrind-style diagnostics. Its design emphasizes minimal runtime overhead, compact trace files, and ease of integration with existing open-source toolchains.

History and Development

rr was initially developed at Mozilla Corporation to improve debugging of complex projects including Firefox and related open-source software. Early work drew on prior research from academic projects in deterministic replay such as efforts at Stanford University and the University of California, Berkeley. Over time, contributions came from individual engineers and organizations involved in Linux tooling and performance engineering, with guidance influenced by standards and practices from projects like GNU Project and LLVM-related ecosystems. The project matured through iterative releases, community patches, and integration with mainstream debuggers used by teams at Ubuntu and other distributions.

Features and Architecture

rr records user-space execution by intercepting system calls and scheduling decisions via the ptrace interface and kernel interfaces on x86-64 processors, storing results in an on-disk trace that encodes memory, register state, and asynchronous events. Its architecture includes a recorder process, a compact trace format, and a deterministic replay engine that provides reverse-execution primitives compatible with GDB breakpoints and watchpoints. rr supports recording of signals, file-descriptor data, and shared-memory interactions, and integrates with symbol-resolution tools used by GNU Binutils and DWARF debugging information. The tool prioritizes fidelity to the original run, using techniques similar to those described in papers from EuroSys and USENIX conferences.

Usage and Workflow

Typical usage begins by invoking rr to record a session for a target binary, which captures a complete execution trace including interactions with system libraries such as glibc and external services. Users then launch rr’s replay mode to step forward and backward through the program with familiar commands from GDB such as step, next, and continue, enabling deterministic replay of failure conditions observed in environments like Continuous Integration pipelines. Workflows commonly include recording failing tests on platforms such as Jenkins or GitLab CI and shipping trace files to developers for local diagnosis, or integrating rr into bug reports used by projects like Mozilla and other large-scale software teams.

Performance and Limitations

rr achieves low overhead for many workloads by avoiding heavy-weight snapshotting and by compressing trace data, but performance varies with I/O intensity, thread contention, and use of non-deterministic kernel features introduced by Linux kernel versions. Limitations include reliance on specific CPU architectures (primarily x86-64), constraints with certain kernel features like hardened seccomp filters, and challenges around recording privileged or kernel-mode execution such as device drivers used by Linux kernel development. Multicore parallelism is recorded by serializing thread execution, which can affect timing-sensitive performance characteristics; this design is a trade-off to guarantee deterministic replay as discussed in publications from ACM and IEEE workshops.

Adoption and Community

rr is used by engineers at organizations including Mozilla Corporation, independent contributors, and teams maintaining large C/C++ codebases such as projects hosted on GitHub and GitLab. The community engages via issue trackers and mailing lists common to open-source projects, contributing patches, test cases, and documentation improvements. rr’s development benefits from collaboration with upstream Linux maintainers, debugger projects like GDB, and distribution maintainers from Debian and Ubuntu, resulting in bug fixes, portability patches, and integration into developer workflows across multiple institutions.

Category:Debuggers Category:Free software programmed in C++