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-141794: Reduce size of compiler stress tests to fix Android warnings by mhsmith · Pull Request #142263 · python/cpython

Conversation

@mhsmith

@mhsmith mhsmith commented Dec 4, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

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.

  • Issue: Compiling executors can result in excessively large amounts of machine code. #141794

Sorry, something went wrong.

Uh oh!

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

All reactions
@mhsmith
Reduce size of compiler stress tests
8c5cd5a
@mhsmith
mhsmith requested review from Eclips4 and tomasr8 as code owners December 4, 2025 17:04
@mhsmith mhsmith added needs backport to 3.13 only 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
@bedevere-app bedevere-app Bot mentioned this pull request Dec 4, 2025
Compiling executors can result in excessively large amounts of machine code. #141794
Open
@bedevere-app bedevere-app Bot added the awaiting review label Dec 4, 2025
@mhsmith mhsmith added the skip news label Dec 4, 2025
@mhsmith
mhsmith marked this pull request as draft December 4, 2025 17:18
@bedevere-app bedevere-app Bot removed the awaiting review label Dec 4, 2025
mhsmith added 2 commits December 4, 2025 19:10
@mhsmith
Make tests smaller on Android only
042f0d9
@mhsmith
Merge remote-tracking branch 'origin/main' into android-oom
d0b2444
@mhsmith

mhsmith commented Dec 7, 2025

Copy link
Copy Markdown
Member Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

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

@mhsmith
mhsmith marked this pull request as ready for review December 7, 2025 19:48
@bedevere-app bedevere-app Bot added the awaiting review label Dec 7, 2025
Eclips4
Eclips4 approved these changes Dec 7, 2025
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Dec 7, 2025
@Eclips4
Eclips4 merged commit f193c8f into python:main Dec 7, 2025
50 checks passed

Uh oh!

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

@miss-islington-app

miss-islington-app Bot commented Dec 7, 2025

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting merge label Dec 7, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 7, 2025
@mhsmith @miss-islington
pythongh-141794: Reduce size of compiler stress tests to fix Android …
234148a
…warnings (pythonGH-142263)

(cherry picked from commit f193c8f)

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

miss-islington-app Bot commented Dec 7, 2025

Copy link
Copy Markdown

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
All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington-app miss-islington-app Bot assigned Eclips4 Dec 7, 2025
@bedevere-app

bedevere-app Bot commented Dec 7, 2025

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@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
@miss-islington @mhsmith
[3.14] gh-141794: Reduce size of compiler stress tests to fix Android…
d2f5a0e
… 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
@mhsmith
[3.13] pythongh-141794: Reduce size of compiler stress tests to fix A…
4032012
…ndroid warnings (pythonGH-142263)

(cherry picked from commit f193c8f)

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

bedevere-app Bot commented Dec 8, 2025

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Dec 8, 2025
Eclips4 pushed a commit that referenced this pull request Dec 8, 2025
@mhsmith
[3.13] gh-141794: Reduce size of compiler stress tests to fix Android…
2ef7698
… warnings (GH-142263) (#142409)

(cherry picked from commit f193c8f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Eclips4 Eclips4 Eclips4 approved these changes
@tomasr8 tomasr8 Awaiting requested review from tomasr8 tomasr8 is a code owner

Uh oh!

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

Assignees

@Eclips4 Eclips4

Labels

skip news tests Tests in the Lib/test dir

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.

2 participants

@mhsmith @Eclips4
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.