United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6718086 CMS assert: _concurrent_iteration_safe_limit update missed
JDK-6718086 : CMS assert: _concurrent_iteration_safe_limit update missed

Details
Type:
Bug
Submit Date:
2008-06-23
Status:
Closed
Updated Date:
2011-03-07
Project Name:
JDK
Resolved Date:
2011-03-07
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs14
Fixed Versions:
hs14 (b06)

Related Reports
Backport:
Backport:
Relates:

Sub Tasks

Description
A large number of parallel class loading tests (as well as a few other tests)
failed in the hg/hotspot-g1-gc repo testing with the assert:

         _concurrent_iteration_safe_limit <= top():
         "_concurrent_iteration_safe_limit update missed"

See, for instance:

http://sqeweb.sfbay/nfs/tools/gtee/results/JDK7/NIGHTLY/VM/2008-06-20/GC_Baseline-Xconc/vm/linux-i586/server/mixed/vm-linux-i586_server_mixed_vm.parallel_class_loading.testlist2008-06-20-21-18-50/ResultDir/anonymous-simple_copy_3/anonymous-simple.log

[2008-06-21T06:02:02.77] # after -XX: or in .hotspotrc:  SuppressErrorAt=/space.inline.hpp:65
[2008-06-21T06:02:02.77] #
[2008-06-21T06:02:02.77] # A fatal error has been detected by the Java Runtime Environment:
[2008-06-21T06:02:02.77] #
[2008-06-21T06:02:02.77] #  Internal Error (/tmp/jprt-jprtadm/temp/P1/B/154254.ysr/source/src/share/vm/memory/space.inline.hpp:65), pid=27386, tid=2888154032
[2008-06-21T06:02:02.77] #  Error: assert(_concurrent_iteration_safe_limit <= top(),"_concurrent_iteration_safe_limit update missed")
[2008-06-21T06:02:02.77] #
[2008-06-21T06:02:02.77] # Java VM: Java HotSpot(TM) Server VM (13.0-b02-2008-06-17-154254.ysr.hg_g1_gc_baseline-fastdebug mixed mode linux-x86 )
[2008-06-21T06:02:02.77] # An error report file with more information is saved as:
[2008-06-21T06:02:02.77] # /export/local/6175.JDK7.NIGHTLY.VM+linux-i586_server_mixed_vm.parallel_class_loading.testlist/results/ResultDir/anonymous-simple_copy_3/hs_err_pid27386.log
[2008-06-21T06:02:02.77] #
[2008-06-21T06:02:02.77] # If you would like to submit a bug report, please visit:
[2008-06-21T06:02:02.77] #   http://java.sun.com/webapps/bugreport/crash.jsp
[2008-06-21T06:02:02.77] #

                                    

Comments
SUGGESTED FIX

See comments section.
                                     
2008-06-23
EVALUATION

The field ContiguousSpace::_concurrent_iteration_safe_limit had not
been correctly initialized.

Part of the problem was a merge-o into the G1 workspace from gc_baseline,
and part of the problem was a missing c'tor initializer (the latter will
become part of gc_baseline once G1 integrates).
                                     
2008-06-23
SUGGESTED FIX

Subject         hotspot-g1-gc: 6718086: CMS assert: _concurrent_iteration_safe_l...

repo:       /net/jano2/export2/hotspot/hg/hotspot-g1-gc
changeset:  198:60fb9c4db4e6
user:       ysr
date:       Mon Jun 23 16:49:37 2008 -0700
description:
6718086: CMS assert: _concurrent_iteration_safe_limit update missed
Summary: Initialize the field correctly in ContiguousSpace's constructor and initialize() methods, using the latter for the survivor spaces upon initial construction or a subsequent resizing of the yo
ung generation. Add some missing Space sub-class constructors.
Reviewed-by: apetrusenko

files:
src/share/vm/memory/defNewGeneration.cpp src/share/vm/memory/space.cpp src/share/vm/memory/space.hpp


====


data/jprt/archive/2008/06/2008-06-23-235006.ysr.hg_g1_gc_baseline
                                     
2008-06-24
SUGGESTED FIX

diff -r bb254e57d2f4 -r 60fb9c4db4e6 src/share/vm/memory/defNewGeneration.cpp
--- a/src/share/vm/memory/defNewGeneration.cpp  Tue Jun 17 08:40:48 2008 -0700
+++ b/src/share/vm/memory/defNewGeneration.cpp  Mon Jun 23 16:49:37 2008 -0700
@@ -227,8 +227,8 @@ void DefNewGeneration::compute_space_bou
       eden()->mangle_unused_area();
     }
   }
-  from()->set_bounds(fromMR); from()->clear();
-    to()->set_bounds(toMR);     to()->clear();
+  from()->initialize(fromMR, true /* clear */);
+    to()->initialize(  toMR, true /* clear */);
   // Make sure we compact eden, then from.
   // The to-space is normally empty before a compaction so need
   // not be considered.  The exception is during promotion
diff -r bb254e57d2f4 -r 60fb9c4db4e6 src/share/vm/memory/space.cpp
--- a/src/share/vm/memory/space.cpp     Tue Jun 17 08:40:48 2008 -0700
+++ b/src/share/vm/memory/space.cpp     Mon Jun 23 16:49:37 2008 -0700
@@ -276,6 +276,7 @@ void ContiguousSpace::initialize(MemRegi
   set_top(bottom());
   set_saved_mark();
   if (clear_space) clear();
+  set_concurrent_iteration_safe_limit(top());
 }

 void ContiguousSpace::clear() {
diff -r bb254e57d2f4 -r 60fb9c4db4e6 src/share/vm/memory/space.hpp
--- a/src/share/vm/memory/space.hpp     Tue Jun 17 08:40:48 2008 -0700
+++ b/src/share/vm/memory/space.hpp     Mon Jun 23 16:49:37 2008 -0700
@@ -373,6 +373,9 @@ private:
   CompactibleSpace* _next_compaction_space;

 public:
+  CompactibleSpace() :
+   _compaction_top(NULL), _next_compaction_space(NULL) {}
+
   virtual void initialize(MemRegion mr, bool clear_space);
   virtual void clear();

@@ -766,6 +769,10 @@ class ContiguousSpace: public Compactibl
   inline HeapWord* par_allocate_impl(size_t word_size, HeapWord* end_value);

  public:
+  ContiguousSpace() :
+    _top(NULL),
+    _concurrent_iteration_safe_limit(NULL) {}
+
   virtual void initialize(MemRegion mr, bool clear_space);

   // Accessors
@@ -970,7 +977,8 @@ class EdenSpace : public ContiguousSpace
   HeapWord* _soft_end;

  public:
-  EdenSpace(DefNewGeneration* gen) : _gen(gen) { _soft_end = NULL; }
+  EdenSpace(DefNewGeneration* gen) :
+   _gen(gen), _soft_end(NULL) {}

   // Get/set just the 'soft' limit.
   HeapWord* soft_end()               { return _soft_end; }
                                     
2008-06-24
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/60fb9c4db4e6
                                     
2008-08-28



Hardware and Software, Engineered to Work Together