Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$ sudo rr /opt/stap-plus/bin/staprun hello.ko
rr: Saving execution to trace directory `/root/.local/share/rr/staprun-0'.
[FATAL /home/agentzh/git/rr/rr/src/record_syscall.cc:5724:rec_process_syscall_arch()]
(task 26471 (rec:26471) at time 394)
-> Assertion `t->regs().syscall_result_signed() == -syscall_state.expect_errno' failed to hold. Expected ENOSYS for 'init_module' but got result 0 (errno SUCCESS); execution of syscall unsupported by rr
Tail of trace dump:
{
real_time:2421511.598055 global_time:374, event:`SYSCALLBUF_FLUSH' tid:26471, ticks:453980
{ syscall:'close', ret:0x0, size:0x10 }
{ syscall:'openat', ret:0x3, size:0x10 }
{ syscall:'readlinkat', ret:0x1d, size:0x2d }
{ syscall:'read', ret:0x1, size:0x11 }
{ syscall:'close', ret:0x0, size:0x10 }
}
{
real_time:2421511.598090 global_time:375, event:`PATCH_SYSCALL' tid:26471, ticks:453980
rax:0x4f rbx:0x7ffc89a95b40 rcx:0xffffffffffffffff rdx:0x7ffc89a94b40 rsi:0x1000 rdi:0x7ffc89a94b40 rbp:0x1000 rsp:0x7ffc89a947d0 r8:0x3 r9:0x0 r10:0x55be28f8b010 r11:0x246 r12:0x7ffc89a94b40 r13:0x68 r14:0x7ffc89a94b40 r15:0x7ffc89a94b40 rip:0x7f357aa5c890 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xffffffffffffffff fs_base:0x7f357bc963c0 gs_base:0x0
{ tid:26471, addr:0x7f357babb2d2, length:0x4f }
{ tid:26471, addr:0x7f357aa5c890, length:0x5 }
{ tid:26471, addr:0x7f357aa5c895, length:0x3 }
}
{
real_time:2421511.598095 global_time:376, event:`SYSCALLBUF_RESET' tid:26471, ticks:453980
}
{
real_time:2421511.598150 global_time:377, event:`SYSCALL: getcwd' (state:ENTERING_SYSCALL) tid:26471, ticks:453986
rax:0xffffffffffffffda rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x7ffc89a94b40 rsi:0x1000 rdi:0x7ffc89a94b40 rbp:0x4f rsp:0x681ffde0 r8:0x3 r9:0x0 r10:0x55be28f8b010 r11:0x246 r12:0x7ffc89a94b40 r13:0x68 r14:0x7ffc89a94b40 r15:0x7ffc89a94b40 rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0x4f fs_base:0x7f357bc963c0 gs_base:0x0
}
{
real_time:2421511.598176 global_time:378, event:`SYSCALL: getcwd' (state:EXITING_SYSCALL) tid:26471, ticks:453986
rax:0xe rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x7ffc89a94b40 rsi:0x1000 rdi:0x7ffc89a94b40 rbp:0x4f rsp:0x681ffde0 r8:0x3 r9:0x0 r10:0x55be28f8b010 r11:0x246 r12:0x7ffc89a94b40 r13:0x68 r14:0x7ffc89a94b40 r15:0x7ffc89a94b40 rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0x4f fs_base:0x7f357bc963c0 gs_base:0x0
{ tid:26471, addr:0x7ffc89a94b40, length:0xe }
}
{
real_time:2421511.598280 global_time:379, event:`PATCH_SYSCALL' tid:26471, ticks:454023
rax:0x6 rbx:0x7ffc89a95b40 rcx:0xffffffffffffffff rdx:0x7ffc89a94950 rsi:0x7ffc89a94950 rdi:0x7ffc89a94b40 rbp:0x7ffc89a94a20 rsp:0x7ffc89a94908 r8:0x3 r9:0x0 r10:0x55be28f9cea0 r11:0x246 r12:0x7ffc89a94b40 r13:0x55be28f9cea8 r14:0x55be28f9cea7 r15:0x7ffc89a94b56 rip:0x7f357aa5b4f3 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xffffffffffffffff fs_base:0x7f357bc963c0 gs_base:0x0
{ tid:26471, addr:0x7f357babb321, length:0x4f }
{ tid:26471, addr:0x7f357aa5b4f3, length:0x5 }
{ tid:26471, addr:0x7f357aa5b4f8, length:0x3 }
}
{
real_time:2421511.598342 global_time:380, event:`SYSCALLBUF_FLUSH' tid:26471, ticks:454233
{ syscall:'lstat', ret:0x0, size:0xa0 }
{ syscall:'openat', ret:0x3, size:0x10 }
{ syscall:'readlinkat', ret:0x16, size:0x26 }
}
{
real_time:2421511.598376 global_time:381, event:`PATCH_SYSCALL' tid:26471, ticks:454233
rax:0x5 rbx:0x0 rcx:0xffffffffffffffff rdx:0x7ffc89a94ab0 rsi:0x7ffc89a94ab0 rdi:0x3 rbp:0x7ffc89a95b60 rsp:0x7ffc89a94a28 r8:0x3 r9:0x0 r10:0x0 r11:0x246 r12:0x55be26f90d70 r13:0x7ffc89a95dc0 r14:0x0 r15:0x0 rip:0x7f357aa5b4a1 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xffffffffffffffff fs_base:0x7f357bc963c0 gs_base:0x0
{ tid:26471, addr:0x7f357babb370, length:0x4f }
{ tid:26471, addr:0x7f357aa5b4a1, length:0x5 }
{ tid:26471, addr:0x7f357aa5b4a6, length:0x3 }
}
{
real_time:2421511.598381 global_time:382, event:`SYSCALLBUF_RESET' tid:26471, ticks:454233
}
{
real_time:2421511.598433 global_time:383, event:`SYSCALLBUF_FLUSH' tid:26471, ticks:454291
{ syscall:'fstat', ret:0x0, size:0xa0 }
}
{
real_time:2421511.598468 global_time:384, event:`PATCH_SYSCALL' tid:26471, ticks:454291
rax:0xc rbx:0x55be28fac000 rcx:0xffffffffffffffff rdx:0x141d0 rsi:0x7f357ad29c40 rdi:0x0 rbp:0x26000 rsp:0x7ffc89a94888 r8:0x3 r9:0x0 r10:0xfffffffffffff000 r11:0x246 r12:0x7f357ad2c0a0 r13:0x55be28f9d010 r14:0xeff0 r15:0xfff rip:0x7f357aa61a75 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xffffffffffffffff fs_base:0x7f357bc963c0 gs_base:0x0
{ tid:26471, addr:0x7f357babb3bf, length:0x4f }
{ tid:26471, addr:0x7f357aa61a75, length:0x5 }
{ tid:26471, addr:0x7f357aa61a7a, length:0x3 }
}
{
real_time:2421511.598473 global_time:385, event:`SYSCALLBUF_RESET' tid:26471, ticks:454291
}
{
real_time:2421511.598523 global_time:386, event:`SYSCALL: brk' (state:ENTERING_SYSCALL) tid:26471, ticks:454297
rax:0xffffffffffffffda rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x141d0 rsi:0x7f357ad29c40 rdi:0x0 rbp:0xc rsp:0x681ffde0 r8:0x3 r9:0x0 r10:0xfffffffffffff000 r11:0x246 r12:0x7f357ad2c0a0 r13:0x55be28f9d010 r14:0xeff0 r15:0xfff rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xc fs_base:0x7f357bc963c0 gs_base:0x0
}
{
real_time:2421511.598548 global_time:387, event:`SYSCALL: brk' (state:EXITING_SYSCALL) tid:26471, ticks:454297
rax:0x55be28fac000 rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x141d0 rsi:0x7f357ad29c40 rdi:0x0 rbp:0xc rsp:0x681ffde0 r8:0x3 r9:0x0 r10:0xfffffffffffff000 r11:0x246 r12:0x7f357ad2c0a0 r13:0x55be28f9d010 r14:0xeff0 r15:0xfff rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xc fs_base:0x7f357bc963c0 gs_base:0x0
{ map_file:"<ZERO>", addr:0x55be28fac000, length:(nil), prot_flags:"---p", file_offset:0x0, device:0, inode:0, data_file:"", data_offset:0x0, file_size:0x0 }
}
{
real_time:2421511.598621 global_time:388, event:`SYSCALL: brk' (state:ENTERING_SYSCALL) tid:26471, ticks:454312
rax:0xffffffffffffffda rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x141d0 rsi:0x7f357ad29c40 rdi:0x55be28fd2000 rbp:0xc rsp:0x681ffde0 r8:0x3 r9:0x0 r10:0xfffffffffffff000 r11:0x246 r12:0x7f357ad2c0a0 r13:0x55be28f9d010 r14:0xeff0 r15:0xfff rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xc fs_base:0x7f357bc963c0 gs_base:0x0
}
{
real_time:2421511.598672 global_time:389, event:`SYSCALL: brk' (state:EXITING_SYSCALL) tid:26471, ticks:454312
rax:0x55be28fd2000 rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x141d0 rsi:0x7f357ad29c40 rdi:0x55be28fd2000 rbp:0xc rsp:0x681ffde0 r8:0x3 r9:0x0 r10:0xfffffffffffff000 r11:0x246 r12:0x7f357ad2c0a0 r13:0x55be28f9d010 r14:0xeff0 r15:0xfff rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xc fs_base:0x7f357bc963c0 gs_base:0x0
{ map_file:"<ZERO>", addr:0x55be28fac000, length:0x26000, prot_flags:"rw-p", file_offset:0x0, device:0, inode:0, data_file:"", data_offset:0x0, file_size:0x26000 }
}
{
real_time:2421511.598827 global_time:390, event:`SYSCALLBUF_FLUSH' tid:26471, ticks:455031
{ syscall:'read', ret:0x141a0, size:0x141b0 }
{ syscall:'getuid', ret:0x0, size:0x10 }
}
{
real_time:2421511.598864 global_time:391, event:`PATCH_SYSCALL' tid:26471, ticks:455031
rax:0xaf rbx:0x0 rcx:0xffffffffffffffff rdx:0x55be28f9d000 rsi:0x141a0 rdi:0x55be28f9d020 rbp:0x7ffc89a95b60 rsp:0x7ffc89a94a28 r8:0x0 r9:0x1 r10:0x141a0 r11:0x246 r12:0x55be26f90d70 r13:0x7ffc89a95dc0 r14:0x0 r15:0x0 rip:0x7f357aa6b858 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xffffffffffffffff fs_base:0x7f357bc963c0 gs_base:0x0
{ tid:26471, addr:0x7f357babb40e, length:0x4f }
{ tid:26471, addr:0x7f357aa6b858, length:0x5 }
{ tid:26471, addr:0x7f357aa6b85d, length:0x3 }
}
{
real_time:2421511.598874 global_time:392, event:`SYSCALLBUF_RESET' tid:26471, ticks:455031
}
{
real_time:2421511.598926 global_time:393, event:`SYSCALL: init_module' (state:ENTERING_SYSCALL) tid:26471, ticks:455037
rax:0xffffffffffffffda rbx:0x681fffa0 rcx:0xffffffffffffffff rdx:0x55be28f9d000 rsi:0x141a0 rdi:0x55be28f9d020 rbp:0xaf rsp:0x681ffde0 r8:0x0 r9:0x1 r10:0x141a0 r11:0x246 r12:0x55be26f90d70 r13:0x7ffc89a95dc0 r14:0x0 r15:0x0 rip:0x70000002 eflags:0x246 cs:0x33 ss:0x2b ds:0x0 es:0x0 fs:0x0 gs:0x0 orig_rax:0xaf fs_base:0x7f357bc963c0 gs_base:0x0
}
=== Start rr backtrace:
rr(_ZN2rr13dump_rr_stackEv+0x33)[0x8b140e]
rr(_ZN2rr9GdbServer15emergency_debugEPNS_4TaskE+0x168)[0x71ec1e]
rr[0x74c823]
rr(_ZN2rr21EmergencyDebugOstreamD1Ev+0x5a)[0x74ca10]
rr[0x7ba575]
rr[0x7a654a]
rr(_ZN2rr19rec_process_syscallEPNS_10RecordTaskE+0xd2)[0x7a668c]
rr(_ZN2rr13RecordSession21syscall_state_changedEPNS_10RecordTaskEPNS0_9StepStateE+0xc95)[0x789cbf]
rr(_ZN2rr13RecordSession11record_stepEv+0x3e7)[0x78efed]
rr[0x78227e]
rr(_ZN2rr13RecordCommand3runERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE+0x382)[0x782d72]
rr(main+0x20c)[0x8caf43]
/lib64/libc.so.6(__libc_start_main+0xeb)[0x7fe2f44de11b]
rr(_start+0x2a)[0x692b4a]
=== End rr backtrace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment