gh-137242: Add Android CI job#137186
Conversation
|
The logs are showing a number of "Scudo OOM" warnings similar to those discussed in #121595. However, none of them have been fatal yet. In API level 35 the memory allocator no longer prints such an alarming message when this happens. Instead it will just be a one line message like this (llvm/llvm-project#68444): Luckily, in API level 35 they've also added the ability to print the allocator statistics at any time, with code like this (llvm/llvm-project@5759e3c): import ctypes
ctypes.CDLL(None).mallopt(-205, 0)Based on those statistics, it doesn't look like Python has a memory leak, as the "inuse" column after the test is roughly the same as it was before. So it's probably just temporary high memory use during the test, causing allocations to be directed to the next highest size class. On the buildbot about a year ago, these warnings were often associated with crashes. As described in Android/README.md, we worked around this by running the emulator once to create it, then editing its configuration files to increase the emulator RAM from 2 GB to 4 GB. After that, the warnings continued, but the crashes stopped. But that isn't such a good option on GitHub Actions, because the runner is not persistent, so the extra emulator restart would add about a minute to every CI run. In theory you should be able to avoid this by creating the emulator from a custom hardware profile, but in my experiments, the emulator always ended up with 2 GB of RAM regardless of what it said in the profile. The tests that trigger this are:
These tests all involve parsing an extremely long Python statement. Although they're all skipped on WASM because of limited stack space, reducing the recursion limit does not prevent the warning. What does prevent it is reducing the size of the Python statement, e.g. from 500,000 repetitions to 200,000. Since I haven't seen these tests crash on GitHub Actions yet, I'm not going to change them just now. If they do start crashing, we can change them to reduce the statement size on Android alone, or even on all platforms if it doesn't significantly reduce the strength of the test. |
Sorry, something went wrong.
freakboy3742
left a comment
There was a problem hiding this comment.
One fairly minor comment inline; my other comment is an extension of that one.
Although the action is broken up into steps, the context of those steps is lost when it's embedded in the workflow. Aside from the general ergonomics of being able to follow what stage the workflow is up to, there's very little visibility on the fact that some steps aren't be in invoked - unless you pay close attention, it's not clear that the arm64 run isn't running the tests. I know it's not, and why - but there's no external visibility of that fact (like a clearly skipped build step).
If the constraint against using a workflow is that we would need to reference a specific commit - isn't that commit hash one of the inputs to the release workflow? Does uses not accept variable expansions in workflow references?
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sorry, something went wrong.
@freakboy3742 it does not. But I don't think that it's neccessary or that composite actions would be any different in this regard. |
Sorry, something went wrong.
hugovk
left a comment
There was a problem hiding this comment.
Thank you!
Sorry, something went wrong.
f660ec3
into
python:main
Aug 12, 2025
|
Sorry, @mhsmith and @hugovk, I could not cleanly backport this to |
Sorry, something went wrong.
|
Yes, thanks! |
Sorry, something went wrong.
|
Sorry, @mhsmith and @hugovk, I could not cleanly backport this to |
Sorry, something went wrong.
(cherry picked from commit f660ec3) Co-authored-by: Malcolm Smith <smith@chaquo.com> Co-authored-by: Russell Keith-Magee <russell@keith-magee.com> Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
(cherry picked from commit f660ec3) Co-authored-by: Malcolm Smith <smith@chaquo.com> Co-authored-by: Russell Keith-Magee <russell@keith-magee.com> Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot aarch64 Android 3.x (tier-3) has failed when building commit f660ec3. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/#/builders/1594/builds/3046 Summary of the results of the build (if available): Click to see traceback logsremote: Enumerating objects: 9, done.
remote: Counting objects: 11% (1/9)
remote: Counting objects: 22% (2/9)
remote: Counting objects: 33% (3/9)
remote: Counting objects: 44% (4/9)
remote: Counting objects: 55% (5/9)
remote: Counting objects: 66% (6/9)
remote: Counting objects: 77% (7/9)
remote: Counting objects: 88% (8/9)
remote: Counting objects: 100% (9/9)
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 14% (1/7)
remote: Compressing objects: 28% (2/7)
remote: Compressing objects: 42% (3/7)
remote: Compressing objects: 57% (4/7)
remote: Compressing objects: 71% (5/7)
remote: Compressing objects: 85% (6/7)
remote: Compressing objects: 100% (7/7)
remote: Compressing objects: 100% (7/7), done.
remote: Total 9 (delta 2), reused 2 (delta 2), pack-reused 0 (from 0)
From https://github.com/python/cpython
* branch main -> FETCH_HEAD
Note: switching to 'f660ec37531b5e368a27ba065f73d31ff6fb6680'.
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 f660ec37531 gh-137242: Add Android CI job (#137186)
Switched to and reset branch 'main'
configure: WARNING: no system libmpdec found; falling back to pure-Python version for the decimal module
configure: WARNING: pkg-config is missing. Some dependencies may not be detected correctly.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 192k 100 192k 0 0 1753k 0 --:--:-- --:--:-- --:--:-- 1753k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 42455 100 42455 0 0 469k 0 --:--:-- --:--:-- --:--:-- 469k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 5041k 100 5041k 0 0 33.3M 0 --:--:-- --:--:-- --:--:-- 33.3M
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
73 1257k 73 927k 0 0 10.2M 0 --:--:-- --:--:-- --:--:-- 10.2M
100 1257k 100 1257k 0 0 13.5M 0 --:--:-- --:--:-- --:--:-- 160M
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 635k 100 635k 0 0 5278k 0 --:--:-- --:--:-- --:--:-- 5278k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 479k 100 479k 0 0 5203k 0 --:--:-- --:--:-- --:--:-- 5203k
../../configure: line 4071: pkg-config: command not found
configure: WARNING: no system libmpdec found; falling back to pure-Python version for the decimal module
configure: WARNING: pkg-config is missing. Some dependencies may not be detected correctly.
../../Python/fileutils.c:460:1: warning: unused function 'decode_current_locale' [-Wunused-function]
460 | decode_current_locale(const char* arg, wchar_t **wstr, size_t *wlen,
| ^~~~~~~~~~~~~~~~~~~~~
../../Python/fileutils.c:679:1: warning: unused function 'encode_current_locale' [-Wunused-function]
679 | encode_current_locale(const wchar_t *text, char **str,
| ^~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
../../Modules/_localemodule.c:195:1: warning: unused function 'is_all_ascii' [-Wunused-function]
195 | is_all_ascii(const char *str)
| ^~~~~~~~~~~~
1 warning generated.
../../Modules/pwdmodule.c:69:16: warning: unused variable 'pwd_db_mutex' [-Wunused-variable]
69 | static PyMutex pwd_db_mutex = {0};
| ^~~~~~~~~~~~
1 warning generated.
../../Modules/_hacl/Lib_Memzero0.c:66:6: warning: "Your platform does not support any safe implementation of memzero -- consider a pull request!" [-W#warnings]
66 | #warning "Your platform does not support any safe implementation of memzero -- consider a pull request!"
| ^
1 warning generated.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 8784 100 8784 0 0 203k 0 --:--:-- --:--:-- --:--:-- 204k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 2894 100 2894 0 0 78256 0 --:--:-- --:--:-- --:--:-- 80388
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 43504 100 43504 0 0 1436k 0 --:--:-- --:--:-- --:--:-- 1464k |
Sorry, something went wrong.
|
The aarch64 Android buildbot has been failing intermittently today with this message when building the testbed app: The only explanation I can think of is that it's running low on disk space. I would hope for a more obvious error message if that was the case, but anyway, I've freed up some space and I'll keep an eye on it. EDIT: Looks like it's OK now, so either it was the disk space, or it was something else that was somehow fixed by restarting the worker process. |
Sorry, something went wrong.
(cherry picked from commit f660ec3) Co-authored-by: Malcolm Smith <smith@chaquo.com> Co-authored-by: Russell Keith-Magee <russell@keith-magee.com> Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
This is a follow-up for python#137186 aiming to make the initially added automation live in its own "module" rather than the top-level workflow and make it possible to reuse it externally.
|
Sorry, something went wrong.
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com> Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
…137683) Co-authored-by: Malcolm Smith <smith@chaquo.com> Co-authored-by: Russell Keith-Magee <russell@keith-magee.com> Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
See the linked issue for details: