Skip to content

chore(profiling): also wrap faulthandler.disable#18167

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
mainfrom
kowalski/chore-profiling-also-wrap-faulthandler-disable
May 20, 2026
Merged

chore(profiling): also wrap faulthandler.disable#18167
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
mainfrom
kowalski/chore-profiling-also-wrap-faulthandler-disable

Conversation

@KowalskiThomas

Copy link
Copy Markdown
Contributor

Description

As reported by the Codex Security Scan, follow-up to #17998 to also support disabling Python's fault handler.

@KowalskiThomas KowalskiThomas added changelog/no-changelog A changelog entry is not required for this PR. Profiling Continous Profling labels May 19, 2026
@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented May 19, 2026

Copy link
Copy Markdown

Codeowners resolved as

ddtrace/profiling/_faulthandler.py                                      @DataDog/profiling-python
tests/profiling/test_faulthandler.py                                    @DataDog/profiling-python

@KowalskiThomas KowalskiThomas changed the title chore(profiling): also wrap faulthandler.disable chore(profiling): also wrap faulthandler.disable May 19, 2026
@datadog-official

datadog-official Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

Tests

Fix all issues with BitsAI or with Cursor

⚠️ Warnings

❄️ 1 New flaky test detected

test_faulthandler_disable_concurrent_with_enable from test_faulthandler.py   View in Datadog (Fix with Cursor)
Expected status 0, got 1.
=== Captured STDOUT ===
=== End of captured STDOUT ===
=== Captured STDERR ===
Traceback (most recent call last):
  File "tests/profiling/test_faulthandler.py", line 584, in <module>
    assert not still_alive, f"{len(still_alive)} thread(s) deadlocked"
AssertionError: 1 thread(s) deadlocked
=== End of captured STDERR ===

New test introduced in this PR is flaky.

View in Flaky Test Management

ℹ️ Info

No other issues found (see more)

🧪 All tests passed

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 581e792 | Docs | Datadog PR Page | Give us feedback!

@KowalskiThomas
KowalskiThomas marked this pull request as ready for review May 20, 2026 12:01
@KowalskiThomas
KowalskiThomas requested a review from a team as a code owner May 20, 2026 12:01
@KowalskiThomas
KowalskiThomas requested a review from taegyunkim May 20, 2026 12:01

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d79b83b67b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ddtrace/profiling/_faulthandler.py Outdated
Comment thread ddtrace/profiling/_faulthandler.py Outdated
@vlad-scherbich

Copy link
Copy Markdown
Contributor

@KowalskiThomas are the two Codex's comments valid?

@KowalskiThomas
KowalskiThomas force-pushed the kowalski/chore-profiling-also-wrap-faulthandler-disable branch from d79b83b to 3cbb769 Compare May 20, 2026 12:34
@KowalskiThomas

Copy link
Copy Markdown
Contributor Author

@vlad-scherbich Yeah, valid and I just pushed the necessary fixes!

Comment thread ddtrace/profiling/_faulthandler.py Outdated
KowalskiThomas and others added 2 commits May 20, 2026 15:53
Co-authored-by: Vlad Scherbich <vlad.scherbich@datadoghq.com>
@KowalskiThomas
KowalskiThomas force-pushed the kowalski/chore-profiling-also-wrap-faulthandler-disable branch from 7f54e57 to 581e792 Compare May 20, 2026 13:54
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 0f6f41d into main May 20, 2026
449 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the kowalski/chore-profiling-also-wrap-faulthandler-disable branch May 20, 2026 15:44
vlad-scherbich pushed a commit that referenced this pull request May 20, 2026
## Description

As reported by the [Codex Security Scan](https://chatgpt.com/codex/cloud/security/findings/535de99d265c8191b2bb3d8639b2f523?repo=https%3A%2F%2Fgithub.com%2FDataDog%2Fdd-trace-py&sev=low), follow-up to #17998 to also support disabling Python's fault handler.	

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