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

bug: Panic when CPU hardware events are not available #14

Closed
l2dy opened this issue May 9, 2023 · 1 comment
Closed

bug: Panic when CPU hardware events are not available #14

l2dy opened this issue May 9, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@l2dy
Copy link

l2dy commented May 9, 2023

Program panics when hardware perf_event is not available.

Expected behavior

  1. CPI sampler can be disabled from config, or
  2. Disable the sampler if perf_event is not available.

Actual behavior

Program panics at expect().

.expect("failed to init cycles counter"),

Steps to reproduce the behavior

  1. Run rezolus on Azure Linux VMs.
@brayniac brayniac added the bug Something isn't working label May 9, 2023
@brayniac brayniac self-assigned this May 9, 2023
brayniac added a commit to brayniac/rezolus that referenced this issue May 9, 2023
As reported in iopsystems#14, the CPU CPI sampler will panic if the cycles or
instructions perf counters cannot be initialized.

This PR fixes the bug by returning a Nop sampler if there are
exceptions during initialization.
brayniac added a commit to brayniac/rezolus that referenced this issue May 9, 2023
As reported in iopsystems#14, the CPU CPI sampler will panic if the cycles or
instructions perf counters cannot be initialized.

This PR fixes the bug by returning a Nop sampler if there are
exceptions during initialization.
brayniac added a commit to brayniac/rezolus that referenced this issue May 9, 2023
As reported in iopsystems#14, the CPU CPI sampler will panic if the cycles or
instructions perf counters cannot be initialized.

This PR fixes the bug by returning a Nop sampler if there are
exceptions during initialization.
brayniac added a commit that referenced this issue May 9, 2023
As reported in #14, the CPU CPI sampler will panic if the cycles or
instructions perf counters cannot be initialized.

This PR fixes the bug by returning a Nop sampler if there are
exceptions during initialization.
@brayniac
Copy link
Contributor

brayniac commented May 9, 2023

Fixed in #16. Thanks for reporting this.

@brayniac brayniac closed this as completed May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants