Skip to content

Conversation

@mhsmith
Copy link
Member

@mhsmithmhsmith 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.

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

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.

@mhsmithmhsmith marked this pull request as ready for review December 7, 2025 19:48
@Eclips4Eclips4 merged commit f193c8f into python:mainDec 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 <smith@chaquo.com>
@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

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

@bedevere-appbedevere-appbot 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 <smith@chaquo.com>
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 <smith@chaquo.com>
@bedevere-app
Copy link

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

@bedevere-appbedevere-appbot 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip newstestsTests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@mhsmith@Eclips4