Problems in Subprocesses of Tracees

Jun Inoue jun.lambda at gmail.com
Wed Dec 6 04:45:14 UTC 2017


Hi there!  I'm having trouble with rr barfing on a subprocess of a
tracee, which is called rtcd.
Recording seems to go fine, but during replay I get "Assertion
`ticks_now == trace_ticks' failed to hold" (more details at the end of
this email).  The snag is that rr then suggests me to attach gdb to
/sbin/ifconfig, rather than rtcd - it's a subprocess of rtcd, and not
rtcd itself that rr is barfing on.

Now, /sbin/ifconfig seems to be one of those programs that use shared
memories to communicate with the outside world, so I want to prevent
rtcd from monitoring this subprocess at all.  AFAIK all communications
between rtcd and ifconfig happen through pipes, so this shouldn't
affect rr's ability to replay.  Is there a way to do this?

I'm running rtcd on a real-time kernel 4.4.53-rt66 and rr
b62091519ce97a3e868fb1bb2b5de6ef6711a715 with the following
modification to CMakeLists.txt:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c1d4260..03d1e74 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -126,7 +126,7 @@ if(${CAPNP} STREQUAL "CAPNP-NOTFOUND")
 endif()

 set(REQUIRED_LIBS
-  capnp
+#  capnp
 )

 foreach(required_lib ${REQUIRED_LIBS})
@@ -475,7 +475,7 @@ if(staticlibs)
   # a way to persuade pkg-confing/pkg_check_modules to produce the right flags
   target_link_libraries(rr -l:libcapnp.a -l:libkj.a)
 else()
-  target_link_libraries(rr ${CAPNP_LDFLAGS})
+  target_link_libraries(rr capnp kj ${CAPNP_LDFLAGS})
 endif()

 target_link_libraries(rrpreload


More detailed error message:

[FATAL /home/hrp5puser/src/rr/src/ReplaySession.cc:940:check_ticks_consistency()]
 (task 17385 (rec:24642) at time 1816)
 -> Assertion `ticks_now == trace_ticks' failed to hold. ticks
mismatch for 'PATCH_SYSCALL'; expected 113276, got 114870
=== Start rr backtrace:
rr(_ZN2rr13dump_rr_stackEv+0x28)[0x5486c8]
rr(_ZN2rr9GdbServer15emergency_debugEPNS_4TaskE+0x425)[0x48a295]
rr(_ZN2rr21EmergencyDebugOstreamD2Ev+0xd6)[0x495ce6]
rr(_ZN2rr13ReplaySession23check_ticks_consistencyEPNS_10ReplayTaskERKNS_5EventE+0x16d)[0x4f73bd]
rr(_ZN2rr13ReplaySession11replay_stepERKNS0_15StepConstraintsE+0x42b)[0x4fcb5b]
rr(_ZN2rr14ReplayTimeline19replay_step_forwardENS_10RunCommandEl+0xc2)[0x512182]
rr(_ZN2rr9GdbServer14debug_one_stepERNS_10GdbRequestE+0xe20)[0x488910]
rr(_ZN2rr9GdbServer12serve_replayERKNS0_15ConnectionFlagsE+0x4c0)[0x489ad0]
rr[0x4f27aa]
rr(_ZN2rr13ReplayCommand3runERSt6vectorISsSaISsEE+0x7cb)[0x4f3f4b]
rr(main+0x1bf)[0x55163b]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7f230ec17f45]
rr[0x44011f]
=== End rr backtrace
Launch gdb with
  gdb '-l' '10000' '-ex' 'set sysroot /' '-ex' 'target extended-remote
127.0.0.1:17385' /sbin/ifconfig

-- 
Jun Inoue


More information about the rr-dev mailing list