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

Fix bug where event processors exit on error #2688

Merged
merged 2 commits into from
Apr 11, 2024

Conversation

umanwizard
Copy link
Contributor

@umanwizard umanwizard commented Apr 11, 2024

When there are errors in processing prefetch events, the goroutine that processes them would exit silently. If this happened to all the workers, the entire agent would seize up as no more events could be processed.
This commit fixes that behavior.

Why?

It's easy to reproduce this if I run something that creates a lot of short-lived processes (e.g. C/C++/Rust compilation). The agent eventually gets into a permanently broken state.

When there are errors in processing `prefetch` events,
the goroutine that processes them would exit silently. If this happened
to all the workers, the entire agent would seize up
as no more events could be processed.
This commit fixes that behavior.
@umanwizard umanwizard requested a review from a team as a code owner April 11, 2024 15:29
Copy link
Member

@kakkoyun kakkoyun left a comment

Choose a reason for hiding this comment

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

Good catch!

Do these errors are regular ones of panics?

Also why don't we add the mentioned metrics in this PR?

pkg/profiler/cpu/cpu.go Outdated Show resolved Hide resolved
@umanwizard
Copy link
Contributor Author

@kakkoyun

Do these errors are regular ones of panics?

They are regular errors

Also why don't we add the mentioned metrics in this PR?

I have now added them

@brancz brancz merged commit 818a27c into parca-dev:main Apr 11, 2024
11 of 12 checks passed
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

Successfully merging this pull request may close these issues.

4 participants