Uh oh!
There was an error while loading. Please reload this page.
gh-120158: Fix inconsistent monitoring state when setting events too frequently - #141845
Conversation
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
commented
Nov 22, 2025
🤖 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. |
Uh oh!
There was an error while loading. Please reload this page.
Thanks @colesbury for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
…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>
GH-141879 is a backport of this pull request to the 3.14 branch. |
Sorry, @colesbury, I could not cleanly backport this to |
…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>
GH-141880 is a backport of this pull request to the 3.13 branch. |
…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)
…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>
…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.
…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.
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()totest_free_threading.test_monitoringto avoid overflowing the global version counter.test_free_threading.test_monitoring.SetProfileMultiThreaded.test_instrumentation#120158