JDK-7110718 : -XX:MarkSweepAlwaysCompactCount=0 crashes the JVM
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs23
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-11-10
  • Updated: 2012-03-22
  • Resolved: 2012-01-20
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 7 JDK 8 Other
7u4Fixed 8Fixed hs23Fixed
Running hotspot with "-XX:+UseConcMarkSweepGC -XX:MarkSweepAlwaysCompactCount=0" will crash the VM.

Email from Ramki:

It's because MaxSweepAlwaysCompactCount is used to divide the (serial old) gc count and gives a divide
by zero exception when set to zero. Perhaps the flag should be set to a  minimum value of 1 in
Arguments::check_vm_args_consistency()? If folks agree, could someone file a CR (and
if you prefer i can submit a simple patch).

EVALUATION http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/d06a2d7fcd5b

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-emb/hotspot/rev/d06a2d7fcd5b

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/d06a2d7fcd5b