Rework trace storage
Open
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
SIGKILLdirected at the rr process (not uncommon, when rr is used as a wrapper around some program that normally isSIGKILLed 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 replayconcurrently with anrr recordand 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 replayto 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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