-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
[3.11] gh-106883: Make test_current_frames_exceptions_deadlock faster #131182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
On some platforms the test test_current_frames_exceptions_deadlock goes in timeout when CPython is built with debug. The execution time of the test is about 4x and the current timeout is not enough to complete the test.
🤖 New build scheduled with the buildbot fleet by @diegorusso for commit 2bd561d 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F131182%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
!buildbot ppc64le |
🤖 New build scheduled with the buildbot fleet by @diegorusso for commit 2bd561d 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F131182%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
Lib/test/test_sys.py
Outdated
# hence the test fails. | ||
# The timeout is high because on older platforms it takes some time | ||
# for the test to be executed when CPython is built with debug flags. | ||
TIMEOUT = 160 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Consider adding
@support.requires_resource("cpu")
if this test can take a long time to run. - You should use
support.SHORT_TIMEOUT
orsupport.LONG_TIMEOUT
, which scales with--timeout
, so it's longer on slow buildbots.
SHORT_TIMEOUT: It's 30 seconds for make test
and anywhere from 60 seconds - 135 seconds on the three failing buildbots.
LONG_TIMEOUT: 10x SHORT_TIMEOUT.
If SHORT_TIMEOUT
isn't enough, you should really consider making the test faster!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestions. I've actually found a way to make it faster :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, let's see how it goes.
!buildbot ppc64le |
🤖 New build scheduled with the buildbot fleet by @diegorusso for commit abf4144 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F131182%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@pablogsal have a look. All the buildbot failures are not related to this PR. |
LGTM Thanks a lot @diegorusso for the investigation and @colesbury for the review! |
On some platforms the test test_current_frames_exceptions_deadlock goes in timeout when CPython is built with debug.
The execution time of the test is about 4x and the current timeout is not enough to complete the test.
Make the test test_current_frames_exceptions_deadlock faster by decrementing the number of threads to the bare minimum and the number of objects by one order of magnitude.
These conditions are enough for a deadlock to happen.
Make use of support.SHORT_TIMEOUT which is 30 seconds by default.
sys._current_frames
#106883