1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Thu Sep 30 12:15:13 2010 -0700 1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Fri Oct 01 18:23:16 2010 -0700 1.3 @@ -1785,6 +1785,14 @@ 1.4 1.5 _full_collections_completed += 1; 1.6 1.7 + // We need to clear the "in_progress" flag in the CM thread before 1.8 + // we wake up any waiters (especially when ExplicitInvokesConcurrent 1.9 + // is set) so that if a waiter requests another System.gc() it doesn't 1.10 + // incorrectly see that a marking cyle is still in progress. 1.11 + if (outer) { 1.12 + _cmThread->clear_in_progress(); 1.13 + } 1.14 + 1.15 // This notify_all() will ensure that a thread that called 1.16 // System.gc() with (with ExplicitGCInvokesConcurrent set or not) 1.17 // and it's waiting for a full GC to finish will be woken up. It is