`rr replay` fails with "Unknown debugger request 35"

Open
#3,269 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start at src/GdbServer.cc, especially dispatch_debugger_request() around the reported failure at line 806, and reproduce the problem with rr replay and the supplied GDB versions. Trace how debugger request 35 is received and handled. Done means the reported replay session no longer aborts with "Unknown debugger request 35" and the GDB connection remains usable.

Written by the indexing model from the issue text.

Description

Freshly built gdb from 8e2de6c81a90e98ed95dfc0ffef1e3df9cfff6b7:

froydnj@pyro:~/src/sorbet$ ../rr/bin/rr record bazel-bin/main/sorbet-orig --silence-dev-message --store-state bazel-out/k8-dbg/bin/payload/binary/state-payload-raw --no-error-count                              
rr: Saving execution to trace directory `/home/froydnj/.local/share/rr/sorbet-orig-3'.
Illegal instruction
froydnj@pyro:~/src/sorbet$ ../rr/bin/rr replay -d ~/gdb/bin/gdb
GNU gdb (GDB) 13.0.50.20220614-git
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/froydnj/.local/share/rr/sorbet-orig-3/mmap_hardlink_3_sorbet-orig...
Really redefine built-in command "restart"? (y or n) [answered Y; input not from terminal]
Really redefine built-in command "jump"? (y or n) [answered Y; input not from terminal]
Remote debugging using 127.0.0.1:9092
Reading symbols from /lib64/ld-linux-x86-64.so.2...
(No debugging symbols found in /lib64/ld-linux-x86-64.so.2)
BFD: warning: system-supplied DSO at 0x6fffd000 has a section extending past end of file
[FATAL /home/froydnj/src/rr/src/GdbServer.cc:806:dispatch_debugger_request()] Unknown debugger request 35
=== Start rr backtrace:
../rr/bin/rr(_ZN2rr13dump_rr_stackEv+0x35)[0x5588a2618042]
../rr/bin/rr(_ZN2rr15notifying_abortEv+0x12)[0x5588a2617fc9]
../rr/bin/rr(_ZN2rr12FatalOstreamD1Ev+0x30)[0x5588a2482cd2]
../rr/bin/rr(_ZN2rr9GdbServer25dispatch_debugger_requestERNS_7SessionERKNS_10GdbRequestENS0_11ReportStateE+0x24aa)[0x5588a244ab9c]
../rr/bin/rr(_ZN2rr9GdbServer25process_debugger_requestsENS0_11ReportStateE+0x42f)[0x5588a244ce9b]
../rr/bin/rr(_ZN2rr9GdbServer14debug_one_stepERNS_10GdbRequestE+0x172)[0x5588a244d9dc]
../rr/bin/rr(_ZN2rr9GdbServer12serve_replayERKNS0_15ConnectionFlagsE+0x52c)[0x5588a24502bc]
../rr/bin/rr(+0x48b9a4)[0x5588a25619a4]
../rr/bin/rr(_ZN2rr13ReplayCommand3runERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE+0x3cd)[0x5588a2562357]
../rr/bin/rr(main+0x26c)[0x5588a263266b]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7f7fc50902e1]
../rr/bin/rr(_start+0x2a)[0x5588a23b0d5a]
=== End rr backtrace
Remote connection closed

...followed by GDB falling over, which I assume is not the real problem here.

The same thing happens with GDB 7.12 (yes, yes, ancient GDB...).

Let me know if you need anything else.

Dominant language
C++
Stars
10.7k
Forks
662
Avg merge
2d 3h
Merged PRs (30d)
2

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.

More from rr-debugger/rr

All issues in rr-debugger/rr

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.