Skip to content
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

gh-94675: Add a regression test for rjsmin re slowdown #94685

Merged
merged 6 commits into from
Aug 3, 2022

Conversation

hroncok
Copy link
Contributor

@hroncok hroncok commented Jul 8, 2022

@hroncok
Copy link
Contributor Author

hroncok commented Jul 8, 2022

I can confirm that when cherry-picked on 3.11.0b3, the test hangs. Will see what happens next. If you have some tips about how to make the tests fail when it takes longer than X seconds, other than using subprocess, please let me know.

Use multiprocessing to kill the test after SHORT_TIMEOUT.
@hroncok
Copy link
Contributor Author

hroncok commented Jul 8, 2022

If you have some tips about how to make the tests fail when it takes longer than X seconds, other than using subprocess, please let me know.

I've used multiprocessing.

Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
@hroncok

This comment was marked as outdated.

@AlexWaygood AlexWaygood added the needs backport to 3.11 only security fixes label Jul 8, 2022
Copy link
Contributor

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Thanks, this looks great to me.

If there's concern over the use of multiprocessing, note that "tests that run effectively forever when broken" are a different category to me than "does not take too long" — as long as the test suite does not complete successfully, we'll detect the regression ;-)

Here's a recent example of a regression test that runs forever when regressed: #93815

@tiran
Copy link
Member

tiran commented Jul 8, 2022

My concern not about multiprocessing per se. The commit would have broken our WebAssembly buildbots. Neither WASI nor Emscripten support fork() or creation of subprocesses.

hroncok added a commit to fedora-python/cpython that referenced this pull request Jul 11, 2022
This tests a speed regression in the re module
which prevented chromium from building in Fedora.

python#94685
@hroncok
Copy link
Contributor Author

hroncok commented Jul 19, 2022

What can I do to get this merged? It was reviewed and approved. Thanks.

@gpshead gpshead self-assigned this Jul 19, 2022
@gpshead gpshead added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jul 19, 2022
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @gpshead for commit 7a03947 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jul 19, 2022
@gpshead
Copy link
Member

gpshead commented Jul 19, 2022

I can merge it, I queued a buildbot run first to see if the existing chosen timeout is an obvious issue on any.

@hroncok
Copy link
Contributor Author

hroncok commented Jul 19, 2022

Thanks. The timeout is larger than necessary by magnitudes, but better safe than sorry.

@hroncok
Copy link
Contributor Author

hroncok commented Jul 26, 2022

Where do I see the buildbot result?

@tiran
Copy link
Member

tiran commented Jul 26, 2022

Let me update and re-run the buildbots again.

@tiran tiran added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jul 26, 2022
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @tiran for commit 54b7abf 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jul 26, 2022
hrnciar pushed a commit to fedora-python/cpython that referenced this pull request Jul 26, 2022
This tests a speed regression in the re module
which prevented chromium from building in Fedora.

python#94685
@gpshead gpshead merged commit fe23c00 into python:main Aug 3, 2022
@miss-islington
Copy link
Contributor

Thanks @hroncok for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Aug 3, 2022
@bedevere-bot
Copy link

GH-95630 is a backport of this pull request to the 3.11 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 3, 2022
…H-94685)

Adds a regression test for an re slowdown observed by rjsmin.
Uses multiprocessing to kill the test after SHORT_TIMEOUT.

Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
Co-authored-by: Christian Heimes <christian@python.org>
(cherry picked from commit fe23c00)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
miss-islington added a commit that referenced this pull request Aug 3, 2022
Adds a regression test for an re slowdown observed by rjsmin.
Uses multiprocessing to kill the test after SHORT_TIMEOUT.

Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
Co-authored-by: Christian Heimes <christian@python.org>
(cherry picked from commit fe23c00)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
@hroncok hroncok deleted the test_regression_gh94675 branch August 5, 2022 09:58
@hroncok
Copy link
Contributor Author

hroncok commented Aug 5, 2022

@gpshead Thanks for merging.

DaanDeMeyer pushed a commit to DaanDeMeyer/python-rpm that referenced this pull request Nov 17, 2022
…uilding

For details, see python/cpython#94675

Backported from upstream 3.11 branch + python/cpython#94685

Needs bootstrap for test_distutils (assert _sre.MAGIC == MAGIC, "SRE module mismatch").
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir topic-regex
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants