GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-94675: Add a regression test for rjsmin re slowdown by hroncok · Pull Request #94685 · python/cpython

Conversation

@hroncok

@hroncok hroncok commented Jul 8, 2022 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • Issue: Python 3.11.0b3 chockes on regex sub from rjsmin, time grows seemingly exponentially #94675

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@hroncok
pythongh-94675: Add a regression test for rjsmin re slowdown
63f9899
@bedevere-bot bedevere-bot added awaiting review tests Tests in the Lib/test dir labels Jul 8, 2022
@hroncok hroncok mentioned this pull request Jul 8, 2022
Python 3.11.0b3 chockes on regex sub from rjsmin, time grows seemingly exponentially #94675
Closed
@hroncok

hroncok commented Jul 8, 2022

Copy link
Copy Markdown
Contributor Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hroncok
fixup! pythongh-94675: Add a regression test for rjsmin re slowdown
ee602ea
Use multiprocessing to kill the test after SHORT_TIMEOUT.
@hroncok

hroncok commented Jul 8, 2022

Copy link
Copy Markdown
Contributor Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@AlexWaygood AlexWaygood added the topic-regex label Jul 8, 2022
hroncok
hroncok commented Jul 8, 2022
View reviewed changes
Comment thread Lib/test/test_re.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@AlexWaygood
AlexWaygood requested review from gpshead and serhiy-storchaka July 8, 2022 11:16
arhadthedev
arhadthedev reviewed Jul 8, 2022
View reviewed changes
Comment thread Misc/NEWS.d/next/Tests/2022-07-08-12-22-00.gh-issue-94675.IiTs5f.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@hroncok @arhadthedev
Fix typos
c8a850e
Co-authored-by: Oleg Iarygin <[email protected]>
@hroncok

This comment was marked as outdated.

Sign in to view
tiran
tiran reviewed Jul 8, 2022
View reviewed changes
Comment thread Lib/test/test_re.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@AlexWaygood AlexWaygood added the needs backport to 3.11 only security fixes label Jul 8, 2022
@hroncok
Skip the test without multiprocessing
7a03947
gpshead
gpshead approved these changes Jul 8, 2022
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels Jul 8, 2022
hauntsaninja
hauntsaninja reviewed Jul 8, 2022
View reviewed changes

@hauntsaninja hauntsaninja left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tiran

tiran commented Jul 8, 2022

Copy link
Copy Markdown
Member

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hroncok added a commit to fedora-python/cpython that referenced this pull request Jul 11, 2022
@hroncok
00385: pythongh-94675: Add a regression test for rjsmin re slowdown
6f1cf68
This tests a speed regression in the re module
which prevented chromium from building in Fedora.

python#94685
@hroncok

hroncok commented Jul 19, 2022

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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

bedevere-bot commented Jul 19, 2022

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

gpshead commented Jul 19, 2022

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tiran
Merge branch 'main' into test_regression_gh94675
d17bbba
@hroncok

hroncok commented Jul 19, 2022

Copy link
Copy Markdown
Contributor Author

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

gpshead reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hroncok

hroncok commented Jul 26, 2022

Copy link
Copy Markdown
Contributor Author

Where do I see the buildbot result?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tiran

tiran commented Jul 26, 2022

Copy link
Copy Markdown
Member

Let me update and re-run the buildbots again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tiran
Merge branch 'main' into test_regression_gh94675
54b7abf
@tiran tiran added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jul 26, 2022
@bedevere-bot

bedevere-bot commented Jul 26, 2022

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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
@hroncok @hrnciar
00385: pythongh-94675: Add a regression test for rjsmin re slowdown
0d31185
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
@bedevere-bot bedevere-bot removed the awaiting merge label Aug 3, 2022
@miss-islington

miss-islington commented Aug 3, 2022

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

bedevere-bot commented Aug 3, 2022

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 3, 2022
@hroncok @miss-islington
pythongh-94675: Add a regression test for rjsmin re slowdown (pythonG…
9175421
…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 <[email protected]>
Co-authored-by: Christian Heimes <[email protected]>
(cherry picked from commit fe23c00)

Co-authored-by: Miro Hrončok <[email protected]>
miss-islington added a commit that referenced this pull request Aug 3, 2022
@miss-islington @hroncok
gh-94675: Add a regression test for rjsmin re slowdown (GH-94685)
1bd1e37
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 <[email protected]>
Co-authored-by: Christian Heimes <[email protected]>
(cherry picked from commit fe23c00)

Co-authored-by: Miro Hrončok <[email protected]>
@hroncok
hroncok deleted the test_regression_gh94675 branch August 5, 2022 09:58
@hroncok

hroncok commented Aug 5, 2022

Copy link
Copy Markdown
Contributor Author

@gpshead Thanks for merging.

gpshead reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

daandemeyer pushed a commit to daandemeyer/python-rpm that referenced this pull request Nov 17, 2022
@hroncok
Fix speed regression in the re module which prevented chromium from b…
0b91c9e
…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

Reviewers

@arhadthedev arhadthedev arhadthedev left review comments
@hauntsaninja hauntsaninja hauntsaninja left review comments
@gpshead gpshead gpshead approved these changes
@serhiy-storchaka serhiy-storchaka Awaiting requested review from serhiy-storchaka
+1 more reviewer
@tiran tiran tiran left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@gpshead gpshead

Labels

tests Tests in the Lib/test dir topic-regex

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

8 participants

@hroncok @tiran @bedevere-bot @gpshead @miss-islington @arhadthedev @hauntsaninja @AlexWaygood
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.