Skip to content

chore(profiling): revert ensure correct order of profiler post-fork hooks#17417

Merged
juanjux merged 1 commit into
mainfrom
revert-17183-dd/kowalski/fix/profiler-postfork-sigsegv
Apr 9, 2026
Merged

chore(profiling): revert ensure correct order of profiler post-fork hooks#17417
juanjux merged 1 commit into
mainfrom
revert-17183-dd/kowalski/fix/profiler-postfork-sigsegv

Conversation

@KowalskiThomas

Copy link
Copy Markdown
Contributor

What is this?

This reverts #17183 which seems to have been causing a lot of flakiness in system tests (and crashes there).

image

@KowalskiThomas KowalskiThomas requested review from a team as code owners April 9, 2026 07:54
@KowalskiThomas KowalskiThomas added the Profiling Continous Profling label Apr 9, 2026
@KowalskiThomas KowalskiThomas force-pushed the revert-17183-dd/kowalski/fix/profiler-postfork-sigsegv branch from 2452139 to a931bc9 Compare April 9, 2026 07:56
@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Codeowners resolved as

ddtrace/internal/datadog/profiling/stack/src/sampler.cpp                @DataDog/profiling-python

@KowalskiThomas KowalskiThomas changed the title fix(profiling): revert ensure correct order of profiler post-fork hooks chore(profiling): revert ensure correct order of profiler post-fork hooks Apr 9, 2026
@KowalskiThomas KowalskiThomas added the changelog/no-changelog A changelog entry is not required for this PR. label Apr 9, 2026
@datadog-official

This comment has been minimized.

@juanjux juanjux merged commit bf3c0ac into main Apr 9, 2026
504 of 507 checks passed
@juanjux juanjux deleted the revert-17183-dd/kowalski/fix/profiler-postfork-sigsegv branch April 9, 2026 09:31
gh-worker-dd-mergequeue-cf854d Bot pushed a commit that referenced this pull request Apr 17, 2026
…17418)

## Description

This reverts commit 10f1503 / #17417 and reapplies #17183. See original PR for more info and context. 

On top of the previous PR, it adds fork handlers so that we lock `profile_mtx` pre-fork and unlock it post-fork (after making sure the `ProfilerState` is in a clean state). Doing this allows to avoid cases where the Sampling Thread would try to use corrupt/inconsistent `ProfilerState` data post-fork. 

Co-authored-by: thomas.kowalski <thomas.kowalski@datadoghq.com>
dubloom pushed a commit that referenced this pull request Apr 21, 2026
…17418)

## Description

This reverts commit 10f1503 / #17417 and reapplies #17183. See original PR for more info and context. 

On top of the previous PR, it adds fork handlers so that we lock `profile_mtx` pre-fork and unlock it post-fork (after making sure the `ProfilerState` is in a clean state). Doing this allows to avoid cases where the Sampling Thread would try to use corrupt/inconsistent `ProfilerState` data post-fork. 

Co-authored-by: thomas.kowalski <thomas.kowalski@datadoghq.com>
emmettbutler pushed a commit that referenced this pull request May 6, 2026
…17418)

## Description

This reverts commit 10f1503 / #17417 and reapplies #17183. See original PR for more info and context. 

On top of the previous PR, it adds fork handlers so that we lock `profile_mtx` pre-fork and unlock it post-fork (after making sure the `ProfilerState` is in a clean state). Doing this allows to avoid cases where the Sampling Thread would try to use corrupt/inconsistent `ProfilerState` data post-fork. 

Co-authored-by: thomas.kowalski <thomas.kowalski@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog A changelog entry is not required for this PR. Profiling Continous Profling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants