RFR: 8197901: Crash during GC when logging level is debug

Leonid Mesnik leonid.mesnik at oracle.com
Fri Feb 23 21:48:27 UTC 2018


Thank you for review. I will add @bug info in the test.

Leonid

> On Feb 22, 2018, at 8:26 PM, David Holmes <david.holmes at oracle.com> wrote:
> 
> Hi Leonid,
> 
> Looks fine. Please also add this bug id to @bug in
> 
> test/jdk/java/lang/StackWalker/VerifyStackTrace.java
> 
> Thanks,
> David
> 
> On 23/02/2018 12:41 PM, Leonid Mesnik wrote:
>> Hi
>> Could you please review following fix which update implementation of Klass::external_name for anonymous classes.
>> Previously external_name tried to add hashcode of corresponding java_mirror for InstanceKlass if it exists. However the java_mirror could be incorrect during GC. Also external_name might tries to calculate hash_code if it was not “pre-calculated” during class verification. See JDK-8197442 <https://bugs.openjdk.java.net/browse/JDK-8197442> [Graal] runtime/Metaspace/DefineClass.java crashes with "biases should not be seen by VM thread here"
>> The suggested fix is to  print address of corresponding InstanceKlass instead of hashcode. It allows to identify anonymous classes and allows to use external_name at any time. The hashcode for java_mirror is still pre-calculated in verifier.cpp since ik->java_mirror()->identity_hash()  still might be used during safepoint. As a regression test I updated one of tests which redefine classes and easily reproduce problem when executed with full logging enabled.
>> Test java/lang/StackWalker/VerifyStackTrace.java is update to match new pattern.
>> webrev: http://cr.openjdk.java.net/~lmesnik/8197901/webrev.00/ <http://cr.openjdk.java.net/~lmesnik/8197901/webrev.00/>
>> bug: https://bugs.openjdk.java.net/browse/JDK-8197901 <https://bugs.openjdk.java.net/browse/JDK-8197901>
>> Leonid



More information about the core-libs-dev mailing list