Problems in Subprocesses of Tracees

Jun Inoue jun.lambda at gmail.com
Wed Dec 6 05:23:59 UTC 2017


On Wed, Dec 6, 2017 at 2:04 PM, Robert O'Callahan <robert at ocallahan.org> wrote:
> On Wed, Dec 6, 2017 at 5:45 PM, Jun Inoue <jun.lambda at gmail.com> wrote:
>>
>> 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?
>
>
> No, we don't support detaching a tracee subprocess from recording, although
> I suppose it wouldn't be that hard in principle.
>
> I don't know of anything in /sbin/ifconfig that should cause problems. It's
> more likely it's a syscall-related issue than a shmem issue. Can you `rr
> dump -b -m -p` the trace leading up to event 1816?
>
> Rob
> --
> lbir ye,ea yer.tnietoehr  rdn rdsme,anea lurpr  edna e hnysnenh hhe uresyf
> toD
> selthor  stor  edna  siewaoeodm  or v sstvr  esBa  kbvted,t
> rdsme,aoreseoouoto
> o l euetiuruewFa  kbn e hnystoivateweh uresyf tulsa rehr  rdm  or rnea lurpr
> .a war hsrer holsa rodvted,t  nenh hneireseoouot.tniesiewaoeivatewt sstvr
> esn

I see.  Here's an excerpt of the dump from event 1800-1816.  A more
complete dump from 0-1816 is available at
https://drive.google.com/open?id=1k3Lww_oCPOY1FPfmOJDDhsrlIJ05QvbD

{
  real_time:27296.016853 global_time:1800, event:`SYSCALL: ioctl'
(state:EXITING_SYSCALL) tid:24642, ticks:92790
rax:0x0 rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x7ffe7e5bf5b0
rsi:0x8919 rdi:0x4 rbp:0x10 rsp:0x681ffe00 r8:0xfefefefefefefeff
r9:0xfefefefefeff6e6b r10:0x7ffe7e5bf5b0 r11:0x246 r12:0x4 r13:0x2
r14:0x0 r15:0x0 rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0
es:0x0 fs:0x0 gs:0x0 orig_rax:0x10 fs_base:0x7fb2e15f0740 gs_base:0x0
  { tid:24642, addr:0x7ffe7e5bf5b0, length:0x28 }
  { tid:24642, addr:0x681fee00, length:0x1000 }
}
{
  real_time:27296.016891 global_time:1801, event:`SYSCALL: ioctl'
(state:ENTERING_SYSCALL) tid:24642, ticks:92811
rax:0xffffffffffffffda rbx:0x681fffa0 rcx:0xffffffffffffffff
rdx:0x7ffe7e5bf5b0 rsi:0x891b rdi:0x4 rbp:0x10 rsp:0x681ffe00
r8:0xfefefefefefefeff r9:0xfefefefefeff6e6b r10:0x7ffe7e5bf5b0
r11:0x246 r12:0x4 r13:0x2 r14:0x0 r15:0x0 rip:0x70000002 eflags:0x246
cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0x10
fs_base:0x7fb2e15f0740 gs_base:0x0
}
{
  real_time:27296.016914 global_time:1802, event:`SYSCALL: ioctl'
(state:EXITING_SYSCALL) tid:24642, ticks:92811
rax:0x0 rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x7ffe7e5bf5b0
rsi:0x891b rdi:0x4 rbp:0x10 rsp:0x681ffe00 r8:0xfefefefefefefeff
r9:0xfefefefefeff6e6b r10:0x7ffe7e5bf5b0 r11:0x246 r12:0x4 r13:0x2
r14:0x0 r15:0x0 rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0
es:0x0 fs:0x0 gs:0x0 orig_rax:0x10 fs_base:0x7fb2e15f0740 gs_base:0x0
  { tid:24642, addr:0x7ffe7e5bf5b0, length:0x28 }
  { tid:24642, addr:0x681fee00, length:0x1000 }
}
{
  real_time:27296.016975 global_time:1803, event:`SYSCALLBUF_FLUSH'
tid:24642, ticks:104070
}
{
  real_time:27296.016979 global_time:1804, event:`SYSCALL: mmap'
(state:ENTERING_SYSCALL) tid:24642, ticks:104070
rax:0xffffffffffffffda rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x3
rsi:0x1000 rdi:0x0 rbp:0x9 rsp:0x681ffe00 r8:0xffffffff r9:0x0
r10:0x22 r11:0x246 r12:0x10b8200 r13:0x2 r14:0x0 r15:0x7ffe7e5bf3c8
rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0
gs:0x0 orig_rax:0x9 fs_base:0x7fb2e15f0740 gs_base:0x0
}
{
  real_time:27296.016980 global_time:1805, event:`SYSCALLBUF_RESET'
tid:24642, ticks:104070
}
{
  real_time:27296.017028 global_time:1806, event:`SYSCALL: mmap'
(state:EXITING_SYSCALL) tid:24642, ticks:104070
rax:0x7fb2e1613000 rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x3
rsi:0x1000 rdi:0x0 rbp:0x9 rsp:0x681ffe00 r8:0xffffffff r9:0x0
r10:0x22 r11:0x246 r12:0x10b8200 r13:0x2 r14:0x0 r15:0x7ffe7e5bf3c8
rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0
gs:0x0 orig_rax:0x9 fs_base:0x7fb2e15f0740 gs_base:0x0
  { map_file:"<ZERO>", addr:0x7fb2e1613000, length:0x1000,
prot_flags:"rw-p", file_offset:0x0, device:0, inode:0, data_file:"",
data_offset:0x0, file_size:0x1000 }
}
{
  real_time:27296.017111 global_time:1807, event:`SYSCALLBUF_FLUSH'
tid:24642, ticks:106573
}
{
  real_time:27296.017115 global_time:1808, event:`SYSCALL: mmap'
(state:ENTERING_SYSCALL) tid:24642, ticks:106573
rax:0xffffffffffffffda rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x3
rsi:0x1000 rdi:0x0 rbp:0x9 rsp:0x681ffe00 r8:0xffffffff r9:0x0
r10:0x22 r11:0x246 r12:0x0 r13:0x2 r14:0x40cb53 r15:0x10b9bf0
rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0
gs:0x0 orig_rax:0x9 fs_base:0x7fb2e15f0740 gs_base:0x0
}
{
  real_time:27296.017117 global_time:1809, event:`SYSCALLBUF_RESET'
tid:24642, ticks:106573
}
{
  real_time:27296.017141 global_time:1810, event:`SYSCALL: mmap'
(state:EXITING_SYSCALL) tid:24642, ticks:106573
rax:0x7fb2e1612000 rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x3
rsi:0x1000 rdi:0x0 rbp:0x9 rsp:0x681ffe00 r8:0xffffffff r9:0x0
r10:0x22 r11:0x246 r12:0x0 r13:0x2 r14:0x40cb53 r15:0x10b9bf0
rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0
gs:0x0 orig_rax:0x9 fs_base:0x7fb2e15f0740 gs_base:0x0
  { map_file:"<ZERO>", addr:0x7fb2e1612000, length:0x1000,
prot_flags:"rw-p", file_offset:0x0, device:0, inode:0, data_file:"",
data_offset:0x0, file_size:0x1000 }
}
{
  real_time:27296.017189 global_time:1811, event:`SYSCALLBUF_FLUSH'
tid:24642, ticks:106709
}
{
  real_time:27296.017192 global_time:1812, event:`SYSCALL: munmap'
(state:ENTERING_SYSCALL) tid:24642, ticks:106709
rax:0xffffffffffffffda rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x0
rsi:0x1000 rdi:0x7fb2e1612000 rbp:0xb rsp:0x681ffe00 r8:0x10b9cd0
r9:0x7fb2e15f0740 r10:0x22 r11:0x246 r12:0x0 r13:0x7ffe7e5bf563
r14:0x10b81f0 r15:0x7ffe7e5bf570 rip:0x70000002 eflags:0x246 cs:0x33
ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xb
fs_base:0x7fb2e15f0740 gs_base:0x0
}
{
  real_time:27296.017194 global_time:1813, event:`SYSCALLBUF_RESET'
tid:24642, ticks:106709
}
{
  real_time:27296.017215 global_time:1814, event:`SYSCALL: munmap'
(state:EXITING_SYSCALL) tid:24642, ticks:106709
rax:0x0 rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x0 rsi:0x1000
rdi:0x7fb2e1612000 rbp:0xb rsp:0x681ffe00 r8:0x10b9cd0
r9:0x7fb2e15f0740 r10:0x22 r11:0x246 r12:0x0 r13:0x7ffe7e5bf563
r14:0x10b81f0 r15:0x7ffe7e5bf570 rip:0x70000002 eflags:0x246 cs:0x33
ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xb
fs_base:0x7fb2e15f0740 gs_base:0x0
}
{
  real_time:27296.017288 global_time:1815, event:`SYSCALLBUF_FLUSH'
tid:24642, ticks:113276
}
{
  real_time:27296.017325 global_time:1816, event:`PATCH_SYSCALL'
tid:24642, ticks:113276
rax:0x1 rbx:0x17c rcx:0xffffffffffffffff rdx:0x17c rsi:0x7fb2e1613000
rdi:0x1 rbp:0x7fb2e1613000 rsp:0x7ffe7e5bf508 r8:0x0 r9:0x7fb2e11c3e88
r10:0x7fb2e0bf5270 r11:0x246 r12:0x7fb2e11c1400 r13:0x17c r14:0x6
r15:0x0 rip:0x7fb2e0eed38e eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0
fs:0x0 gs:0x0 orig_rax:0xffffffffffffffff fs_base:0x7fb2e15f0740
gs_base:0x0
  { tid:24642, addr:0x7fb2e1418365, length:0x4f }
  { tid:24642, addr:0x7fb2e0eed38e, length:0x5 }
  { tid:24642, addr:0x7fb2e0eed393, length:0x3 }
}


-- 
Jun Inoue


More information about the rr-dev mailing list