JDK-8210043 : Invalid assert(HeapBaseMinAddress > 0) in ReservedHeapSpace::initialize_compressed_heap
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-08-28
  • Updated: 2019-08-21
  • Resolved: 2018-08-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12
11.0.3Fixed 12 b09Fixed
Related Reports
Blocks :  
Description
See http://hg.openjdk.java.net/jdk/jdk/file/2e928420389d/src/hotspot/share/memory/virtualspace.cpp#l493

void ReservedHeapSpace::initialize_compressed_heap(const size_t size, size_t alignment, bool large) {
...
  assert(HeapBaseMinAddress > 0, "sanity");   //<<<< HERE

==========

# This is OK
$ java -XX:HeapBaseMinAddress=0 -version

# This crashes with a fastdebug JVM
$ java -Xmx1024m -XX:HeapBaseMinAddress=0

# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/virtualspace.cpp:493
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/iklam/jdk/abe/open/src/hotspot/share/memory/virtualspace.cpp:493), pid=20182, tid=20183
#  assert(HeapBaseMinAddress > 0) failed: sanity

==========

http://hg.openjdk.java.net/jdk/jdk/file/2e928420389d/src/hotspot/share/runtime/arguments.cpp#l1768

There is code that ensures HeapBaseMinAddress >= DefaultHeapBaseMinAddress, but that happens only when MaxHeapSize is default, so the assert doesn't match the existing behavior.

The JVM works just fine if we remove the assert.
Comments
Fix Request I would like to downport "8210040: [TESTBUG] TestOptionsWithRanges is very slow" to speed up this test. This change is a prerequisite, and in itself, it's a useful fix good to have in 11. No risks as only a assertion is removed, thus only the debug build is affected. The change applies cleanly.
07-11-2018