'when' command crashes sometimes #1653

Closed
bgirard opened this Issue Feb 20, 2016 · 5 comments

Projects

None yet

2 participants

@bgirard
Contributor
bgirard commented Feb 20, 2016
(rr) when
Traceback (most recent call last):
  File "<string>", line 51, in invoke
  File "<string>", line 60, in rr_cmd
gdb.error: Remote connection closed
Error occurred in Python command: Remote connection closed

Taking a look at what this might be. Perhaps 't' can be null and we're crashing there?

@bgirard
Contributor
bgirard commented Feb 20, 2016

Crash is coming from 't->current_trace_frame()'

@bgirard
Contributor
bgirard commented Feb 20, 2016
Task::current_trace_frame (this=0x4547620) at /home/bgirard/rr/src/task.cc:1487
1487      return replay_session().current_trace_frame();
(gdb) s
Task::replay_session (this=0x4547620) at /home/bgirard/rr/src/task.cc:664
664 ReplaySession& Task::replay_session() const { return *session().as_replay(); }
(gdb)
Task::session (this=0x4547620) at /home/bgirard/rr/src/task.h:826
826   Session& session() const { return *session_; }
(gdb)
Session::as_replay (this=0x4546290) at /home/bgirard/rr/src/Session.h:186
186   virtual ReplaySession* as_replay() { return nullptr; }
(gdb)
ReplaySession::current_trace_frame (this=0x0) at /home/bgirard/rr/src/ReplaySession.h:182
182   const TraceFrame& current_trace_frame() const { return trace_frame; }

So we're calling as_replay() on something that doesn't implement it and we SIGSEGV on nullptr.

@rocallahan
Contributor

GdbServer::diverter_process_debugger_requests probably needs to exit the diversion when a custom command is received.

@bgirard
Contributor
bgirard commented Feb 20, 2016

That must be it. In my STR I call

break 'nsDisplayList::PaintRoot(nsDisplayListBuilder*, nsRenderingContext*, unsigned int)'
cont
call nsFrame::PrintDisplayList(aBuilder, *this, false)
when

when reproducing. The call must be causing the diversion.

@bgirard
Contributor
bgirard commented Feb 21, 2016

PR merged

@bgirard bgirard closed this Feb 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment