RFR: 8214068: ZGC crashes with vmTestbase/nsk/jdi/ReferenceType/instances/instances004/TestDescription.java
per.liden at oracle.com
Wed Nov 21 20:18:52 UTC 2018
On 2018-11-21 15:58, Daniel D. Daugherty wrote:
> On 11/21/18 4:11 AM, Per Liden wrote:
>> This patch adds a missing load barrier to the JVMTI heap walker. In
>> VM_HeapWalkOperation::collect_simple_roots() the SimpleRootsClosure
>> closure should not do raw loads of oops. Instead it should be loading
>> them using NativeAccess<AS_NO_KEEPALIVE>::oop_load().
>> This problem only affects ZGC, since it's (so far) the only collector
>> that scans JNIHandles concurrently.
>> The problem was easily reproducible when running
>> However, for some reason this isn't reproducing in our CI pipeline,
>> likely because of luck with timing. For example, this is harder to
>> reproduce in a scenario where your using a smaller heap and hence have
>> GC cycles happen more frequently.
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8214068
>> Webrev: http://cr.openjdk.java.net/~pliden/8214068/webrev.0
> No comments.
> Nice catch! Thumbs up.
Thanks for reviewing, Dan!
> Since this is in the JVM/TI heap walker, I wonder if there are other
> sightings in JBS that might be tracked back to this. Looks like
> Zhengyu put a nice stack trace in the bug report so dup matching
> should be easy (if there are any).
I did a quick search, but didn't stumble onto anything relevant. This
bug has "only" been in there since Oct 16 (which is when ZGC started to
process JNIHandles concurrently).
More information about the hotspot-dev