JDK-8200731 : Assert in rebuild remset closure uses the wrong liveness in informational text
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 11
  • Priority: P5
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2018-04-04
  • Updated: 2018-04-04
  • Resolved: 2018-04-04
Related Reports
Relates :  
Description
in G1RemSet.cpp the assert that checks the liveness uses the wrong liveness when printing on error:

      assert(!hr->is_old() ||
             top_at_rebuild_start == NULL ||
             total_marked_bytes == _cm->liveness(region_idx) * HeapWordSize,
             "Marked bytes " SIZE_FORMAT " for region %u (%s) in [bottom, TAMS) do not match liveness during mark " SIZE_FORMAT " "
             "(" PTR_FORMAT " " PTR_FORMAT " " PTR_FORMAT ")",
             total_marked_bytes, hr->hrm_index(), hr->get_type_str(), _cm->liveness(region_idx) * HeapWordSize,
             p2i(hr->bottom()), p2i(top_at_mark_start), p2i(top_at_rebuild_start));

i.e. the "_cm->liveness(region_idx) * HeapWordSize" should actually just be "hr->marked_bytes()".
Comments
JDK-8178105 which introduced this issue is still out for review, I will add this change there.
04-04-2018