Skip to content

gh-151496: Use process groups in TraceBackend in test_dtrace#152039

Merged
vstinner merged 1 commit into
python:mainfrom
stratakis:more-dtrace-races
Jun 24, 2026
Merged

gh-151496: Use process groups in TraceBackend in test_dtrace#152039
vstinner merged 1 commit into
python:mainfrom
stratakis:more-dtrace-races

Conversation

@stratakis

@stratakis stratakis commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Run the generic DTrace/SystemTap commands in a new process group and terminate the whole group on timeout.

This prevents a forked tracer child from keeping stdout/stderr pipes open after the direct tracer process is killed.

Followup to #151512

Run the generic DTrace/SystemTap commands in a new process group and
terminate the whole group on timeout.

This prevents a forked tracer child from keeping stdout/stderr pipes
open after the direct tracer process is killed.
@stratakis

Copy link
Copy Markdown
Contributor Author

cc @vstinner

@vstinner

Copy link
Copy Markdown
Member

The two CI failures are unrelated to the change. Let me re-run failed jobs.

Tests / Sanitizers / TSan (free-threading) (pull_request): Failing after 33m

test_abc timed out: that's issue gh-151593.

Tests / macOS (free-threading) / build and test (macos-26) (pull_request): Failing after 9m

It's the first time that I see this failure:

FAIL: test_tk_caret (test.test_tkinter.test_misc.MiscTest.test_tk_caret)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/runner/work/cpython/cpython/Lib/test/test_tkinter/test_misc.py", line 487, in test_tk_caret
    self.assertEqual(caret, {'x': 5, 'y': 10, 'height': 20})
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: {'height': 0, 'x': 0, 'y': 0} != {'x': 5, 'y': 10, 'height': 20}
- {'height': 0, 'x': 0, 'y': 0}
?                    ^

+ {'height': 20, 'x': 5, 'y': 10}
?            +        ^       +

@vstinner vstinner added skip news needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jun 24, 2026

@vstinner vstinner 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. Thanks for the fix.

@vstinner vstinner enabled auto-merge (squash) June 24, 2026 12:50
@vstinner vstinner merged commit 1785f4b into python:main Jun 24, 2026
137 of 142 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @stratakis for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Jun 24, 2026

Copy link
Copy Markdown

GH-152082 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jun 24, 2026
vstinner pushed a commit that referenced this pull request Jun 24, 2026
…H-152039) (#152082)

gh-151496: Use process groups in TraceBackend in test_dtrace (GH-152039)

Run the generic DTrace/SystemTap commands in a new process group and
terminate the whole group on timeout.

This prevents a forked tracer child from keeping stdout/stderr pipes
open after the direct tracer process is killed.
(cherry picked from commit 1785f4b)

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

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants