JDK-8211743 : [AOT] crash in ScopeDesc::decode_body() when JVMTI walks AOT frames
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,12
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: x86
  • Submitted: 2018-10-04
  • Updated: 2020-05-14
  • Resolved: 2018-10-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12
11.0.8-oracleFixed 12 b18Fixed
Related Reports
Relates :  
Description
#  SIGSEGV (0xb) at pc=0x00007f83e2a53f3c, pid=63646, tid=63649
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 12-internal+0-2018-10-04-0321297.vkozlov.jdkjdk, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x162df3c]  ScopeDesc::decode_body()+0x1dc

Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x162df3c]  ScopeDesc::decode_body()+0x1dc
V  [libjvm.so+0xa56953]  CompiledMethod::scope_desc_at(unsigned char*)+0x103
V  [libjvm.so+0x18532df]  compiledVFrame::compiledVFrame(frame const*, RegisterMap const*, JavaThread*, CompiledMethod*)+0x6f
V  [libjvm.so+0x1847429]  vframe::new_vframe(frame const*, RegisterMap const*, JavaThread*) [clone .part.45]+0x69
V  [libjvm.so+0x1847743]  vframe::sender() const+0x113
V  [libjvm.so+0x18478df]  vframe::java_sender() const+0xf
V  [libjvm.so+0x115f1a0]  JvmtiEnvBase::vframeFor(JavaThread*, int)+0x60
V  [libjvm.so+0x1162f70]  JvmtiEnvBase::get_frame_location(JavaThread*, int, _jmethodID**, long*)+0x80
V  [libjvm.so+0x1153fd4]  JvmtiEnv::GetFrameLocation(JavaThread*, int, _jmethodID**, long*)+0xa4
V  [libjvm.so+0x10f05b7]  jvmti_GetFrameLocation+0x227

Comments
jdk11 backport request I would like to have the patch in OpenJDK11 as well (for better parity to 11.0.8_oracle). The patch applies cleanly.
12-05-2020

This is a regression caused by JDK-8209574. Unlike the JVMTI can_generate_breakpoint_events capability, the can_redefine_classes capability can be set after we have already loaded AOT code. If we then set UseAOT to false, with the AOT code still running, we end up with pointers to stale metadata, resulting in the crash.
24-10-2018

ILW = JVM crash; jvmti with AOT; disable AOT = HLM = P3
05-10-2018