Skip to content

Conversation

@colesbury
Copy link
Contributor

@colesbury colesbury commented Nov 22, 2025

If we overflowed the global version counter (i.e., after 2*24 calls to _PyMonitoring_SetEvents), we bailed out after setting global monitoring events but before instrumenting code objects, which led to assertion errors later on.

Also add a time.sleep() to test_free_threading.test_monitoring to avoid overflowing the global version counter.

If we overflowed the global version counter (i.e., after 2*24 calls to
_PyMonitoring_SetEvents), we bailed out after setting global monitoring
events but before insturmenting code objects, which led to assertion
errors later on.

Also add a time.sleep() to test_free_threading.test_monitoring to avoid
overflowing the global version counter.
@bedevere-bot
Copy link

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

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F141845%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 22, 2025
@colesbury colesbury merged commit e457d60 into python:main Nov 23, 2025
69 checks passed
@miss-islington-app
Copy link

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

@colesbury colesbury deleted the gh-120158-fix-assertion branch November 23, 2025 15:07
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 23, 2025
…s too frequently (pythongh-141845)

If we overflowed the global version counter (i.e., after 2*24 calls to
`_PyMonitoring_SetEvents`), we bailed out after setting global monitoring
events but before instrumenting code objects, which led to assertion errors
later on.

Also add a `time.sleep()` to `test_free_threading.test_monitoring` to avoid
overflowing the global version counter.
(cherry picked from commit e457d60)

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

bedevere-app bot commented Nov 23, 2025

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

@miss-islington-app
Copy link

Sorry, @colesbury, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker e457d60daafe66534283e0f79c81517634408e57 3.13

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Nov 23, 2025
colesbury added a commit to colesbury/cpython that referenced this pull request Nov 23, 2025
…g events too frequently (pythongh-141845)

If we overflowed the global version counter (i.e., after 2*24 calls to
`_PyMonitoring_SetEvents`), we bailed out after setting global monitoring
events but before instrumenting code objects, which led to assertion errors
later on.

Also add a `time.sleep()` to `test_free_threading.test_monitoring` to avoid
overflowing the global version counter.
(cherry picked from commit e457d60)

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

bedevere-app bot commented Nov 23, 2025

GH-141880 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 23, 2025
colesbury added a commit that referenced this pull request Nov 23, 2025
…ts too frequently (gh-141845) (gh-141880)

If we overflowed the global version counter (i.e., after 2*24 calls to
`_PyMonitoring_SetEvents`), we bailed out after setting global monitoring
events but before instrumenting code objects, which led to assertion errors
later on.

Also add a `time.sleep()` to `test_free_threading.test_monitoring` to avoid
overflowing the global version counter.
(cherry picked from commit e457d60)
colesbury added a commit that referenced this pull request Nov 23, 2025
…ts too frequently (gh-141845) (gh-141879)

If we overflowed the global version counter (i.e., after 2*24 calls to
`_PyMonitoring_SetEvents`), we bailed out after setting global monitoring
events but before instrumenting code objects, which led to assertion errors
later on.

Also add a `time.sleep()` to `test_free_threading.test_monitoring` to avoid
overflowing the global version counter.
(cherry picked from commit e457d60)

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants