Skip to content

Conversation

@mhsmith
Copy link
Member

@mhsmith mhsmith commented Dec 4, 2025

This fixes the Android low memory warnings in test_ast and test_compile, previously discussed in #137186 (comment).

These warnings haven't led to a crash so far. However, the warning will only appear during the first test that brings the memory below a threshold. If a later test exhausts the memory completely, then the warning won't appear again, and the process will simply crash. This separation between the warning and the crash makes the crash much more difficult to understand.

I think this may have been what happened in #142228 (comment), which introduced some leaks. Notice in this run, the warning appeared during test_ast, and the crash happened in test_random.

@mhsmith mhsmith added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Dec 4, 2025
@bedevere-app bedevere-app bot added the tests Tests in the Lib/test dir label Dec 4, 2025
@mhsmith mhsmith marked this pull request as draft December 4, 2025 17:18
@mhsmith
Copy link
Member Author

mhsmith commented Dec 7, 2025

I've updated this to change the sizes only on Android, and the tests are now passing on all platforms, so this PR is ready to review.

Due to #142289, the tests are now running on API level 35, so the low memory warnings are much less detailed. Search for the scudo : Can't populate more pages warning in the most recent main branch test, and notice that the warning is not present in the log of this PR.

@mhsmith mhsmith marked this pull request as ready for review December 7, 2025 19:48
@Eclips4 Eclips4 merged commit f193c8f into python:main Dec 7, 2025
50 checks passed
@miss-islington-app
Copy link

Thanks @mhsmith for the PR, and @Eclips4 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 7, 2025
…warnings (pythonGH-142263)

(cherry picked from commit f193c8f)

Co-authored-by: Malcolm Smith <[email protected]>
@miss-islington-app
Copy link

Sorry, @mhsmith and @Eclips4, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker f193c8fe9e1d722c9a7f9a2b15f8f1b913755491 3.13

@bedevere-app
Copy link

bedevere-app bot commented Dec 7, 2025

GH-142386 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Dec 7, 2025
Eclips4 pushed a commit that referenced this pull request Dec 8, 2025
… warnings (GH-142263) (#142386)

gh-141794: Reduce size of compiler stress tests to fix Android warnings (GH-142263)
(cherry picked from commit f193c8f)

Co-authored-by: Malcolm Smith <[email protected]>
mhsmith added a commit to mhsmith/cpython that referenced this pull request Dec 8, 2025
…ndroid warnings (pythonGH-142263)

(cherry picked from commit f193c8f)

Co-authored-by: Malcolm Smith <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Dec 8, 2025

GH-142409 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Dec 8, 2025
Eclips4 pushed a commit that referenced this pull request Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants