Assertion failure after deleting watchpoint and continuing
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.7k
- Forks
- 662
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 2
Description
Output manually reformatted as GDB TUI mode was active during the crash and messed it up. rr built from master with -DCMAKE_BUILD_TYPE=Release, commit f4d41acfe876d6707356b237e76149509f77fe60.
[FATAL src/Task.cc:3299:write_bytes_helper_no_notifications() errno: EIO] (task 1008528 (rec:999676) at time 0)
-> Assertion `nwritten == buf_size' failed to hold. Should have written 1 bytes to 0x7ffdcc8b6f7f, but only wrote -1
=== Start rr backtrace:
rr(_ZN2rr13dump_rr_stackERNS_8ScopedFdE+0x2c) [0x55dd28dbc08c]
rr(_ZN2rr15emergency_debugEPNS_4TaskE+0x12c) [0x55dd28c9d46c]
rr(+0xe33c5) [0x55dd28ca03c5]
rr(+0xe4d1f) [0x55dd28ca1d1f]
rr(+0xe4d4d) [0x55dd28ca1d4d]
rr(_ZN2rr4Task35write_bytes_helper_no_notificationsENS_10remote_ptrIvEElPKvPbj+0x2ca) [0x55dd28d8cd2a]
rr(+0x21caee) [0x55dd28dd9aee] rr(_ZN2rr9GdbServer25dispatch_debugger_requestERNS_7SessionERKNS_10GdbRequestENS0_11ReportStateE+0x1047) [0x55dd28c78f87]
rr(_ZN2rr9GdbServer34diverter_process_debugger_requestsERNS_16DiversionSessionERjPNS_10GdbRequestE+0x5c2) [0x55dd28c7ba12]
rr(+0x21ecb2) [0x55dd28ddbcb2]
rr(_ZN2rr9GdbServer25process_debugger_requestsENS0_11ReportStateE+0x6da) [0x55dd28c7d83a]
rr(_ZN2rr9GdbServer14debug_one_stepERNS_10GdbRequestE+0x279) [0x55dd28c84429] rr(_ZN2rr9GdbServer12serve_replayESt10shared_ptrINS_13ReplaySessionEERKNS0_6TargetEPVbNS_12DebuggerTypeERKNS0_15ConnectionFlagsE+0xc2f) [0x55dd28c8680f]
rr(_ZN2rr13ReplayCommand3runERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE+0x158e) [0x55dd28d29f5e]
rr(main+0x1a0) [0x55dd28c0d620]
/lib/x86_64-linux-gnu/libc.so.6(+0x29ca8) [0x7fe09f637ca8]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85) [0x7fe09f637d65]
rr(_start+0x21) [0x55dd28c0ee81]
=== End rr backtrace
Launch debugger with
'gdb' '-l' '10000' '-ex' 'set sysroot /' '-ex' 'target extended-remote 127.0.0.1:25488' '/opt/emumodem/bin/ds'
Unfortunately this happened while debugging proprietary software at work and I therefore can't provide a trace or rr coredump.
This happened on Debian Trixie running in a distrobox on kernel 6.15.4-200.fc42.x86_64 on a AMD Ryzen 5 PRO 4650U.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/Task.cc:3299 in write_bytes_helper_no_notifications() and follow the debugger request path named in the backtrace, including GdbServer::dispatch_debugger_request(). Use the deleted-watchpoint-and-continue sequence and the provided debugger launch command as context, but note that no trace or rr coredump is available. Done means explaining and preventing the assertion failure, then verifying that this sequence no longer crashes.
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
- Needs clarification
- Newbie friendliness
- 25/100