Skip to content

gh-137185: Fix _Py_DumpStack() async signal safety#137187

Merged
colesbury merged 2 commits into
python:mainfrom
colesbury:gh-137185-dump-stack
Jul 29, 2025
Merged

gh-137185: Fix _Py_DumpStack() async signal safety#137187
colesbury merged 2 commits into
python:mainfrom
colesbury:gh-137185-dump-stack

Conversation

@colesbury

@colesbury colesbury commented Jul 28, 2025

Copy link
Copy Markdown
Contributor

Call backtrace() once when installing the signal handler to ensure that libgcc is dynamically loaded outside the signal handler.

This fixes a "signal-unsafe call inside of a signal" TSan error from test_faulthandler.test_enable_fd.

Call backtrace() once when installing the signal handler to ensure that
libgcc is dynamically loaded outside the signal handler.

This fixes a "signal-unsafe call inside of a signal" TSan error from
test_faulthandler.test_enable_fd.

@ZeroIntensity ZeroIntensity left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Comment thread Python/traceback.c Outdated
@colesbury
colesbury enabled auto-merge (squash) July 29, 2025 14:03
@colesbury
colesbury merged commit 11a8652 into python:main Jul 29, 2025
41 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @colesbury for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 29, 2025
…137187)

Call backtrace() once when installing the signal handler to ensure that
libgcc is dynamically loaded outside the signal handler.

This fixes a "signal-unsafe call inside of a signal" TSan error from
test_faulthandler.test_enable_fd.
(cherry picked from commit 11a8652)

Co-authored-by: Sam Gross <colesbury@gmail.com>
@bedevere-app

bedevere-app Bot commented Jul 29, 2025

Copy link
Copy Markdown

GH-137206 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jul 29, 2025
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 2025
…137187)

Call backtrace() once when installing the signal handler to ensure that
libgcc is dynamically loaded outside the signal handler.

This fixes a "signal-unsafe call inside of a signal" TSan error from
test_faulthandler.test_enable_fd.
colesbury added a commit that referenced this pull request Oct 7, 2025
… (gh-137206)

Call backtrace() once when installing the signal handler to ensure that
libgcc is dynamically loaded outside the signal handler.

This fixes a "signal-unsafe call inside of a signal" TSan error from
test_faulthandler.test_enable_fd.
(cherry picked from commit 11a8652)

Co-authored-by: Sam Gross <colesbury@gmail.com>
@colesbury
colesbury deleted the gh-137185-dump-stack branch February 20, 2026 14:50
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.

3 participants