Skip to content

Assertion `ticks_now == trace_ticks' failed to hold. ticks mismatch for 'INSTRUCTION_TRAP'; on AMD CPU #2862

@seelabs

Description

@seelabs

I'm running rr build from this commit: e9ec388 on an "AMD Ryzen Threadripper 3970X 32-Core Processor". I run a script that does the following:

sudo sysctl kernel.perf_event_paranoid=1
sudo sysctl kernel.perf_cpu_time_max_percent=0
sudo ~/apps/rr-latest/scripts/zen_workaround.py

When I playback a recording, rr complains with the following message (I get a similar error leaving off perf_cpu_time_max_percent in the script, but thought I'd mention I tried that):

Please let me know if there's anything I can do on my end to help resolve this. I'll note that I am able to record and replay the same program on my intel based system.

[FATAL ../../src/ReplaySession.cc:1096:check_ticks_consistency()] 
 (task 270069 (rec:269162) at time 978)
 -> Assertion `ticks_now == trace_ticks' failed to hold. ticks mismatch for 'INSTRUCTION_TRAP'; expected 2889497, got 2889499
Tail of trace dump:
{
  real_time:24389.278872 global_time:958, event:`SYSCALL: brk' (state:EXITING_SYSCALL) tid:269162, ticks:2218622
rax:0xd932000 rbx:0xc rcx:0xffffffffffffffff rdx:0x10040 rsi:0x26000 rdi:0xd932000 rbp:0x681fffa0 rsp:0x681ffd60 r8:0xd901980 r9:0x7f5118719c50 r10:0xd90c000 r11:0x246 r12:0xd90c000 r13:0x26000 r14:0xd901980 r15:0x10040 rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xc fs_base:0x7f511852d040 gs_base:0x0
  { map_file:"<ZERO>", addr:0xd90c000, length:0x26000, prot_flags:"rw-p", file_offset:0x0, device:0, inode:0, data_file:"", data_offset:0x0, file_size:0x26000 }
}
{
  real_time:24389.280839 global_time:959, event:`SYSCALLBUF_FLUSH' tid:269162, ticks:2761786
}
{
  real_time:24389.280841 global_time:960, event:`INSTRUCTION_TRAP' tid:269162, ticks:2761786
rax:0x7de3bc2f rbx:0x7ffe718b1da0 rcx:0x0 rdx:0x522d rsi:0x7ffe718b1da0 rdi:0xd706bc0 rbp:0xd706bc0 rsp:0x7ffe718b1d28 r8:0xd70b340 r9:0x0 r10:0x0 r11:0x27 r12:0x0 r13:0x7ffe718b1e00 r14:0x0 r15:0x0 rip:0xb8b83e2 eflags:0x10206 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xffffffffffffffff fs_base:0x7f511852d040 gs_base:0x0
}
{
  real_time:24389.280843 global_time:961, event:`SYSCALLBUF_RESET' tid:269162, ticks:2761786
}
{
  real_time:24389.280878 global_time:962, event:`SYSCALLBUF_FLUSH' tid:269162, ticks:2764932
}
{
  real_time:24389.280880 global_time:963, event:`INSTRUCTION_TRAP' tid:269162, ticks:2764932
rax:0x7de5f940 rbx:0x7ffe718b1da0 rcx:0x0 rdx:0x522d rsi:0x7ffe718b1da0 rdi:0xd706bc0 rbp:0xd706bc0 rsp:0x7ffe718b1d28 r8:0xd70b340 r9:0x0 r10:0x0 r11:0x27 r12:0x0 r13:0x7ffe718b1e00 r14:0x0 r15:0x0 rip:0xb8b83e2 eflags:0x10206 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xffffffffffffffff fs_base:0x7f511852d040 gs_base:0x0
}
{
  real_time:24389.280882 global_time:964, event:`SYSCALLBUF_RESET' tid:269162, ticks:2764932
}
{
  real_time:24389.280915 global_time:965, event:`SYSCALLBUF_FLUSH' tid:269162, ticks:2766409
}
{
  real_time:24389.280918 global_time:966, event:`INSTRUCTION_TRAP' tid:269162, ticks:2766409
rax:0x7de809f2 rbx:0x7ffe718b1da0 rcx:0x0 rdx:0x522d rsi:0x7ffe718b1da0 rdi:0xd706bc0 rbp:0xd706bc0 rsp:0x7ffe718b1d28 r8:0xd70b340 r9:0x0 r10:0x0 r11:0x27 r12:0x0 r13:0x7ffe718b1e00 r14:0x0 r15:0x0 rip:0xb8b83e2 eflags:0x10206 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xffffffffffffffff fs_base:0x7f511852d040 gs_base:0x0
}
{
  real_time:24389.280919 global_time:967, event:`SYSCALLBUF_RESET' tid:269162, ticks:2766409
}
{
  real_time:24389.280952 global_time:968, event:`SYSCALLBUF_FLUSH' tid:269162, ticks:2767886
}
{
  real_time:24389.280954 global_time:969, event:`INSTRUCTION_TRAP' tid:269162, ticks:2767886
rax:0x7dea22bc rbx:0x7ffe718b1da0 rcx:0x0 rdx:0x522d rsi:0x7ffe718b1da0 rdi:0xd706bc0 rbp:0xd706bc0 rsp:0x7ffe718b1d28 r8:0xd70b340 r9:0x0 r10:0x0 r11:0x27 r12:0x0 r13:0x7ffe718b1e00 r14:0x0 r15:0x0 rip:0xb8b83e2 eflags:0x10206 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xffffffffffffffff fs_base:0x7f511852d040 gs_base:0x0
}
{
  real_time:24389.280955 global_time:970, event:`SYSCALLBUF_RESET' tid:269162, ticks:2767886
}
{
  real_time:24389.281345 global_time:971, event:`SYSCALLBUF_FLUSH' tid:269162, ticks:2884875
}
{
  real_time:24389.281348 global_time:972, event:`INSTRUCTION_TRAP' tid:269162, ticks:2884875
rax:0x7e005b0d rbx:0x7ffe718b1b90 rcx:0x0 rdx:0x522d rsi:0x7ffe718b1b90 rdi:0xd706bc0 rbp:0xd706bc0 rsp:0x7ffe718b1b18 r8:0xd70b340 r9:0x0 r10:0xd667010 r11:0x27 r12:0x0 r13:0xd8de490 r14:0x7ffe718b1fbc r15:0xd820af0 rip:0xb8b83e2 eflags:0x10206 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xffffffffffffffff fs_base:0x7f511852d040 gs_base:0x0
}
{
  real_time:24389.281350 global_time:973, event:`SYSCALLBUF_RESET' tid:269162, ticks:2884875
}
{
  real_time:24389.281382 global_time:974, event:`SYSCALLBUF_FLUSH' tid:269162, ticks:2886335
}
{
  real_time:24389.281385 global_time:975, event:`INSTRUCTION_TRAP' tid:269162, ticks:2886335
rax:0x7e0275dd rbx:0x7ffe718b1b90 rcx:0x0 rdx:0x522d rsi:0x7ffe718b1b90 rdi:0xd707430 rbp:0xd707430 rsp:0x7ffe718b1b18 r8:0xd70b610 r9:0x0 r10:0x0 r11:0x27 r12:0x0 r13:0xd8ddbd0 r14:0x7ffe718b1fbc r15:0xd820af0 rip:0xb8b83e2 eflags:0x10206 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xffffffffffffffff fs_base:0x7f511852d040 gs_base:0x0
}
{
  real_time:24389.281386 global_time:976, event:`SYSCALLBUF_RESET' tid:269162, ticks:2886335
}
{
  real_time:24389.281420 global_time:977, event:`SYSCALLBUF_FLUSH' tid:269162, ticks:2889497
}
{
  real_time:24389.281422 global_time:978, event:`INSTRUCTION_TRAP' tid:269162, ticks:2889497
rax:0x7e04980c rbx:0x7ffe718b1b90 rcx:0x0 rdx:0x522d rsi:0x7ffe718b1b90 rdi:0xd707430 rbp:0xd707430 rsp:0x7ffe718b1b18 r8:0xd70b610 r9:0x0 r10:0x0 r11:0x27 r12:0x0 r13:0xd8ddbf0 r14:0x7ffe718b1fbc r15:0xd820af0 rip:0xb8b83e2 eflags:0x10206 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xffffffffffffffff fs_base:0x7f511852d040 gs_base:0x0
}
{
  real_time:24389.281424 global_time:979, event:`SYSCALLBUF_RESET' tid:269162, ticks:2889497
}
[FATAL ../../src/log.cc:402:emergency_debug()] (session doesn't look interactive, aborting emergency debugging)
=== Start rr backtrace:
rr(_ZN2rr13dump_rr_stackEv+0x5a)[0x5636c46a9a3a]
rr(_ZN2rr15notifying_abortEv+0x50)[0x5636c46ae700]
rr(+0x4c364)[0x5636c469f364]
rr(+0x15b676)[0x5636c47ae676]
rr(+0x15b82f)[0x5636c47ae82f]
rr(_ZN2rr13ReplaySession23check_ticks_consistencyEPNS_10ReplayTaskERKNS_5EventE+0x1e4)[0x5636c4729c64]
rr(_ZN2rr13ReplaySession28emulate_deterministic_signalEPNS_10ReplayTaskEiRKNS0_15StepConstraintsE+0x1f3)[0x5636c472db53]
rr(_ZN2rr13ReplaySession18try_one_trace_stepEPNS_10ReplayTaskERKNS0_15StepConstraintsE+0x1a4)[0x5636c47238b4]
rr(_ZN2rr13ReplaySession11replay_stepERKNS0_15StepConstraintsE+0x10e)[0x5636c472754e]
rr(_ZN2rr14ReplayTimeline19replay_step_forwardENS_10RunCommandEl+0xbf)[0x5636c470585f]
rr(_ZN2rr9GdbServer14debug_one_stepERNS_10GdbRequestE+0x378)[0x5636c47c49a8]
rr(_ZN2rr9GdbServer12serve_replayERKNS0_15ConnectionFlagsE+0x64b)[0x5636c47c5cfb]
rr(+0xdee8a)[0x5636c4731e8a]
rr(_ZN2rr13ReplayCommand3runERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE+0x56a)[0x5636c4732a6a]
rr(main+0x31a)[0x5636c469823a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7f2e076d50b3]
rr(_start+0x2e)[0x5636c469838e]
=== End rr backtrace

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions