JDK-6718086 : CMS assert: _concurrent_iteration_safe_limit update missed
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs14
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2008-06-23
  • Updated: 2011-03-07
  • Resolved: 2011-03-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
Related Reports
Relates :  
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
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/60fb9c4db4e6
28-08-2008

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
24-06-2008

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; }
24-06-2008

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).
23-06-2008

SUGGESTED FIX See comments section.
23-06-2008