Skip to content

Conversation

@colesbury
Copy link
Contributor

@colesbury colesbury commented Nov 23, 2025

Most of the self.assertTrue(self.called) checks are flaky because the worker threads may sometimes finish before the main thread calls self.during_threads().

Most of the `self.assertTrue(self.called)` checks are flaky because
the worker threads may sometimes finish before the main thread calls
`self.during_threads()`.
@colesbury colesbury added tests Tests in the Lib/test dir needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Nov 23, 2025
@colesbury colesbury added skip news 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section labels Nov 23, 2025
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @colesbury for commit dffc16c 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F141881%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Nov 23, 2025
@colesbury colesbury marked this pull request as ready for review November 23, 2025 18:20
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM. Replacing time.sleep(0.1) with Barrier is a nice fix: sleep() is not a reliable synchronization method. With Barrier, self.called becomes redundant and so can be removed.

@vstinner
Copy link
Member

buildbot/AMD64 Windows11 Refleaks PR

Unrelated failure:

ERROR: test_sample_target_module (test.test_profiling.test_sampling_profiler.test_integration.TestSampleProfilerIntegration.test_sample_target_module)

@colesbury colesbury merged commit 71126ab into python:main Nov 24, 2025
72 of 73 checks passed
@colesbury colesbury deleted the gh-129441-test_instrumentation branch November 24, 2025 16:19
@miss-islington-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 24, 2025
…-141881)

Most of the `self.assertTrue(self.called)` checks are flaky because
the worker threads may sometimes finish before the main thread calls
`self.during_threads()`.
(cherry picked from commit 71126ab)

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

bedevere-app bot commented Nov 24, 2025

GH-141913 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 Nov 24, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 24, 2025
…-141881)

Most of the `self.assertTrue(self.called)` checks are flaky because
the worker threads may sometimes finish before the main thread calls
`self.during_threads()`.
(cherry picked from commit 71126ab)

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

bedevere-app bot commented Nov 24, 2025

GH-141914 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Nov 24, 2025
colesbury added a commit that referenced this pull request Nov 24, 2025
…) (gh-141913)

Most of the `self.assertTrue(self.called)` checks are flaky because
the worker threads may sometimes finish before the main thread calls
`self.during_threads()`.
(cherry picked from commit 71126ab)

Co-authored-by: Sam Gross <colesbury@gmail.com>
colesbury added a commit that referenced this pull request Nov 24, 2025
…) (gh-141914)

Most of the `self.assertTrue(self.called)` checks are flaky because
the worker threads may sometimes finish before the main thread calls
`self.during_threads()`.
(cherry picked from commit 71126ab)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants