rr-debugger / rr-debugger/rr

GDB protocol error when interrupting reverse execution with rr 5.2 and gdb 8.1

Open
#2,239 0 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

Occasionally, if I attempt to interrupt a reverse execution using Ctrl-C in GDB, rr seems to send a reply that is unrecognized by GDB. If I wait and allow the reverse execution to finish, I can regain control.

(rr) reverse-finish
Run till exit from #0  0x000055d40cbe9046 in stm_wbctl_add_to_ws (mask=18446744073709551615, value=94370124894352, addr=0x55d43962f488, tx=0x14afac000900) at src/stm_wbctl.h:808
warning: Invalid remote reply: 9090c541
stm_wbctl_write (mask=18446744073709551615, value=94370124894352, addr=0x55d43962f488, tx=0x14afac000900) at src/stm_wbctl.h:860
(rr)

With set debug remote 1, I see the following:

remote_pass_ctrlc called
remote_interrupt called
Sending packet: $bs#d5...Packet received: 9090c541
warning: Invalid remote reply: 9090c541

I'm not sure if this is a bug in gdb or rr, as a quick skim of the documentation for this portion of the GDB stub protocol suggests that GDB can send either 0x03, vCont, or vCtrlC, depending on the mode of execution. Since I don't see any mention of QNonStop+ in rr's qSupported response, execution seems to be in all-stop mode, which would suggest GDB should be sending 0x03.

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

No source file or test is named. Reproduce with rr 5.2 and GDB 8.1 by interrupting reverse-finish with Ctrl-C, then inspect the set debug remote 1 trace and the qSupported response against the GDB interrupt protocol. Done means Ctrl-C produces a reply GDB recognizes instead of 9090c541.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.