Skip to content

gh-144418: Increase Android testbed emulator RAM to 4 GB#148054

Merged
freakboy3742 merged 7 commits intopython:mainfrom
mhsmith:android-ram
Apr 6, 2026
Merged

gh-144418: Increase Android testbed emulator RAM to 4 GB#148054
freakboy3742 merged 7 commits intopython:mainfrom
mhsmith:android-ram

Conversation

@mhsmith
Copy link
Copy Markdown
Member

@mhsmith mhsmith commented Apr 3, 2026

@mhsmith mhsmith added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Apr 3, 2026
@mhsmith
Copy link
Copy Markdown
Member Author

mhsmith commented Apr 3, 2026

!buildbot android

@bedevere-bot

This comment was marked as outdated.

@mhsmith
Copy link
Copy Markdown
Member Author

mhsmith commented Apr 4, 2026

!buildbot aarch64 Android

@bedevere-bot

This comment was marked as outdated.

@mhsmith
Copy link
Copy Markdown
Member Author

mhsmith commented Apr 4, 2026

Testing this has completely broken the aarch64 buildbot in a similar way to #142387, so I've taken it offline until I have a chance to fix it.

@mhsmith
Copy link
Copy Markdown
Member Author

mhsmith commented Apr 4, 2026

Specifically, I deleted the existing emulator, and it failed to recreate because it got stuck in a loop of "EGLContext creation failed" crashes. However, the problem isn't specific to this PR; it also happens on the main branch now that the old emulator is gone.

I'll fix this next week, but I don't think it needs to hold up this PR. It works on GitHub Actions, which was its main purpose, and on the x86_64 buildbot. And I've tested it locally on an aarch64 macOS machine, including all of the following cases:

  • Emulator doesn't exist
  • Emulator exists and its RAM size needs to change
  • Emulator exists and its RAM size doesn't need to change

The RAM size can be displayed using the following command:

./android.py test --managed maxVersion -v -- -c 'print([line for line in open("/proc/meminfo") if "MemTotal" in line][0])'

@mhsmith mhsmith marked this pull request as ready for review April 4, 2026 22:08
@mhsmith mhsmith requested a review from freakboy3742 as a code owner April 4, 2026 22:08
Copy link
Copy Markdown
Contributor

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

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

Annoying that it's needed, but this all makes sense, and works well in my testing.

@freakboy3742 freakboy3742 merged commit a95ee3a into python:main Apr 6, 2026
37 checks passed
@miss-islington-app
Copy link
Copy Markdown

Thanks @mhsmith for the PR, and @freakboy3742 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 Apr 6, 2026
…nGH-148054)

Pre-create the Android emulator image so that the the configuration can be
modified to use 4GB of RAM.
(cherry picked from commit a95ee3a21d97afdbe6bd2ce4cd8343a36cd13b02)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 6, 2026

GH-148150 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 Apr 6, 2026
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 6, 2026
…nGH-148054)

Pre-create the Android emulator image so that the the configuration can be
modified to use 4GB of RAM.
(cherry picked from commit a95ee3a21d97afdbe6bd2ce4cd8343a36cd13b02)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 6, 2026

GH-148151 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 Apr 6, 2026
freakboy3742 pushed a commit that referenced this pull request Apr 6, 2026
…48054) (#148150)

Pre-create the Android emulator image so that the the configuration can be
modified to use 4GB of RAM.
(cherry picked from commit a95ee3a)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
freakboy3742 pushed a commit that referenced this pull request Apr 6, 2026
…48054) (#148151)

Pre-create the Android emulator image so that the the configuration can be
modified to use 4GB of RAM.
(cherry picked from commit a95ee3a)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
@bedevere-bot
Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 CentOS9 NoGIL Refleaks 3.x (tier-1) has failed when building commit a95ee3a.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1610/builds/3158) and take a look at the build logs.
  4. Check if the failure is related to this commit (a95ee3a) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1610/builds/3158

Failed tests:

  • test_free_threading

Test leaking resources:

  • test_free_threading: file descriptors

Summary of the results of the build (if available):

==

Click to see traceback logs
remote: Enumerating objects: 12, done.        
remote: Counting objects:  16% (1/6)        
remote: Counting objects:  33% (2/6)        
remote: Counting objects:  50% (3/6)        
remote: Counting objects:  66% (4/6)        
remote: Counting objects:  83% (5/6)        
remote: Counting objects: 100% (6/6)        
remote: Counting objects: 100% (6/6), done.        
remote: Compressing objects:  20% (1/5)        
remote: Compressing objects:  40% (2/5)        
remote: Compressing objects:  60% (3/5)        
remote: Compressing objects:  80% (4/5)        
remote: Compressing objects: 100% (5/5)        
remote: Compressing objects: 100% (5/5), done.        
remote: Total 12 (delta 1), reused 6 (delta 1), pack-reused 6 (from 2)        
From https://github.com/python/cpython
 * branch                    main       -> FETCH_HEAD
Note: switching to 'a95ee3a21d97afdbe6bd2ce4cd8343a36cd13b02'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at a95ee3a21d9 gh-144418: Increase Android testbed emulator RAM to 4 GB (#148054)
Switched to and reset branch 'main'

configure: WARNING: no system libmpdec found; falling back to pure-Python version for the decimal module

make: *** [Makefile:2530: buildbottest] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android testbed emulator needs more RAM

3 participants