Closed liyun-li closed 5 years ago
Did you follow the instructions at https://github.com/mozilla/rr/wiki/Docker? The CAP_SYS_PTRACE
may no longer be required but the seccomp exemption definitely is.
Many apologies! I went ahead and added the two arguments when running Docker:
docker run --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --rm -ti -d --name asdf asdf
However I am encountering the following exception:
root@54982046c718:/src# rr record pip
[FATAL /src/src/PerfCounters.cc:295:start_counter() errno: ENOENT] Unable to open performance counter with 'perf_event_open'; are perf events enabled? Try 'perf record'.
=== Start rr backtrace:
rr(_ZN2rr13dump_rr_stackEv+0x44)[0x55555597cf0d]
rr(_ZN2rr15notifying_abortEv+0x53)[0x55555597cec4]
rr(_ZN2rr12FatalOstreamD1Ev+0x30)[0x55555583496e]
rr(+0x30cb7c)[0x555555860b7c]
rr(+0x30d847)[0x555555861847]
rr(+0x30dae1)[0x555555861ae1]
rr(+0x30dd00)[0x555555861d00]
rr(_ZN2rr12PerfCounters23default_ticks_semanticsEv+0x1d)[0x555555861e89]
rr(_ZN2rr7SessionC2Ev+0xec)[0x5555559323d4]
rr(_ZN2rr13RecordSessionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS6_SaIS6_EESD_RKNS_20DisableCPUIDFeaturesENS0_16SyscallBufferingENS_7BindCPUES8_+0x4d)[0x5555558776f1]
rr(_ZN2rr13RecordSession6createERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EESB_RKNS_20DisableCPUIDFeaturesENS0_16SyscallBufferingENS_7BindCPUERKS7_+0x89f)[0x5555558773f9]
rr(+0x3173e9)[0x55555586b3e9]
rr(_ZN2rr13RecordCommand3runERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE+0x2d5)[0x55555586bfc3]
rr(main+0x21b)[0x555555995558]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7ffff65d9b97]
rr(_start+0x2a)[0x55555578658a]
=== End rr backtrace
Aborted (core dumped)
Here's the perf_event_paranoid
value:
root@54982046c718:/src# cat /proc/sys/kernel/perf_event_paranoid
-1
perf record
does not return anything and I assume it was fine?
Does rr work outside of docker on this machine?
Apologies for the lack of follow-up but I wasn't able to run on either 64-bit or 32-bit VMs. Been trying to disable all the security options but nothing so far.
Ok I tested it and it seems like rr is working. I will go ahead and close this issue because it's not a bug. Sorry for your time
Environment
Command used
Backtrace