[9] RFR(S/M): Crash with assert(pd != 0L) failed: PcDesc must not be NULL

Nils Eliasson nils.eliasson at oracle.com
Tue May 24 14:09:55 UTC 2016


Hi all,

Please review.

Summary:
The VM fails on "assert(pd != 0L) failed: PcDesc must not be NULL" when 
walking the Java frames on the stack after hitting a stack overflow.

The asserts triggers when the trying to find the BCI of an address in an 
nmethod. This assert belongs to stack walking code introduced by 
JDK-8046936 "JEP 270: Reserved Stack Areas for Critical Sections". The 
BCI is not relevant for this code, as we only need the method to find 
the annotation. The similar stack walking code in 
java_lang_Throwable::fill_in_stack_trace in javaClasses.cpp do not have 
the assert in the same position suggesting the assert may have been to 
strong.

This fix also makes this bug stop reproducing: 
https://bugs.openjdk.java.net/browse/JDK-8156659 
"assert(CodeCache::find_blob_unsafe(_pc) == _cb) failed: inconsistent."

Solution:
I have rewritten and simplified the stack walking code in 
SharedRuntime::look_for_reserved_stack_annotated_method removing the 
lookup of BCI.

Testing:
Run :hotspot_all on all platforms with and without -Xcomp
Separately run all uncommontrap tests and the test ReservedStackTest 
written for JEP270.

Bug: https://bugs.openjdk.java.net/browse/JDK-8153352
Webrev: http://cr.openjdk.java.net/~neliasso/8153352/webrev.01/

Best regards,
Nils Eliasson


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160524/ba1dffa2/attachment.html>


More information about the hotspot-compiler-dev mailing list