rr-debugger / rr-debugger/rr

Rework trace storage

Open
#1,916 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10.7k
Forks
662
Avg merge
2d 3h
Merged PRs (30d)
2

Description

The current trace storage approach has some issues that we need to fix:

  • Traces are written directly by the rr process and buffered data is not always flushed, so SIGKILL directed at the rr process (not uncommon, when rr is used as a wrapper around some program that normally is SIGKILLed by other code, e.g. on timeout) leaves an unusable trace.
  • rr must finish writing a trace before anything can start consuming the trace. If we fixed this then you could start an rr replay concurrently with an rr record and be ready to debug as soon as an error is encountered instead of having to wait for the replay.
  • There is no currently way to efficiently package a trace for copying or streaming to another machine for replay.
  • Currently trace versioning is very primitive and there is no way for rr replay to consume trace versions other than the 'current' version.

On the other hand it has some important features we need to preserve:

  • We avoid copying data by hardlinking and FICLONERANGEing files into the trace directory.
  • Certain data records like memory-maps and trace-events are stored in their own files so tools can efficiently read those records without having to scan the whole trace.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are identified in the issue. Start by locating the trace-writing and replay paths, then compare their behavior with the requirements for crash resilience, concurrent consumption, packaging, and version compatibility. Done means a concrete storage design preserves hardlinking, FICLONERANGE, and efficient record access.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
devtools, operating-systems
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.