Assertion `t->child_sig == sig' failed to hold. Replay got unrecorded signal 16 (expecting 11)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.7k
- Forks
- 662
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 2
Description
This is happening while reverse-continuing with a watchpoint on a crash on a firefox 18 (yes, that old) build.
Full error is:
[FATAL /tmp/rr/src/ReplaySession.cc:970:emulate_deterministic_signal() errno: 0 'Success']
(task 9394 (rec:20931) at time 245168)
-> Assertion `t->child_sig == sig' failed to hold. Replay got unrecorded signal 16 (expecting 11)
The rr backtrace when this assertion happens is (as per irc request):
(gdb) bt
#0 ReplaySession::emulate_deterministic_signal (this=0xa6c7850, t=0x8adb250, sig=11, constraints=...)
at /tmp/rr/src/ReplaySession.cc:970
#1 0x0000000000636276 in ReplaySession::try_one_trace_step (this=0xa6c7850, t=0x8adb250, constraints=...)
at /tmp/rr/src/ReplaySession.cc:1370
#2 0x0000000000637172 in ReplaySession::replay_step (this=0xa6c7850, constraints=...) at /tmp/rr/src/ReplaySession.cc:1573
#3 0x00000000006441d1 in ReplayTimeline::replay_step_to_mark (this=0x7ffdd3612438, mark=..., strategy=...)
at /tmp/rr/src/ReplayTimeline.cc:447
#4 0x00000000006476f4 in ReplayTimeline::reverse_continue(std::function<bool ()>) (this=0x7ffdd3612438, interrupt_check=...)
at /tmp/rr/src/ReplayTimeline.cc:880
#5 0x0000000000649d20 in ReplayTimeline::replay_step(RunCommand, RunDirection, unsigned int, std::function<bool ()>) (
this=0x7ffdd3612438, command=RUN_CONTINUE, direction=RUN_BACKWARD, stop_at_time=0, interrupt_check=...)
at /tmp/rr/src/ReplayTimeline.cc:1227
#6 0x00000000005c94da in GdbServer::debug_one_step (this=0x7ffdd3612410, last_direction=0x7ffdd361229c)
at /tmp/rr/src/GdbServer.cc:882
#7 0x00000000005ca4a8 in GdbServer::serve_replay (this=0x7ffdd3612410, flags=...) at /tmp/rr/src/GdbServer.cc:1085
#8 0x000000000062f822 in replay (trace_dir="", flags=...) at /tmp/rr/src/ReplayCommand.cc:369
#9 0x000000000062fff2 in ReplayCommand::run (this=0x93c490 <ReplayCommand::singleton>, args=std::vector of length 0, capacity 1)
at /tmp/rr/src/ReplayCommand.cc:457
#10 0x00000000005e5d9d in main (argc=2, argv=0x7ffdd3612b18) at /tmp/rr/src/main.cc:258
roc also asked this:
<roc> another thing that'd be useful is to log in Task::resume_execution via fprintf(stderr) usage of non-zero tick_period
<roc> and enable DEBUG_TAG in GdbConnection.cc and ReplayTimeline.cc and dump the results
The corresponding output looks like the following after the reverse-continue which leads to the error:
https://gist.github.com/glandium/a745b5975616a064f40f
I tried this patch, based on what other places in the same file do:
diff --git a/src/ReplaySession.cc b/src/ReplaySession.cc
index cc028ed..f1306af 100644
--- a/src/ReplaySession.cc
+++ b/src/ReplaySession.cc
@@ -966,6 +966,11 @@ Completion ReplaySession::emulate_deterministic_signal(
is_debugger_trap(t, sig, DETERMINISTIC_SIG, UNKNOWN,
constraints)) {
return INCOMPLETE;
+ } else if (t->child_sig == PerfCounters::TIME_SLICE_SIGNAL) {
+ // This would normally be triggered by constraints.ticks_target but it's
+ // possible to get stray signals here.
+ t->child_sig = 0;
+ return INCOMPLETE;
}
ASSERT(t, t->child_sig == sig) << "Replay got unrecorded signal "
<< t->child_sig << " (expecting " << sig
It allows to go past the error, but then fail with:
[FATAL /tmp/rr/src/ReplayTimeline.cc:408:replay_step_to_mark() errno: 5 'Input/output error']
(task 4630 (rec:20931) at time 245145)
-> Assertion `current->trace_reader().time() == mark.ptr->key.trace_time' failed to hold.
[INFO log_pending_events()] (no pending events)
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 ReplaySession.cc:970, then follow the replay path through ReplayTimeline.cc:408 and the callers in ReplayTimeline.cc. Inspect Task::resume_execution for non-zero tick periods and enable the DEBUG_TAG logging requested for GdbConnection.cc and ReplayTimeline.cc; done means reverse-continue no longer hits either assertion on the reported trace.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux
- Domain
- devtools, operating-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100