Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rr 5.8.0 does not work on i7-1355U #3849

Open
ilan-schemoul opened this issue Oct 14, 2024 · 7 comments
Open

rr 5.8.0 does not work on i7-1355U #3849

ilan-schemoul opened this issue Oct 14, 2024 · 7 comments

Comments

@ilan-schemoul
Copy link

I use rr 5.8.0 on a thinkpad l13 yoga gen 4. See below failure (even if perfs work, I added the result of lscpu too)

tmp ⟩ rr record ./a.out
rr: Saving execution to trace directory `/home/ilan/.local/share/rr/a.out-6'.
[FATAL src/PerfCounters.cc:411:check_working_counters()] 
Got 0 branch events, expected at least 500.

The hardware performance counter seems to not be working. Check
that hardware performance counters are working by running
  perf stat -e r5111c4 true
and checking that it reports a nonzero number of events.
If performance counters seem to be working with 'perf', file an
rr issue, otherwise check your hardware/OS/VM configuration. Also
check that other software is not using performance counters on
this CPU.
=== Start rr backtrace:
rr(_ZN2rr13dump_rr_stackEv+0x5a)[0x56200a6ea27a]
rr(_ZN2rr15notifying_abortEv+0x14)[0x56200a6ea2d4]
rr(+0xde664)[0x56200a6c9664]
rr(_ZN2rr12PerfCounters5startEPNS_4TaskEl+0xc77)[0x56200a7eb217]
rr(_ZN2rr4Task16resume_executionENS_13ResumeRequestENS_11WaitRequestENS_12TicksRequestEi+0x5fd)[0x56200a718aad]
rr(_ZN2rr13RecordSession13task_continueERKNS0_9StepStateE+0x3eb)[0x56200a7e042b]
rr(_ZN2rr13RecordSession11record_stepEv+0x38a)[0x56200a7d9ffa]
rr(_ZN2rr13RecordCommand3runERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE+0xe14)[0x56200a
7deb14]
rr(main+0x199)[0x56200a6c4bc9]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x7fb1b1629d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x7fb1b1629e40]
rr(_start+0x2e)[0x56200a6c51be]
=== End rr backtrace
fish: Job 1, 'rr record ./a.out' terminated by signal SIGABRT (Abort)
tmp ⟩ perf stat -e r5111c4 true

WARNING: event 'N/A' not valid (bits 16,20,22 of config '5111c4' not supported by kernel)!

 Performance counter stats for 'true':

     <not counted>      cpu_core/r5111c4/                                                       (0,00%)

       0,004004960 seconds time elapsed

       0,001102000 seconds user
       0,002204000 seconds sys


tmp ⟩ uname -r
6.8.0-45-generic
tmp ⟩ uname -a
Linux ILTY-401 6.8.0-45-generic #45~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Sep 11 15:25:05 UTC 2 x86_64 x86_64 x86_6
4 GNU/Linux
tmp ⟩ lscpu
Architecture:             x86_64
  CPU op-mode(s):         32-bit, 64-bit
  Address sizes:          39 bits physical, 48 bits virtual
  Byte Order:             Little Endian
CPU(s):                   12
  On-line CPU(s) list:    0-11
Vendor ID:                GenuineIntel
  Model name:             13th Gen Intel(R) Core(TM) i7-1355U
    CPU family:           6
    Model:                186
    Thread(s) per core:   2
    Core(s) per socket:   10
    Socket(s):            1
    Stepping:             3
    CPU max MHz:          5000,0000
    CPU min MHz:          400,0000
    BogoMIPS:             5222.40
    Flags:                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi m
                          mx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon p
                          ebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq 
                          dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2a
                          pic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cp
                          uid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad f
                          sgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_
                          pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect user_shstk avx_vnni dtherm ida 
                          arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi vnmi umip pku ospke wai
                          tpkg gfni vaes vpclmulqdq rdpid movdiri movdir64b fsrm md_clear serialize arch_lbr ibt flu
                          sh_l1d arch_capabilities
Virtualization features:  
  Virtualization:         VT-x
Caches (sum of all):      
  L1d:                    352 KiB (10 instances)
  L1i:                    576 KiB (10 instances)
  L2:                     6,5 MiB (4 instances)
  L3:                     12 MiB (1 instance)
NUMA:                     
  NUMA node(s):           1
  NUMA node0 CPU(s):      0-11
Vulnerabilities:          
  Gather data sampling:   Not affected
  Itlb multihit:          Not affected
  L1tf:                   Not affected
  Mds:                    Not affected
  Meltdown:               Not affected
  Mmio stale data:        Not affected
  Reg file data sampling: Mitigation; Clear Register File
  Retbleed:               Not affected
  Spec rstack overflow:   Not affected
  Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl
  Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:             Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW seque
                          nce; BHI BHI_DIS_S
  Srbds:                  Not affected
  Tsx async abort:        Not affected

@khuey
Copy link
Collaborator

khuey commented Oct 14, 2024

Are you running under virtualization?

@ilan-schemoul
Copy link
Author

No I'm not

@khuey
Copy link
Collaborator

khuey commented Oct 15, 2024

If you run dmesg | grep "Performance Events:" after startup what is the output?

@ilan-schemoul
Copy link
Author

Nothing

root@ILTY-401:/home/ilan/dev/mmsx-master/platform/zplatform# dmesg | grep "Performance Events:"
root@ILTY-401:/home/ilan/dev/mmsx-master/platform/zplatform# 

@rocallahan
Copy link
Collaborator

It looks like perf events aren't enabled at all on this system. Are there any relevant lines in dmesg? On my laptop stuff gets printed right after the info for CPU0:

[    0.223965] smpboot: CPU0: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz (family: 0x6, model: 0x5e, stepping: 0x3)
[    0.224230] Performance Events: PEBS fmt3+, Skylake events, 32-deep LBR, full-width counters, Intel PMU driver.
[    0.224255] ... version:                4
[    0.224256] ... bit width:              48
[    0.224257] ... generic registers:      4
[    0.224258] ... value mask:             0000ffffffffffff
[    0.224260] ... max period:             00007fffffffffff
[    0.224261] ... fixed-purpose events:   3
[    0.224262] ... event mask:             000000070000000f

@ilan-schemoul
Copy link
Author

Hey, do I need to reboot my computer to get relevant messages ? (I think dmesg keeps everything from boot right ?)
Without restarting my computer I search keywords such as smpboot/CPU0/bit/Performance/width/Intel with no luck @rocallahan

@rocallahan
Copy link
Collaborator

Check the timestamp of the first message in the log. If that's about zero then you've got the messages from the start of the boot, otherwise you don't. I'd certainly expect "Intel" to match something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants