python / python/devguide

Guide for using RR with CPython

Open
#1,283 0 comments 6 reactions 1 assignee View on GitHub

@colesbury is already working on this.

Since Mar 1, 2024.

type-feature
Dominant language
Python
Stars
2.1k
Forks
1k
Avg merge
2d 12h
Merged PRs (30d)
12

Description

rr is a record & replay debugging tool. I've found it particularly helpful for debugging multiprocessing issues, free-threading bugs, and non-deterministic crashes.

@ericsnowcurrently suggested adding a devguide entry for how to use rr specifically for CPython development. That seems like a good idea to me.

Here are some topics I think are worth covering:

  • How to install rr? The OS provided packages (e.g., Ubuntu) are often out-of-date and may not work well with some CPython test suites or new CPUs. The latest release on GitHub is much better: https://github.com/rr-debugger/rr/releases/
  • How to use rr for multiprocessing? (rr replay -p pid or rr replay -f pid)
  • How to use rr for multi-threading issues?
  • How to use rr to track down intermittent crashes? (Roughly, record lots of traces until you find a crasher).

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.