You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TST: aarch64 job times out on main and v6.1.x backport branches #16405
Apparently the timeout has been consistent but hard to notice when cron jobs do not run on backport branches according to schedule, just when we ask for it.
Interestingly, it seems to almost complete the test suite (timeouts consistently happen on 99% completion), which seems to indicate that something is halting pytest near completion, or that we're extremely unlucky and the whole job would actually take 6hrs + epsilon (which would also be a problem; it's not supposed to take more than an hour or two).
Ok I know that it's not the last tests (docs) that are causing the hang, so the problem could be anywhere. I'll start searching for it by dichotomy, and will update the following list (checked items are known-good)
changed the title [-]TST: aarch64 job times out in v6.1.x backport branch[/-][+]TST: aarch64 job times out on main and v6.1.x backport branches[/+]on May 7, 2024
Actually I get no timeouts if I split the test suite in any way, but it does seem that running the whole thing in one go requires about 1 hour to build and 5 more to run every tests, so I'm starting to think we may actually be in my "extremely unlucky" scenario. Something must have changed in the environment for it to get this slow. Next step would be to try and bump the timeout limit a notch and try to hunt down what external changes happened between the latest successful run and the first timeout.
A lot has changed, so it's still not obvious what makes the job twice slower, if it's even due to a python dependency (as opposed to something more fundamental in the runner image). My primary suspects would be test-related and performance-critical dependencies
package
last success
first failure
notes
coverage
7.2.7
7.4.4
not actually used here
hypothesis
6.82.4
6.98.15
numpy
1.24.2
1.26.4
pytest
7.4.0
7.4.4
pytest-arraydiff
0.5.0
0.6.1
probably not used in enough tests to matter
pytest-astropy
0.10.0
0.11.0
meta-package, no effect at runtime
pytest-doctestplus
1.0.0
1.2.0
probably not used in enough tests to matter
pytest-filter-subpackage
0.1.2
0.2.0
pytest-mock
3.11.1
3.12.0
pytest-remotedata
0.4.0
0.4.1
hypothesis and numpy seem like the two most likely candidates. I'll look up hypothesis' tracker for signs of regressions, but any regression in numpy would more likely be a platform-specific packaging issue.
Hypothesis seems to be subject to memory leaks HypothesisWorks/hypothesis#3975, which could degrade performances if the leak gets too big, but that's a long shot. I'm now running a new experiment on my fork: excluding hypothesis tests and see how much shorter the run gets. Stay tuned for more in a couple hours 🤞🏻
The job has been running for over 5 hours now and isn't finished yet, so it still might save some time but I think we can now rule out hypothesis being responsible for timeouts.
Why are we testing editable install instead of normal?
I think that's a workaround the fact that we don't have an src-layout : since we're running pytest from the top level of the repo, and the current dir is at the start of PYTHON_PATH, import astropywill look up code locally instead of wherever else pip might install it, so extensions need to be built in-place, otherwise we'd get an ImportError. Editable installs achieve this.
Activity
neutrinoceros commentedon May 7, 2024
Interestingly, it seems to almost complete the test suite (timeouts consistently happen on 99% completion), which seems to indicate that something is halting pytest near completion, or that we're extremely unlucky and the whole job would actually take 6hrs + epsilon (which would also be a problem; it's not supposed to take more than an hour or two).
astrofrog commentedon May 7, 2024
We could try and run the tests just for the sub-package where it is failing to see if it hangs too.
neutrinoceros commentedon May 7, 2024
The last time it did not timeout was two weeks ago: https://github.com/astropy/astropy/actions/runs/8838322552/job/24269182128
neutrinoceros commentedon May 7, 2024
I'm going to run this experiment on my fork: https://github.com/neutrinoceros/astropy/actions/workflows/ci_cron_weekly.yml
neutrinoceros commentedon May 7, 2024
Ok I know that it's not the last tests (docs) that are causing the hang, so the problem could be anywhere. I'll start searching for it by dichotomy, and will update the following list (checked items are known-good)
[-]TST: aarch64 job times out in v6.1.x backport branch[/-][+]TST: aarch64 job times out on main and v6.1.x backport branches[/+]pllim commentedon May 7, 2024
Maybe see which PRs were merged between last success and first failure, and go for those subpackages first? 🤞
neutrinoceros commentedon May 7, 2024
Actually I get no timeouts if I split the test suite in any way, but it does seem that running the whole thing in one go requires about 1 hour to build and 5 more to run every tests, so I'm starting to think we may actually be in my "extremely unlucky" scenario. Something must have changed in the environment for it to get this slow. Next step would be to try and bump the timeout limit a notch and try to hunt down what external changes happened between the latest successful run and the first timeout.
neutrinoceros commentedon May 7, 2024
For what it's worth I'm now running an experiment on my fork to with a bumped timeout limit. I'll check back in the morning.
neutrinoceros commentedon May 8, 2024
It went through https://github.com/neutrinoceros/astropy/actions/runs/8991193525/job/24698228435
(for reference, I raised the timeout limit to 7 hours, yet it completed in 5h56)
Now we should try to look for differences in the environment. I'll give it a try this morning.
neutrinoceros commentedon May 8, 2024
Here's a diff between the outputs of
pip listfrom the last success (>in green) and the first failure (<in red)neutrinoceros commentedon May 8, 2024
A lot has changed, so it's still not obvious what makes the job twice slower, if it's even due to a python dependency (as opposed to something more fundamental in the runner image). My primary suspects would be test-related and performance-critical dependencies
hypothesis and numpy seem like the two most likely candidates. I'll look up hypothesis' tracker for signs of regressions, but any regression in numpy would more likely be a platform-specific packaging issue.
neutrinoceros commentedon May 8, 2024
Hypothesis seems to be subject to memory leaks HypothesisWorks/hypothesis#3975, which could degrade performances if the leak gets too big, but that's a long shot. I'm now running a new experiment on my fork: excluding hypothesis tests and see how much shorter the run gets. Stay tuned for more in a couple hours 🤞🏻
astrofrog commentedon May 8, 2024
Yes we could in principle skip the hypothesis tests like we do for wheel building.
pllim commentedon May 8, 2024
Actually, do we just want to skip hypothesis for all the exotic archs? Probably easier that way and also might speed up the other archs run time too.
neutrinoceros commentedon May 8, 2024
The job has been running for over 5 hours now and isn't finished yet, so it still might save some time but I think we can now rule out
hypothesisbeing responsible for timeouts.pllim commentedon May 8, 2024
Could be something shipped with the distro too.
ASTROPY_USE_SYSTEM_ALL=1 pip3 install -v --no-build-isolation -e .[test]pllim commentedon May 8, 2024
p.s. Why are we testing editable install instead of normal?
pllim commentedon May 8, 2024
Do we have anyone with a physical aarch64 machine to see if this is purely a CI problem or something more fundamental?
neutrinoceros commentedon May 8, 2024
I think that's a workaround the fact that we don't have an src-layout : since we're running pytest from the top level of the repo, and the current dir is at the start of
PYTHON_PATH,import astropywill look up code locally instead of wherever else pip might install it, so extensions need to be built in-place, otherwise we'd get anImportError. Editable installs achieve this.neutrinoceros commentedon May 8, 2024
https://github.com/neutrinoceros/astropy/actions/runs/8999144914 completed in 5h33 by skipping hypothesis
I'm hesitant to just do that to "fix" this issue, but it might be better than doing nothing and risk getting used to failures on that job.
pllim commentedon May 8, 2024
Green with less features is better than timing out. I think @astrofrog already agrees based on #16405 (comment) , so let's do that. Thanks!
neutrinoceros commentedon May 8, 2024
#16417 👀