rr-debugger / rr-debugger/rr

Possible issue with running rr with newer kernel, Debian 7.1.3-1~bpo13+1.

Open
#4,093 6 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

Trying to run the tests with current git @ 5c202cd8cb6 I found following started to fail.

ptrace_breakpoint
jit_proc_mem
record_replay

Going back to the commit @ a009e7e738, where these tests were working, unfortunately showed today the same issue.
The system is a Debian 13 Trixie with a 7.1.3-1~bpo13+1 kernel from backports.

Last month when above tests were running fine @ a009e7e738 I was running a 7.0.13-1~bpo13+1 kernel.

A test inside a minimal Debian 13 Trixie VM with stock kernel 6.12.101+deb13 showed the test "ptrace_breakpoint" working,
booting the exact same VM also with the backports kernel 7.1.3-1~bpo13+1 shows also the test failure @ a009e7e738, see below details.

Therefore my assumption this may be an issue when running a kernel 7.1.

Anyone else also seeing this issue?

benutzer@debian:.../obj$ ctest -j1 --verbose --tests-regex '^ptrace_breakpoint$'
UpdateCTestConfiguration  from :.../obj/DartConfiguration.tcl
UpdateCTestConfiguration  from :.../obj/DartConfiguration.tcl
Test project .../obj
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 585
    Start 585: ptrace_breakpoint

585: Test command: /usr/bin/bash "source_dir/src/test/basic_test.run" "ptrace_breakpoint" "" "bin_dir" "120"
585: Working Directory: .../obj
585: Test timeout computed to be: 10000000
585: source_dir/src/test/util.sh: line 284:  1220 Aborted                 _RR_TRACE_DIR="$workdir" test-monitor $TIMEOUT record.err $RR_EXE $GLOBAL_OPTIONS record --bind-to-cpu=any $LIB_ARG $RECORD_ARGS "$exe" $exeargs > record.out 2> record.err
585: Test 'ptrace_breakpoint' FAILED: : token 'EXIT-SUCCESS' not in record.out:
585: --------------------------------------------------
585: FAILED at src/test/ptrace_breakpoint.c:47: !(bkpt_size == pwrite(mem_fd, breakpoint_instruction, bkpt_size, (uintptr_t)breakpoint)) errno:5 (Input/output error)
585: --------------------------------------------------
585: Test ptrace_breakpoint failed, leaving behind /tmp/rr-test-ptrace_breakpoint-u7Nakxqgw
585: To replay the failed test, run
585:   _RR_TRACE_DIR=/tmp/rr-test-ptrace_breakpoint-u7Nakxqgw rr replay
1/1 Test #585: ptrace_breakpoint ................***Failed  Error regular expression found in output. Regex=[FAILED]  0.21 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   0.33 sec

The following tests FAILED:
        585 - ptrace_breakpoint (Failed)
Errors while running CTest
Output from these tests are in: .../obj/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
benutzer@debian:.../obj$ 

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

Reproduce the failure with ctest --tests-regex '^ptrace_breakpoint$' and compare the Debian 13 stock and backports kernels. Start with src/test/ptrace_breakpoint.c and src/test/util.sh, using the reported pwrite errno and the ptrace_breakpoint, jit_proc_mem, and record_replay tests as evidence. Done means the affected tests pass on the newer kernel or the incompatibility is clearly characterized.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, debian, linux
Domain
operating-systems, reverse-engineering, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.