JDK-6900899 : vm fails to start when -Xmx value is less than OldSize + NewSize
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs17
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-11-12
  • Updated: 2011-03-07
  • Resolved: 2011-03-07
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 6 JDK 7 Other
6u18Fixed 7Fixed hs16Fixed
Heap size ergo ignores -Xmx == MaxHeapSize when setting the minimum heap size.
If OldSize + NewSize > MaxHeapSize, then the vm will fail to start with the message

"Incompatible minimum and initial heap sizes specified"

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/84cb6f20afb3

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/84cb6f20afb3

EVALUATION http://hg.openjdk.java.net/hsx/hsx16/master/rev/0ad684e27697

EVALUATION http://hg.openjdk.java.net/hsx/hsx16/baseline/rev/0ad684e27697

EVALUATION Surfaced when with -Xmx8m. Heap size ergo defaults OldSize + NewSize to 12m, thus MaxHeapSize < OldSize + NewSize, which provoked the failure.

SUGGESTED FIX In Arguments::set_heap_size(), set the minimum heap size to min(OldSize + NewSize, MaxHeapSize).