rr-debugger / rr-debugger/rr

RR crash in PerfCounters::read_ticks

Open
#2,615 13 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

In a multithreaded program, rr record crashes randomly (and passes sometimes too) with following stack trace
Please let me know for any ideas/suggestions?

rr(rr::dump_rr_stack()+0x3b)[0x5f229b]
rr(rr::GdbServer::emergency_debug(rr::Task*)+0x325)[0x504d95]
rr[0x513c64]
rr(rr::PerfCounters::read_ticks(rr::Task*)+0x11d)[0x52f8fd]
rr(rr::Task::did_waitpid(rr::WaitStatus)+0x19f)[0x5d26bf]
rr(rr::Task::wait(double)+0x48f)[0x5d341f]
rr(rr::Scheduler::reschedule(rr::Switchable)+0x14f)[0x5b436f]
rr(rr::RecordSession::record_step()+0xdc)[0x5400ec]
rr(rr::RecordCommand::run(std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > >&)+0x1011)[0x535e21]
rr(main+0x353)[0x4ac743]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f4ee24ee6e5]

uname -a:
Linux lxserv01 4.4.73-5-default #1 SMP Tue Jul 4 15:33:39 UTC 2017 (b7ce4e4) x86_64 x86_64 x86_64 GNU/Linux

rr --version
rr version 5.3.0

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 PerfCounters::read_ticks and its caller Task::did_waitpid, then inspect the recording path through Scheduler::reschedule and RecordSession::record_step. Reproduce the multithreaded crash on the reported Linux 4.4.73 environment and determine a fix that lets rr record complete reliably without the emergency stack dump.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.