gh-75876: Correct the memory use declared by some bigmem tests - #155307
Merged
Conversation
Measured with a limited address space and the peak RSS of the process: * TupleTest.test_repeat_large_2 keeps 3 tuples of pointers alive, as its siblings do, but declared the count for a 32-bit build. * The md5 tests hash the data and a io.BytesIO() copy of it. * testDecompress4G keeps the data, the compressed and the decompressed bytes alive, and the decompressor grows its output buffer. * test_huge_string_builtins uses 3 times the string size, not 2. * test_large_subn uses a bit more than the 18 times it declared. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15. |
|
GH-155312 is a backport of this pull request to the 3.15 branch. |
|
GH-155313 is a backport of this pull request to the 3.14 branch. |
|
GH-155314 is a backport of this pull request to the 3.13 branch. |
serhiy-storchaka
added a commit
that referenced
this pull request
Aug 7, 2026
…GH-155307) (GH-155314) Measured with a limited address space and the peak RSS of the process: * TupleTest.test_repeat_large_2 keeps 3 tuples of pointers alive, as its siblings do, but declared the count for a 32-bit build. * The md5 tests hash the data and a io.BytesIO() copy of it. * testDecompress4G keeps the data, the compressed and the decompressed bytes alive, and the decompressor grows its output buffer. * test_huge_string_builtins uses 3 times the string size, not 2. * test_large_subn uses a bit more than the 18 times it declared. (cherry picked from commit e469fa9) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
serhiy-storchaka
added a commit
that referenced
this pull request
Aug 7, 2026
…GH-155307) (GH-155313) Measured with a limited address space and the peak RSS of the process: * TupleTest.test_repeat_large_2 keeps 3 tuples of pointers alive, as its siblings do, but declared the count for a 32-bit build. * The md5 tests hash the data and a io.BytesIO() copy of it. * testDecompress4G keeps the data, the compressed and the decompressed bytes alive, and the decompressor grows its output buffer. * test_huge_string_builtins uses 3 times the string size, not 2. * test_large_subn uses a bit more than the 18 times it declared. (cherry picked from commit e469fa9) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Some bigmem tests declare less memory than they use. Measured as the peak RSS of a process running a single test with
-M:TupleTest.test_repeat_large_2HashLibTestCase.test_case_md5_hugeHashLibTestCase.test_case_md5_uintmaxZlibDecompressorTest.testDecompress4GBigmemTclTest.test_huge_string_builtinsReTests.test_large_subntest_repeat_large_2keeps 3 tuples of pointers alive, astest_repeat_smallandtest_repeat_largedo, but declared12instead ofpointer_size * 3, which is the count for a 32-bit build.The md5 tests pass the data to
check_file_digest(), which copies all of it into anio.BytesIO().testDecompress4Gkeeps the data, the compressed and the decompressed bytes alive at the same time, and the decompressor grows its output buffer.These are the only tests which use more memory than they declare. The other 227 bigmem tests were measured too: the largest excess is 1.03x, and it is 20 MiB in the median.