RFR (S): CR6899058: G1: Internal error in ptrQueue.cpp:201 in nightly tests

Y. Srinivas Ramakrishna Y.S.Ramakrishna at Sun.COM
Fri Nov 20 20:42:15 UTC 2009

Hi John --

This looks good. Just a very minor suggestion --
in dirtyCardQueue.cpp, instead of:-

>  205   if (during_pause) {
>  206     guarantee(stop_at == 0, "should be"); 
>  207   }

you might do this? :-

> 205  assert(!during_pause || stop_at == 0, "Should not leave any completed buffers during a pause");

Although I see that you are keeping this as close to the original as possible
while fixing the bug, the guarantee etc. seems, at least to me, unnecessary in
product mode?

rest looks good.
-- ramki

john cuthbertson - Sun Microsystems wrote:
> Hi Everyone,
> Can I have a couple of volunteers to look over the code changes for this 
> fix? The webrev can be found at 
> http://cr.openjdk.java.net/~johnc/6899058/webrev.1/.
> The problem here is a race between GC worker threads on the completed 
> update buffer queue: one thread can be adding to the queue while 
> processing a deferred store barrier (from the ReduceInitialCardMarks 
> feature) under control of a lock, while another thread is removing 
> completed update buffers (during remembered set updating) using a CAS. 
> This can cause the consistency checks on the completed update buffer 
> queue to fail. The fix is to remove elements from the queue under 
> control of the same lock.
> Testing: the failing test (gcl001), SPECjbb2005, refworkload, and jprt.
> Thanks,
> JohnC

More information about the hotspot-gc-dev mailing list