rr-debugger / rr-debugger/rr

Crash on "bt" with a recording of a SIGSEGV (from stack exhaustion)

Open
#3,442 1 comment 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 debugging with rr version 5.6.0 and GNU gdb (GDB) Fedora Linux 12.1-7.fc37, I encounter the following crash while generating a backtrace:

[FATAL src/AutoRemoteSyscalls.cc:551:child_recvmsg() errno: EIO]
 (task 609 (rec:423) at time 0)
 -> Assertion `errno == ESRCH' failed to hold.
=== Start rr backtrace:
rr(_ZN2rr9GdbServer15emergency_debugEPNS_4TaskE+0x11e)[0x4a1fee]
rr[0x4b484d]
rr[0x4b54ab]
rr[0x462839]
rr(_ZN2rr18AutoRemoteSyscalls27infallible_send_fd_if_aliveERKNS_8ScopedFdE+0xfd)[0x45c0fd]
rr(_ZN2rr7Session18create_shared_mmapERNS_18AutoRemoteSyscallsEmNS_10remote_ptrIvEEPKciiOSt10shared_ptrINS_21MonitoredSharedMemoryEE+0x14a)[0x5705fa]
rr(_ZN2rr12AddressSpace13post_vm_cloneEPNS_4TaskE+0x89)[0x45d379]
rr(_ZN2rr4Task13post_vm_cloneENS0_11CloneReasonEiPS0_+0x4f)[0x5882ef]
rr(_ZN2rr4Task5cloneENS0_11CloneReasonEiNS_10remote_ptrIvEES3_NS2_IiEEiijPNS_7SessionESt10shared_ptrINS_7FdTableEES7_INS_11ThreadGroupEE+0x2bc)[0x58ce2c]
rr(_ZN2rr4Task8os_cloneENS0_11CloneReasonEPNS_7SessionERNS_18AutoRemoteSyscallsEijjSt10shared_ptrINS_7FdTableEES6_INS_11ThreadGroupEENS_10remote_ptrIvEENSB_IiEESC_SD_+0x2cc)[0x58f06c]
rr(_ZN2rr4Task12os_fork_intoEPNS_7SessionESt10shared_ptrINS_7FdTableEE+0x8b)[0x58b25b]
rr(_ZN2rr7Session13copy_state_toERS0_RNS_5EmuFsES3_+0x6a5)[0x576665]
rr(_ZN2rr13ReplaySession15clone_diversionEv+0x25a)[0x53987a]
rr(_ZN2rr9GdbServer6divertERNS_13ReplaySessionE+0x145)[0x49a5f5]
rr(_ZN2rr9GdbServer25process_debugger_requestsENS0_11ReportStateE+0x23f)[0x49c69f]
rr(_ZN2rr9GdbServer14debug_one_stepERNS_10GdbRequestE+0x1a1)[0x49e751]
rr(_ZN2rr9GdbServer12serve_replayERKNS0_15ConnectionFlagsE+0x97b)[0x4a011b]
rr[0x534a3c]
rr(_ZN2rr13ReplayCommand3runERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE+0x672)[0x5359f2]
rr(main+0x1d7)[0x446527]
/lib64/libc.so.6(+0x27510)[0x7f56c20ea510]
/lib64/libc.so.6(__libc_start_main+0x89)[0x7f56c20ea5c9]
rr(_start+0x25)[0x4466a5]
=== End rr backtrace

Similar crashes occur attempting to go up. "Vanilla" gdb does not experience this issue.

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 with src/AutoRemoteSyscalls.cc:551 and the child_recvmsg() failure shown in the report, then trace how bt and up reach GdbServer::divert(). Reproduce with rr 5.6.0, Fedora GDB 12.1-7.fc37, and the affected recording if available. Done means bt and up no longer crash while vanilla GDB behavior remains unaffected.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.