gh-143460: Skip infinite recusion tests for infinite stack size#143606
Merged
Fidget-Spinner merged 5 commits intopython:mainfrom Jan 9, 2026
Merged
gh-143460: Skip infinite recusion tests for infinite stack size#143606Fidget-Spinner merged 5 commits intopython:mainfrom
Fidget-Spinner merged 5 commits intopython:mainfrom
Conversation
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 at least try to avoid failing a PGO build running tests due to an unlimited stack size being set. Signed-off-by: Jan André Reuter <[email protected]>
picnixz
reviewed
Jan 9, 2026
Signed-off-by: Jan André Reuter <[email protected]>
Signed-off-by: Jan André Reuter <[email protected]>
picnixz
reviewed
Jan 9, 2026
Signed-off-by: Jan André Reuter <[email protected]>
Signed-off-by: Jan André Reuter <[email protected]>
|
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 request
Jan 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 at least try to avoid failing a PGO build running tests due to an unlimited stack size being set. (cherry picked from commit 61e0366) Co-authored-by: Jan André Reuter <[email protected]> Signed-off-by: Jan André Reuter <[email protected]>
|
GH-143619 is a backport of this pull request to the 3.14 branch. |
Fidget-Spinner
pushed a commit
that referenced
this pull request
Jan 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 at least try to avoid failing a PGO build running tests due to an unlimited stack size being set. (cherry picked from commit 61e0366) Signed-off-by: Jan André Reuter <[email protected]> Co-authored-by: Jan André Reuter <[email protected]>
reidenong
pushed a commit
to reidenong/cpython
that referenced
this pull request
Jan 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 at least try to avoid failing a PGO build running tests due to an unlimited stack size being set. Signed-off-by: Jan André Reuter <[email protected]>
thunder-coding
pushed a commit
to thunder-coding/cpython
that referenced
this pull request
Feb 15, 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 at least try to avoid failing a PGO build running tests due to an unlimited stack size being set. Signed-off-by: Jan André Reuter <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Avoid tests being killed due to OOM on Linux if a system is configured with
ulimit -s unlimitedby skipping tests relying on infinite recursion viainfinite_recursionwith a high passed number.While unclear if Python should support
ulimit -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 lets
makepass on the systems I've tested on (with PGO enabled),make testwill fail withulimit -s unlimited.On a system with sufficient amount of memory, I saw several of these errors:
whereas on my personal machine, I saw some tests with typical recursion (not using
infinite_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 with
ulimit -s unlimited.test_functools/test_json#143460