JDK-6843292 : "Expect to be beyond new region unless impacting another region" assertion too strong
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-05-20
  • Updated: 2010-04-02
  • Resolved: 2010-01-15
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
Description
The assertion in share/vm/memory/cardTableModRefBS.cpp in method
CardTableModRefBS::resize_covered_region()


    // This line commented out cleans the newly expanded region and
    // not the aligned up expanded region.
    // jbyte* const end = byte_after(new_region.last());
    jbyte* const end = (jbyte*) new_end_for_commit;
    assert((end >= byte_after(new_region.last())) || collided,
      "Expect to be beyond new region unless impacting another region");

is too strong.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/ff004bcd2596
06-08-2009

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/ff004bcd2596
03-08-2009

SUGGESTED FIX // The guard page is always committed and should not be committed over. ! // "guarded" is used for assertion checking below and recalls the fact ! // that the would-be end of the new committed region would have ! // penetrated the guard page. ! HeapWord* new_end_for_commit = new_end_aligned; ! ! debug_only(bool guarded = false;) ! if (new_end_for_commit > _guard_region.start()) { ! new_end_for_commit = _guard_region.start(); ! debug_only(guarded = true;) ! } assert(index_for(new_region.last()) < (int) _guard_index, "The guard card will be overwritten"); ! // This line commented out cleans the newly expanded region and ! // not the aligned up expanded region. ! // jbyte* const end = byte_after(new_region.last()); ! jbyte* const end = (jbyte*) new_end_for_commit; ! assert((end >= byte_after(new_region.last())) || collided || guarded, ! "Expect to be beyond new region unless impacting another region");
20-05-2009

EVALUATION Relax the assertion to allow for the limitation on new_end_for_commit due to the presence of the guard page.
20-05-2009