rr-debugger / rr-debugger/rr

Cannot insert breakpoint, cannot access memory

Open
#2,275 8 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

Sometimes, I do something that puts rr into a state where any attempt to step forward results in this:

Warning:
Cannot insert breakpoint -12.
Cannot access memory at address 0x7f74079ca0b0

I'm not exactly sure what I'm doing, but I have a trace where the bug can be consistently reproduced, and I've uploaded it here: https://tbodt.com/shits/rr-repro.tar.gz. Here's a log of me reproducing the bug using that trace:

Reading symbols from /home/tbodt/ish/build/ish-44/mmap_pack_7_ish...done.
Remote debugging using 127.0.0.1:21677
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
0x00007f740ccfd000 in _start () from /lib64/ld-linux-x86-64.so.2
=> 0x00007f740ccfd000 <_start+0>:	48 89 e7	mov    %rsp,%rdi
(rr) c
Continuing.
[New Thread 19923.19925]
[New Thread 19923.19924]

Thread 1 received signal SIGSEGV, Segmentation fault.
0x00007f740ccb425f in raise () from /usr/lib/libpthread.so.0
=> 0x00007f740ccb425f <raise+271>:	48 8b 8c 24 08 01 00 00	mov    0x108(%rsp),%rcx
(rr) b sys_brk
Breakpoint 1 at 0x5577933877e6: file ../kernel/mmap.c, line 94.
(rr) rc
Continuing.

Thread 1 received signal SIGSEGV, Segmentation fault.
0x00007f740ccb425f in raise () from /usr/lib/libpthread.so.0
=> 0x00007f740ccb425f <raise+271>:	48 8b 8c 24 08 01 00 00	mov    0x108(%rsp),%rcx
(rr) rc
Continuing.

Thread 1 hit Breakpoint 1, sys_brk (new_brk=1448902656) at ../kernel/mmap.c:94
94	    if (new_brk != 0) {
(rr) rc
Continuing.
[New Thread 19923.19925]
[Switching to Thread 19923.19925]

Thread 4 hit Breakpoint 1, sys_brk (new_brk=1448833024) at ../kernel/mmap.c:94
94	    if (new_brk != 0) {
(rr) n
Warning:
Cannot insert breakpoint -12.
Cannot access memory at address 0x7f74079ca0b0

Command aborted.

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

Download the rr-repro.tar.gz trace and reproduce the failure using the command sequence in the issue, including the sys_brk breakpoint and next command. Start by inspecting rr's breakpoint insertion and memory-access handling around this replay state. Done means stepping forward no longer aborts with the breakpoint -12 and inaccessible-memory warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.