RFR: 8214068: ZGC crashes with vmTestbase/nsk/jdi/ReferenceType/instances/instances004/TestDescription.java

Per Liden per.liden at oracle.com
Wed Nov 21 09:11:23 UTC 2018


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 
vmTestbase/nsk/jdi/ReferenceType/instances/instances004/TestDescription.java. 
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

/Per


More information about the hotspot-dev mailing list