rr record fails for all executables with: check_for_ioc_period_bug() errno: EINVAL] ioctl(PERF_EVENT_IOC_PERIOD) failed
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.7k
- Forks
- 662
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 2
Description
Example backtrace:
$ rr record make
[FATAL /home/roger/git/rr/src/PerfCounters.cc:232:check_for_ioc_period_bug() errno: EINVAL] ioctl(PERF_EVENT_IOC_PERIOD) failed
=== Start rr backtrace:
rr(_ZN2rr13dump_rr_stackEv+0x5d)[0x558e07bab269]
rr(_ZN2rr15notifying_abortEv+0x57)[0x558e07bab207]
rr(_ZN2rr12FatalOstreamD1Ev+0x34)[0x558e07a03c76]
rr(+0x3cbe1a)[0x558e07a35e1a]
rr(+0x3cd543)[0x558e07a37543]
rr(+0x3cda97)[0x558e07a37a97]
rr(_ZN2rr12PerfCounters23default_ticks_semanticsEv+0x21)[0x558e07a37c39]
rr(_ZN2rr7SessionC2Ev+0x107)[0x558e07b40041]
rr(_ZN2rr13RecordSessionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS6_SaIS6_EESD_RKNS_20DisableCPUIDFeaturesENS0_16SyscallBufferingEiNS_7BindCPUES8_PKNS_9TraceUuidEbb+0x65)[0x558e07a50e63]
rr(_ZN2rr13RecordSession6createERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EESB_RKNS_20DisableCPUIDFeaturesENS0_16SyscallBufferingEhNS_7BindCPUERKS7_PKNS_9TraceUuidEbbb+0xb40)[0x558e07a5094c]
rr(+0x3d9e31)[0x558e07a43e31]
rr(_ZN2rr13RecordCommand3runERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE+0x3da)[0x558e07a44bd0]
rr(main+0x21f)[0x558e07bc6f7b]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7fed4b1450b3]
rr(_start+0x2e)[0x558e0792761e]
=== End rr backtrace
Aborted (core dumped)
I've tried this with the actual program I'm trying to debug, ls, and make.
This happens both on current master (https://github.com/rr-debugger/rr/commit/3f5262f90e63a8ba4d5ed4156b806495830aae2f) and on the version from my package manager (5.3.0-2). I'm using Ubuntu 20.04, CPU is an i7-930. Happy to provide more details, but I'm not sure exactly what information would be helpful here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/PerfCounters.cc at check_for_ioc_period_bug() and default_ticks_semantics(), then reproduce the failure with rr record ls or make on the reported Ubuntu 20.04 and i7-930 setup. Trace the PERF_EVENT_IOC_PERIOD ioctl failure and verify that rr record completes successfully for those executables without aborting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux
- Domain
- devtools, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100