Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-143460: Skip infinite recusion tests for infinite stack size#143606

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Fidget-Spinner merged 5 commits intopython:mainfromThyre:fix-gh-143460
Jan 9, 2026

Conversation

@Thyre
Copy link
Contributor

@ThyreThyre commentedJan 9, 2026
edited by bedevere-appbot
Loading

Avoid tests being killed due to OOM on Linux if a system is configured withulimit -s unlimited by skipping tests relying on infinite recursion viainfinite_recursion with a high passed number.

While unclear if Python should supportulimit -s unlimited, we should at least try to avoid failing a PGO build running tests due to an unlimited stack size being set.


Note: While this letsmake pass on the systems I've tested on (with PGO enabled),make test will fail withulimit -s unlimited.
On a system with sufficient amount of memory, I saw several of these errors:

Traceback (most recent call last):  File "/dev/shm/reuter1/jupiter/Python/3.14.2/GCCcore-15.2.0/Python-3.14.2/Lib/test/test_dictviews.py", line 286, in test_deeply_nested_repr    self.assertRaises(RecursionError, repr, d)    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^AssertionError: RecursionError not raised by repr

whereas on my personal machine, I saw some tests with typical recursion (not usinginfinite_recursion) still filling up the memory due to the machine having substantially less RAM. There were also two or three timeouts, but without triggering OOM.

Based on#143460 (comment), I'd consider this acceptable, but I can also do another round of going through the tests to exclude any test that could yield issues withulimit -s unlimited.

Avoid tests being killed due to OOM on Linux if a system is configured with'ulimit -s unlimited' by skipping tests relying on infinite recursion.While unclear if Python should support 'ulimit -s unlimited', we should atleast try to avoid failing a PGO build running tests due to an unlimitedstack size being set.Signed-off-by: Jan André Reuter <j.reuter@fz-juelich.de>
@python-cla-bot
Copy link

python-cla-botbot commentedJan 9, 2026
edited
Loading

All commit authors signed the Contributor License Agreement.

CLA signed

Signed-off-by: Jan André Reuter <j.reuter@fz-juelich.de>
Signed-off-by: Jan André Reuter <j.reuter@fz-juelich.de>
Signed-off-by: Jan André Reuter <j.reuter@fz-juelich.de>
Copy link
Member

@Fidget-SpinnerFidget-Spinner left a comment

Choose a reason for hiding this comment

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

This LGTM. Thanks!

Copy link
Member

@vstinnervstinner left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Jan André Reuter <j.reuter@fz-juelich.de>
@Fidget-SpinnerFidget-Spinner added the needs backport to 3.14bugs and security fixes labelJan 9, 2026
@Fidget-SpinnerFidget-Spinner merged commit61e0366 intopython:mainJan 9, 2026
48 checks passed
@miss-islington-app
Copy link

Thanks@Thyre for the PR, and@Fidget-Spinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJan 9, 2026
…pythonGH-143606)Avoid tests being killed due to OOM on Linux if a system is configured with'ulimit -s unlimited' by skipping tests relying on infinite recursion.While unclear if Python should support 'ulimit -s unlimited', we should atleast try to avoid failing a PGO build running tests due to an unlimitedstack size being set.(cherry picked from commit61e0366)Co-authored-by: Jan André Reuter <jan.andre.reuter@hotmail.de>Signed-off-by: Jan André Reuter <j.reuter@fz-juelich.de>
@bedevere-app
Copy link

GH-143619 is a backport of this pull request to the3.14 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.14bugs and security fixes labelJan 9, 2026
Fidget-Spinner pushed a commit that referenced this pull requestJan 9, 2026
GH-143606) (#143619)gh-143460: Skip infinite recusion tests for infinite stack size (GH-143606)Avoid tests being killed due to OOM on Linux if a system is configured with'ulimit -s unlimited' by skipping tests relying on infinite recursion.While unclear if Python should support 'ulimit -s unlimited', we should atleast try to avoid failing a PGO build running tests due to an unlimitedstack size being set.(cherry picked from commit61e0366)Signed-off-by: Jan André Reuter <j.reuter@fz-juelich.de>Co-authored-by: Jan André Reuter <jan.andre.reuter@hotmail.de>
reidenong pushed a commit to reidenong/cpython that referenced this pull requestJan 12, 2026
…python#143606)Avoid tests being killed due to OOM on Linux if a system is configured with'ulimit -s unlimited' by skipping tests relying on infinite recursion.While unclear if Python should support 'ulimit -s unlimited', we should atleast try to avoid failing a PGO build running tests due to an unlimitedstack size being set.Signed-off-by: Jan André Reuter <j.reuter@fz-juelich.de>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@picnixzpicnixzpicnixz left review comments

@vstinnervstinnervstinner approved these changes

@Fidget-SpinnerFidget-SpinnerFidget-Spinner approved these changes

@encukouencukouAwaiting requested review from encukouencukou is a code owner

@hauntsaninjahauntsaninjaAwaiting requested review from hauntsaninjahauntsaninja is a code owner

@rhettingerrhettingerAwaiting requested review from rhettingerrhettinger is a code owner

@Eclips4Eclips4Awaiting requested review from Eclips4Eclips4 is a code owner

@tomasr8tomasr8Awaiting requested review from tomasr8tomasr8 is a code owner

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@Thyre@vstinner@picnixz@Fidget-Spinner

[8]ページ先頭

©2009-2026 Movatter.jp