Conversation
|
Many thanks again @apangin ❤️ |
apangin
added a commit
that referenced
this pull request
Nov 18, 2025
(cherry picked from commit 763616a)
apangin
added a commit
that referenced
this pull request
Nov 18, 2025
(cherry picked from commit 763616a)
apangin
added a commit
that referenced
this pull request
Nov 18, 2025
Signed-off-by: Andrei Pangin <[email protected]>
apangin
added a commit
that referenced
this pull request
Nov 18, 2025
Signed-off-by: Andrei Pangin <[email protected]>
apangin
added a commit
that referenced
this pull request
Nov 18, 2025
Signed-off-by: Andrei Pangin <[email protected]> (cherry picked from commit b855e0c)
jerrinot
added a commit
to questdb/questdb
that referenced
this pull request
Nov 28, 2025
this version has a workaround for a bug in kernel 6.17 - async-profiler/async-profiler#1599
jbachorik
pushed a commit
to DataDog/async-profiler
that referenced
this pull request
Jan 2, 2026
(cherry picked from commit 763616a)
jbachorik
pushed a commit
to DataDog/async-profiler
that referenced
this pull request
Jan 2, 2026
…ler#1599) Signed-off-by: Andrei Pangin <[email protected]> (cherry picked from commit b855e0c)
jbachorik
pushed a commit
to DataDog/async-profiler
that referenced
this pull request
Jan 6, 2026
(cherry picked from commit 763616a)
jbachorik
pushed a commit
to DataDog/async-profiler
that referenced
this pull request
Jan 6, 2026
…ler#1599) Signed-off-by: Andrei Pangin <[email protected]> (cherry picked from commit b855e0c)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implement workaround for the Linux kernel bug that causes the entire system to hang when running CPU profiler with perf_events engine.
Related issues
#1578
Motivation and context
PERF_EVENT_IOC_REFRESHcontrol allows to disable perf_event automatically on counter overflow. Async-profiler uses this control to temporarily disable perf_event while it is processed inside the signal handler. Without this, event could be recursively triggered again and again during processing. Event is then re-enabled just before return from the signal handler.In Linux 6.16.x and 6.17.x, there is a kernel bug that causes a deadlock when perf_event is automatically disabled inside hrtimer interrupt handler. To workaround this bug, we do not use
PERF_EVENT_IOC_REFRESHfeature, but instead disable and re-enable the event manually inside a signal handler. To avoid an extra syscall, the workaround is applied only when running CPU profiling on the affected kernel versions.How has this been tested?
Ran
cpu-clockandcyclesprofiling on Linux versions 6.14, 6.16 and 6.17.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.