Skip to content

fix: Set async-profiler timeout for JFR recordings - #339

Merged
korniltsev-grafanista merged 5 commits into
mainfrom
fix/timeout
Jul 23, 2026
Merged

korniltsev-grafanista merged 5 commits into
mainfrom
fix/timeout

Conversation

@korniltsev-grafanista

Copy link
Copy Markdown
Contributor

This adds an async-profiler timeout to JFR recording commands based on the configured upload interval. It provides a safety net if the scheduled stop does not run, preventing the recording file from growing indefinitely. Related to #338.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 370d303. Configure here.

Comment thread agent/src/main/java/io/pyroscope/javaagent/AsyncProfilerDelegate.java Outdated
@korniltsev-grafanista korniltsev-grafanista changed the title Set async-profiler timeout for JFR recordings fix: Set async-profiler timeout for JFR recordings Jul 22, 2026
Keep the timeout as a fallback and allow scheduled collection to continue if it has already elapsed.
Round fractional durations up to async-profiler's whole-second precision without extending exact durations.
Format is always JFR, so identify the expected async-profiler failure directly.
Use the configured whole seconds plus one to avoid truncating fractional durations.
@korniltsev-grafanista
korniltsev-grafanista merged commit 6a0f121 into main Jul 23, 2026
74 checks passed
@korniltsev-grafanista
korniltsev-grafanista deleted the fix/timeout branch July 23, 2026 01:09
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.

2 participants