RFR: 8347126: gc/stress/TestStressG1Uncommit.java gets OOM-killed [v2]

Aleksey Shipilev shade at openjdk.org
Wed Jan 8 09:20:16 UTC 2025


On Wed, 8 Jan 2025 08:18:41 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

>> test/hotspot/jtreg/gc/stress/TestStressG1Uncommit.java line 84:
>> 
>>> 82: 
>>> 83:         // Figure out suitable number of workers (~1 per 100M).
>>> 84:         int allocationChunk = (int) Math.ceil((double) allocationSize * 100 / M);
>> 
>> If we want to use one worker per 100M, should the equation be `allocationSize / (100 * M)`? Did I miss anything?
>
> Yes. It looked weird that he got 10 workers. This test should now always result in `min(8, num_procs)` workers. Especially since this uses `executeLimitedTestJava`, so it will not propagate flags. So I am not sure how we ever run this test with a different heap without editing the test file.

Well, "he" made a math mistake that Guixiong noticed. New calculation yields 9 workers on M1, because we take `ceil(0.8*Xmx)`:


0s: Using 9 workers, each allocating: ~91M
0s: Allocation size 858993459, allocation chunks: 9


Fixed in new commit.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/22954#discussion_r1906859432


More information about the hotspot-gc-dev mailing list