United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6459197 ContiguousSpace::block_start() has a bogus assert
JDK-6459197 : ContiguousSpace::block_start() has a bogus assert

Details
Type:
Bug
Submit Date:
2006-08-10
Status:
Resolved
Updated Date:
2010-04-02
Project Name:
JDK
Resolved Date:
2006-11-14
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:
hs10 (b03)

Related Reports
Backport:
Backport:

Sub Tasks

Description
See comments section.

                                    

Comments
SUGGESTED FIX

Remove the assert, perhaps applying it to the "last" returned from the
block_start()'s else{} arm.
                                     
2006-08-10
EVALUATION

Yes.
                                     
2006-08-10
SUGGESTED FIX

------- space.cpp -------
*** /tmp/sccs.EOaiUk    Thu Sep  7 14:09:42 2006
--- space.cpp   Thu Sep  7 13:28:51 2006
***************
*** 698,704 ****
    if (p >= top()) {
      return top();
    } else {
-     assert(oop(p)->is_oop(), "p is not an object start");
      HeapWord* last = bottom();
      HeapWord* cur = last;
      while (cur <= p) {
--- 698,703 ----
***************
*** 705,710 ****
--- 704,710 ----
        last = cur;
        cur += oop(cur)->size();
      }
+     assert(oop(last)->is_oop(), "Expected an oop start");
      return last;
    }
  }
                                     
2006-09-07
WORK AROUND

This bug should rarely, if ever, affect you and obviously only
in fastdebug mode.
If it does, use -XX:SuppressErrorAt:... to shut up the assert.
                                     
2006-10-05
SUGGESTED FIX

Event:            putback-to
Parent workspace: /net/jano.sfbay/export/disk05/hotspot/ws/main/gc_baseline
                  (jano.sfbay:/export/disk05/hotspot/ws/main/gc_baseline)
Child workspace:  /net/prt-web.sfbay/prt-workspaces/20061005121000.ysr.bot/workspace
                  (prt-web:/net/prt-web.sfbay/prt-workspaces/20061005121000.ysr.bot/workspace)
User:             ysr

Comment:

---------------------------------------------------------

Job ID:                 20061005121000.ysr.bot
Original workspace:     karachi:/net/spot/scratch/ysr/bot
Submitter:              ysr
Archived data:          /net/prt-archiver.sfbay/data/archived_workspaces/main/gc_baseline/2006/20061005121000.ysr.bot/
Webrev:                 http://analemma.sfbay.sun.com/net/prt-archiver.sfbay/data/archived_workspaces/main/gc_baseline/2006/20061005121000.ysr.bot/workspace/webrevs/webrev-2006.10.05/index.html

Fixed 6459197: ContiguousSpace::block_start() has a bogus assert
Fixed 6465357: CMS: default choice of NewSize can cause obscure startup failure w/small -Xms

  Webrev: http://analemma.sfbay/net/spot/scratch/ysr/bot/webrev

For the first bug, we moved the assert to a more appropriate
spot.

For the second bug, we were faced with two choices:
either increase initial_heap_size or decrease NewSize.
Because the latter can silently result in a potentially
sub-optimal setting (because NewSize is not readjusted unless
SurvivorSpaces are empty -- and the latter is not forced by
our policy, for example, by promoting all survivors preparatory
to expanding the young gen), we decided to go with the
former. (In verbose mode a suitable warning is emitted.)
Meanwhile, the resizing policy is actively being modified
as part of CMS ergonomics at which point this will
be revisited.

Reviewed by: John Coomes, Jon Masamitsu, Tony Printezis

Fix Verified: yes

Verification Testing: the command line options in 6465357

Other testing: refworkload w/fastdebug

Files:
update: src/share/vm/memory/space.cpp
update: src/share/vm/runtime/arguments.cpp
update: src/share/vm/runtime/arguments.hpp

Examined files: 3878

Contents Summary:
       3   update
    3875   no action (unchanged)
                                     
2006-10-05



Hardware and Software, Engineered to Work Together