8000 [3.11] gh-106883: Make test_current_frames_exceptions_deadlock faster by diegorusso · Pull Request #131182 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[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

Merged
merged 2 commits into from
Mar 14, 2025

Conversation

diegorusso
Copy link
Contributor
@diegorusso diegorusso commented Mar 13, 2025

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.

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.
@bedevere-bot
Copy link

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

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Mar 13, 2025
@python python deleted a comment from bedevere-bot Mar 13, 2025
@diegorusso
Copy link
Contributor Author

!buildbot ppc64le

@bedevere-bot
Copy link

🤖 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: ppc64le

The builders matched are:

  • PPC64LE RHEL8 LTO + PGO PR
  • PPC64LE Fedora Rawhide Clang PR
  • PPC64LE Fedora Rawhide NoGIL PR
  • PPC64LE Fedora Rawhide PR
  • PPC64LE CentOS9 PR
  • PPC64LE Fedora Rawhide Refleaks PR
  • PPC64LE Fedora Stable LTO + PGO PR
  • PPC64LE Fedora Rawhide Clang Installed PR
  • PPC64LE Fedora Stable PR
  • PPC64LE Fedora Rawhide NoGIL refleaks PR
  • PPC64LE CentOS9 LTO + PGO PR
  • PPC64LE CentOS9 LTO PR
  • PPC64LE Fedora Rawhide LTO PR
  • PPC64LE Fedora Stable Refleaks PR
  • PPC64LE Fedora Stable Clang PR
  • PPC64LE RHEL8 LTO PR
  • PPC64LE Fedora Stable LTO PR
  • PPC64LE CentOS9 Refleaks PR
  • PPC64LE RHEL8 Refleaks PR
  • PPC64LE RHEL8 PR
  • PPC64LE Fedora Stable Clang Installed PR
  • PPC64LE Fedora Rawhide LTO + PGO PR

# 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
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. Consider adding @support.requires_resource("cpu") if this test can take a long time to run.
  2. You should use support.SHORT_TIMEOUT or support.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!

Copy link
Contributor Author

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 :)

Copy link
Contributor Author

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.

@diegorusso
Copy link
Contributor Author

!buildbot ppc64le

@bedevere-bot
Copy link

🤖 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: ppc64le

The builders matched are:

  • PPC64LE RHEL8 LTO + PGO PR
  • PPC64LE Fedora Rawhide Clang PR
  • PPC64LE Fedora Rawhide NoGIL PR
  • PPC64LE Fedora Rawhide PR
  • PPC64LE CentOS9 PR
  • PPC64LE Fedora Rawhide Refleaks PR
  • PPC64LE Fedora Stable LTO + PGO PR
  • PPC64LE Fedora Rawhide Clang Installed PR
  • PPC64LE Fedora Stable PR
  • PPC64LE Fedora Rawhide NoGIL refleaks PR
  • PPC64LE CentOS9 LTO + PGO PR
  • PPC64LE CentOS9 LTO PR
  • PPC64LE Fedora Rawhide LTO PR
  • PPC64LE Fedora Stable Refleaks PR
  • PPC64LE Fedora Stable Clang PR
  • PPC64LE RHEL8 LTO PR
  • PPC64LE Fedora Stable LTO PR
  • PPC64LE CentOS9 Refleaks PR
  • PPC64LE RHEL8 Refleaks PR
  • PPC64LE RHEL8 PR
  • PPC64LE Fedora Stable Clang Installed PR
  • PPC64LE Fedora Rawhide LTO + PGO PR

@diegorusso diegorusso changed the title [3.11] gh-106883: Increase timeout for a test_sys test [3.11] gh-106883: Make test_current_frames_exceptions_deadlock faster Mar 13, 2025
@diegorusso diegorusso requested a review from colesbury March 13, 2025 15:13
Copy link
Contributor
@colesbury colesbury left a comment

Choose a reason for hiding this comment

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

LGTM

@diegorusso
Copy link
Contributor Author

@pablogsal have a look. All the buildbot failures are not related to this PR.

@pablogsal
Copy link
Member

LGTM

Thanks a lot @diegorusso for the investigation and @colesbury for the review!

@pablogsal pablogsal merged commit f576d31 into python:3.11 Mar 14, 2025
35 of 44 checks passed
@diegorusso diegorusso deleted the gh-106883-timeout branch April 4, 2025 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0