Skip to content

pyroscope.ebpf: Retry after eBPF errors and buffer config updates. #3381

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

simonswine
Copy link
Contributor

@simonswine simonswine commented Apr 17, 2025

If the eBPF component encounters an error, it stops the main processing loops, which then caused issues because any config reload for alloy would block the whole agent.

Fixes #3332

Also for long running scrapes we were blocking the component evaluation as we are waiting for the config to be updated. I switched this to be a buffered channel, so the config updated are unblocked. In case of multiple updated buffered it will skip the in between updates and go straight to the latest version.

Fixes #1371

@simonswine simonswine added the area/pyroscope Issues/PRs primarly affecting `pyroscope.` components label Apr 17, 2025
If the eBPF component encounter an error, it stops the main processing
loops, which then caused issues because any config reload for alloy
would block the whole agent.

Fixes #3332

Also for long running scrapes we were blocking the component evaluation
as we are waiting for the config to be updated. I switched this to be a
buffered channel, so the config updated are unblocked.

In case of multiple updated buffered it will skip the in between updates
and go straight to the latest version.

Fixes #1371
@simonswine simonswine force-pushed the 20250416_pyroscope.ebpf-error-propagation branch from 312558c to 9e1854d Compare April 17, 2025 13:01
@simonswine simonswine changed the title fix: Keep ebpf component running pyroscope.ebpf: Retry after eBPF errors and buffer config updates. Keep ebpf component running Apr 17, 2025
@simonswine simonswine changed the title pyroscope.ebpf: Retry after eBPF errors and buffer config updates. Keep ebpf component running pyroscope.ebpf: Retry after eBPF errors and buffer config updates. Apr 17, 2025
}
case <-t.C:
if !started {
err := c.session.Start()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine main of those errors are permanent (e.g. not enough permissions, we probably should handle those by stopping the ticker. Wdyt @korniltsev

@simonswine
Copy link
Contributor Author

@JohanLindvall wonder if this fixes your problem and/or gives you a better error message?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/pyroscope Issues/PRs primarly affecting `pyroscope.` components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[pyroscope.ebpf] Pyroscope collection stops working pyroscope.ebpf slow component evaluation
1 participant