RFR: 8257230: assert(InitialHeapSize >= MinHeapSize) failed: Ergonomics decided on incompatible initial and minimum heap sizes [v3]

Jie Fu jiefu at openjdk.java.net
Thu Dec 3 11:15:15 UTC 2020


> Hi all,
> 
> Ergonomics for InitialHeapSize can be broken if the memory resource is limited by the administrator.
> For example, this assert [1] fired on our testing boxes.
> 
> It can be reproduced by the following two steps on Linux-64:
>   1) ulimit -v 8388608
>   2) java -XX:MinHeapSize=5g -version
> The reason was that limit_by_allocatable_memory() [2] returns a value less than MinHeapSize.
> 
> One more important fact is that this bug can be more common on Linux-32 systems.
> Since the virtual memory is limited to 3800M [3] on Linux-32, it can be always reproduced when MinHeapSize > 1900M.
> 
> Testing:
>   - tier1 ~ tier3 on Linux/x64
> 
> Thanks.
> Best regards,
> Jie
> 
> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/gc/shared/gcArguments.cpp#L96
> [2] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/runtime/arguments.cpp#L1907
> [3] https://github.com/openjdk/jdk/blob/master/src/hotspot/os/posix/os_posix.cpp#L567

Jie Fu has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:

 - Merge branch 'master' into JDK-8257230
 - Refinement & jtreg test
 - Merge branch 'master' into JDK-8257230
 - Merge branch 'master' into JDK-8257230
 - 8257230: assert(InitialHeapSize >= MinHeapSize) failed: Ergonomics decided on incompatible initial and minimum heap sizes

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/1492/files
  - new: https://git.openjdk.java.net/jdk/pull/1492/files/0389bc4d..92208d48

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1492&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1492&range=01-02

  Stats: 10006 lines in 347 files changed: 7909 ins; 1033 del; 1064 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1492.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1492/head:pull/1492

PR: https://git.openjdk.java.net/jdk/pull/1492



More information about the hotspot-gc-dev mailing list