rr-debugger / rr-debugger/rr

Support `rr release` command

Open
#3,879 1 comment 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

Motivation: sometimes it is desirable to make rr not track a subprocess spawned by fork+exec.

(see linux - Support in rr-debugger for not recording a subprocess? - Stack Overflow )

I think there could be two ways

  • define rr release <cmd> [args...] command that does something equivalent to the following

     if [[ "$RUNNING_UNDER_RR" == 1 ]]; then
     	rr record --nested=release env --unset=RUNNING_UNDER_RR "$@"
     else
     	"$@"
     fi
    
  • make a release-on-exec configuration that can be passed to rr record that releases a process on fork+exec. (ideally without affecting other things such as create new thread, fork without exec i.e. process spawn worker process, etc.)

The second would be more convenient, but the first would be more flexible, assume the user can modify and recompile the process.

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

Compare the proposed rr release <cmd> [args...] wrapper with the release-on-exec configuration for rr record, including the shown RUNNING_UNDER_RR and --nested=release behavior. Choose and specify one approach, then verify that a forked-and-execed subprocess is released without changing other process behavior.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.