rr-debugger / rr-debugger/rr

Cannot continue over exec

Open
#3,656 4 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

When running a shell script which execs a binary, nothing gets printed on stdout with rr replay.

Environment

Tested on an Haswell laptop, on master and the last release

Reproducer

cat >hello-world.c <<EOF
#include <stdio.h>

int main() {
  puts("hello world");
  return 0;
}
EOF
make hello-world

cat >wrapper.sh <<EOF
#!/bin/sh
exec "./hello-world"
EOF
chmod +x wrapper.sh

rr record ./hello-world
rr replay
# hello world gets printed to stdout
rr record ./wrapper.sh
rr replay
[SNIP]
(rr) continue
# nothing

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

Start by running the provided hello-world.c and wrapper.sh reproducer with rr record and rr replay, then inspect the replay path reached by the shell script's exec. The fix is complete when rr replay prints "hello world" after continuing through the wrapper, matching direct execution.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, shell
Domain
devtools, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.