RFR: JDK-8220671: Initialization race for non-JavaThread PtrQueues
Kim Barrett
kim.barrett at oracle.com
Tue Mar 19 22:57:14 UTC 2019
> On Mar 19, 2019, at 4:59 PM, Roman Kennke <rkennke at redhat.com> wrote:
>
> Uuh. I have been wrong all along. Or, at the very least, the race that
> we discovered is not the only cause of my problems.
>
> Some further testing reveals that: we used the thread claiming protocol
> to do the final flush of all threads' SATB buffers. The
> StringDedupThread does not consistently participate in this. We're
> simply never claiming that thread, and thus skip flushing it.
>
> This is a separate bug, related to JDK-8219613. I believe it is possible
> that this affects G1 with string-dedup too.
>
> For this one, do we want to go forward with:
> http://cr.openjdk.java.net/~rkennke/JDK-8220671/webrev.07/
I’m not keen on the joiner activation test there. I’m not sure there *is* a good predicate.
Here’s a similar but different approach, using the NJTList_lock, which was one of my
earlier suggestions:
http://cr.openjdk.java.net/~kbarrett/8220671/use_njtlock.00/
I’m not thrilled about more widely exposing and needing the NJTList_lock like this.
But maybe I should think about it as being kind of similar to the Threads_lock in that respect.
More information about the hotspot-gc-dev
mailing list