RFR: 8329223: Parallel: Parallel GC resizes heap even if -Xms = -Xmx [v7]

Zhengyu Gu zgu at openjdk.org
Wed Apr 24 14:36:44 UTC 2024


On Tue, 23 Apr 2024 17:04:53 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> github action fails on macosx aarch64 (the same kind of machine I use) as well. I am not sure if it is test or test framework failure, as this part of code is platform independent.
>> 
>> @albertnetymk what's your suggestion?
>
>> github action fails on macosx aarch64 (the same kind of machine I use)
> 
> Could you debug the failure on your macosx-aarch64 machine to identify how `initial_old_size = MinOldSize` results into the failure? (The error msg in GHA is rather limited.) One can probably print out the value for all related flags, `NewSize`, `OldSize`, `InitialHeapSize`, etc for the problematic case, and launch `java` on the cmdline (without `gtest`) with those flags.
> 
>> I could not reproduce the failure on Linux
> 
> My linux works fine as well, just fyi.

Debugging with following command line:
`make CONF=macosx-aarch64-server-fastdebug run-test TEST=gtest TEST_VM_OPTS="-Xlog:gc+heap=trace"`

With `initial_old_size = MinOldSize` fails this test:

``` 
  // If OldSize is set on the command line, it should be used
  // for both min and initial old size if less than min heap.
  TestGenCollectorPolicy::SetOldSizeCmd setter(20 * M);

  TestGenCollectorPolicy::CheckOldMin checker_min(20 * M);
  TestGenCollectorPolicy::TestWrapper::test(&setter, &checker_min);


Debug output:

[0.001s][trace][gc,heap]   Maximum heap size 8589934592
[0.001s][trace][gc,heap]   Initial heap size 536870912
[0.001s][trace][gc,heap]   Minimum heap size 6815736
[0.008s][debug][gc,heap] Minimum heap 8388608  Initial heap 536870912  Maximum heap 8589934592
[0.036s][debug][gc,heap] Minimum heap 41943040  Initial heap 109051904  Maximum heap 8589934592
[0.036s][trace][gc,heap] 1: Minimum young 196608  Initial young 36306944  Maximum young 83886080
[0.036s][warning][gc,ergo] Inconsistency between initial old size and minimum old size
[0.036s][warning][gc,ergo] Inconsistency between generation sizes and heap size, resizing the generations to fit the heap.
[0.036s][trace  ][gc,heap] 2: Minimum young 196608  Initial young 67305472  Maximum young 83886080
[0.036s][trace  ][gc,heap] Minimum old 41746432  Initial old 41746432  Maximum old 8506048512
/Users/zhengyu.gu/ws/jdk/test/hotspot/gtest/gc/shared/test_collectorPolicy.cpp:261: Failure



With `MinOldSize = initial_old_size`

Debug output:


[0.001s][trace][gc,heap]   Maximum heap size 8589934592
[0.001s][trace][gc,heap]   Initial heap size 536870912
[0.001s][trace][gc,heap]   Minimum heap size 6815736
[0.007s][debug][gc,heap] Minimum heap 8388608  Initial heap 536870912  Maximum heap 8589934592
[0.034s][debug][gc,heap] Minimum heap 41943040  Initial heap 109051904  Maximum heap 8589934592
[0.034s][trace][gc,heap] 1: Minimum young 196608  Initial young 36306944  Maximum young 83886080
[0.034s][warning][gc,ergo] Inconsistency between initial old size and minimum old size
[0.034s][warning][gc,ergo] Inconsistency between generation sizes and heap size, resizing the generations to fit the heap.
[0.034s][trace  ][gc,heap] 2: Minimum young 196608  Initial young 83886080  Maximum young 83886080
[0.034s][trace  ][gc,heap] Minimum old 20971520  Initial old 25165824  Maximum old 8506048512



I will reverse back to `MinOldSize = initial_old_size`

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18539#discussion_r1578000649


More information about the hotspot-gc-dev mailing list