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

segfault on coffee lake #187

Closed
d-we opened this issue Mar 4, 2020 · 5 comments
Closed

segfault on coffee lake #187

d-we opened this issue Mar 4, 2020 · 5 comments

Comments

@d-we
Copy link

d-we commented Mar 4, 2020

Hello,

running most pcm utilities (e.g. pcm-core.x or pcm-latency.x) on my i7-9750H results in a segfault:

-> % sudo ./pcm-core.x
IBRS and IBPB supported  : yes
STIBP supported          : yes
Spec arch caps supported : no
Number of physical cores: 6
Number of logical cores: 12
Number of online logical cores: 12
Threads (logical cores) per physical core: 2
Num sockets: 1
Physical cores per socket: 6
Core PMU (perfmon) version: 4
Number of core PMU generic (programmable) counters: 3
Width of generic (programmable) counters: 48 bits
Number of core PMU fixed counters: 3
Width of fixed counters: 48 bits
Nominal core frequency: 2600000000 Hz
IBRS enabled in the kernel   : no
STIBP enabled in the kernel  : no
Package thermal spec power: 45 Watt; Package minimum power: 0 Watt; Package maximum power: 0 Watt;

 Processor Counter Monitor: Core Monitoring Utility

WARNING: you did not provide any custom events, is this intentional?
Trying to use Linux perf events...
Successfully programmed on-core PMU using Linux perf
DEBUG: caught signal to interrupt (Segmentation fault).

backtrace:

[#0] 0x5555555724fd → std::vector<UncorePMU, std::allocator<UncorePMU> >::operator[](this=0x0, __n=0x0)
[#1] 0x5555555724fd → PCM::programCbo(nc_=<optimized out>, llc_lookup_tid_filter=<optimized out>, loc=<optimized out>, rem=<optimized out>, opCode=<optimized out>, events=<optimized out>, this=<optimized out>)
[#2] 0x5555555724fd → PCM::programCbo(this=0x5555555d7eb0)
[#3] 0x555555592a81 → PCM::program(this=0x5555555d7eb0, mode_=<optimized out>, parameter_=<optimized out>)
[#4] 0x555555565926 → build_registers(m=0x5555555d7eb0, conf={
  fixedCfg = 0x0,
  nGPCounters = 0x2,
  gpCounterCfg = 0x5555555c55f0 <regs>,
  OffcoreResponseMsrValue = {0x0, 0x0}
}, enable_pmm=<optimized out>, enable_verbose=<optimized out>)
[#5] 0x55555556030b → main(argc=0x1, argv=<optimized out>)
@opcm
Copy link
Contributor

opcm commented Mar 4, 2020

Thanks for reporting this issue. The latest commit d41c991
in master should fix this issue. Are you using the latest version from the master branch?

@opcm opcm added the bug label Mar 4, 2020
@opcm
Copy link
Contributor

opcm commented Mar 4, 2020

It is very similar to #185

@opcm opcm added the duplicate label Mar 4, 2020
@d-we
Copy link
Author

d-we commented Mar 4, 2020

I just verified the bug on the up-to-date master (c7899c9) but I just observed that the bug only seems to appear when I run the utilities with non-root users.
Running as root I only get:

Detected Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz "Intel(r) microarchitecture codename Kabylake" stepping 10 microcode level 0xc6
Platform not Supported! Program aborted
Cleaning up
 Zeroed uncore PMU registers

which I assume means that my CPU doesn't support PCM?

@opcm
Copy link
Contributor

opcm commented Mar 4, 2020

Your CPU is not supported by the pcm-latency tool. pcm tool should work. But crashing as a non-root is not expected and it is a different issue that needs to be resolved.

opcm pushed a commit that referenced this issue Mar 9, 2020
addresses issue reposted in #187

Change-Id: Iace49a011eab0710f8ecc492eb11eeb1341df40c
opcm pushed a commit that referenced this issue Mar 9, 2020
addresses issue reposted in #187

Change-Id: Iace49a011eab0710f8ecc492eb11eeb1341df40c
@opcm
Copy link
Contributor

opcm commented Mar 9, 2020

the fix for the crash has been merged into the master branch

@opcm opcm closed this as completed Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants