Repository navigation
ci(python): exit and replace a GraalPy worker whose heap is spent (#1753) - #1755
Merged
Merged
Conversation
) #1749's 2 GiB heap holds, but a GraalPy worker's live heap grows with the tests it runs. In job 116172356218 the three workers reached 2.2-2.6 GB RSS in 16 minutes; four tests raised MemoryError, then gw1 raised one in pytest's own failure report, and the session ended in INTERNALERROR, exit 3. - Every GraalPy process gets --vm.XX:+ExitOnOutOfMemoryError with its heap: a spent worker exits, xdist fails the test it ran as crashed and starts a fresh worker. pytest gets --max-worker-restart=30, 30 restarts in all, where xdist's default is 4 a worker (12 at -n 3). - tests-status counts xdist's "node down" lines, and Containment summary warns "tests lost an xdist worker". The MemoryError count is word-bounded, so OutOfMemoryError and the flag itself are not counted. - The comments and workflows.rst give the measurements and their sources. test_graalpy_worker_heap_1753.py pins it: 7 of its 8 tests fail on main's experimental.yml, the eighth reads the docs. The 1740 and 1732 tests follow the new argv. tests/project: 921 passed, 1 skipped. Closes #1753
Owner
Author
|
Verdict: GOOD TO GO at
The GraalPy leg on this PR's own run is the real proof. I'll report what it shows when it finishes. |
Contributor
|
Coverage: 89.59% (unit tier, Python 3.15,
Per-file detail: the |
Owner
Author
|
The fix works on this PR's own run (job 116215824320).
pytest exited 2, but not because of the heap. The 69 failures are GraalPy behaviour and are not classified here. |
This was referenced Oct 15, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Please follow the guide below
You will be asked some questions, please read them carefully and answer honestly
Put an
xinto all the boxes [ ] relevant to your pull request (like that [x])Use Preview tab to see how your pull request will actually look like
Searched for similar pull requests
Followed the coding style (
make pylint,make mypy,make isort)make testpasses, and a test case covers the change. Narrow runs only, listed below.Added a changelog entry under
docs/source/changelog/and regeneratedCHANGELOG.md, if the change is user-visible: N/A — centralised in docs(changelog): shared 1.5.0 changelog — long-lived, merges last (#610, #616, #617, #618, #620) #657What is the purpose of your pull request?
Tick the commit type your subject line carries.
fix— corrects a defectfeat— adds a featureperf— changes performance, not behaviourrefactor— changes neither behaviour nor performancetest— tests onlydocs— documentation onlyci— workflows or build toolingrelease— bumps the version or rolls up a distributionchore— anything elseDescription
Closes #1753. Since #1749, the GraalPy experimental leg keeps its runner, but its tests stopped at 16 minutes. On job 116172356218, each xdist worker's live heap grew with the tests it ran until it filled the 2 GiB
--vm.Xmxcap. RSS reached 2.2-2.6 GB, aMemoryErrorhit pytest's own failure report, and the session ended inINTERNALERROR(exit 3) while 7.9 GB was still free. Locally, a bigger heap only delays the crash, so the fix replaces the spent worker instead of enlarging the heap.experimental.yml:--vm.XX:+ExitOnOutOfMemoryError, so a spent worker exits and xdist starts a fresh one;--max-worker-restart=30, which is one count across all workers;tests-statuscounts thenode downlines, andContainment summarywarnstests lost an xdist worker;MemoryErrorcount is word-bounded;timeoutbefore the cap,prlimit --fsizeandcontinue-on-error.workflows.rstand the workflow comments carry the measurements and their sources: GraalVM's Native Image memory docs, andExceptionUtils.javaatgraal-25.4.4.tests/project/test_graalpy_worker_heap_1753.py. 7 of its 8 tests fail on main'sexperimental.yml.Proof is this PR's own run. If the fix works, the
Python graalpy-25.4 (experimental)leg prints[gwN] node downlines, gets past 569 passed, and ends in a normal pytest summary or the 110-minute timeout. It has noINTERNALERROR, and its check is green with warnings.Tests, on Python 3.14:
tests/projectgives 921 passed and 1 skipped.