JDK-6652160 : G1: assert(cur_used_bytes == _g1->recalculate_used(),"It should!") at g1CollectorPolicy.cpp:1425
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 7
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2008-01-18
  • Updated: 2013-09-18
  • Resolved: 2008-10-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
6u14Fixed 7Fixed hs14Fixed
Failures sighted with PRT:-

jbb on sparc32/fastdebug/c2
gcbasher on sparc32/fastdebug/c2

The assertion is not easily reproducible and can often take several
hours (and many 100's of iterations) to hit (tried on Niagara boxes).

Previous races related to this assertion/invariant have been
fixed in 6561328.

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/c0f8f7790199

EVALUATION The cause of the bug is the race between the allocation and the concurrent cleanup for the modification of the G1CollectedHeap::_summary_bytes_used field (G1CollectedHeap::attempt_allocation_slow() and ConcurrentMark::completeCleanup()). The quick solution is to just serialize these modifications.