Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[3.13] gh-120158: Fix inconsistent monitoring state when setting events too frequently (gh-141845)#141880

Merged
colesbury merged 1 commit into
python:3.13python/cpython:3.13from
colesbury:backport-e457d60-3.13colesbury/cpython:backport-e457d60-3.13Copy head branch name to clipboard
Nov 23, 2025
Merged

[3.13] gh-120158: Fix inconsistent monitoring state when setting events too frequently (gh-141845)#141880
colesbury merged 1 commit into
python:3.13python/cpython:3.13from
colesbury:backport-e457d60-3.13colesbury/cpython:backport-e457d60-3.13Copy head branch name to clipboard

Conversation

@colesbury

@colesbury colesbury commented Nov 23, 2025

Copy link
Copy Markdown
Contributor

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)

…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>
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.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.