-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
Conversation
hroncok
commented
Jul 8, 2022
•
edited by bedevere-bot
Loading
edited by bedevere-bot
- Issue: Python 3.11.0b3 chockes on regex sub from rjsmin, time grows seemingly exponentially #94675
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.
I've used multiprocessing. |
Misc/NEWS.d/next/Tests/2022-07-08-12-22-00.gh-issue-94675.IiTs5f.rst
Outdated
Show resolved
Hide resolved
This comment was marked as outdated.
This comment was marked as outdated.
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, 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
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. |
This tests a speed regression in the re module which prevented chromium from building in Fedora. python#94685
What can I do to get this merged? It was reviewed and approved. Thanks. |
I can merge it, I queued a buildbot run first to see if the existing chosen timeout is an obvious issue on any. |
Thanks. The timeout is larger than necessary by magnitudes, but better safe than sorry. |
Where do I see the buildbot result? |
Let me update and re-run the buildbots again. |
This tests a speed regression in the re module which prevented chromium from building in Fedora. python#94685
GH-95630 is a backport of this pull request to the 3.11 branch. |
…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>
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>
@gpshead Thanks for merging. |
…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").