JDK-8234794 : AArch64: runtime/memory/ReadFromNoaccessArea.java crashes
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 11,14,15
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: aarch64
  • Submitted: 2019-11-26
  • Updated: 2020-04-15
  • Resolved: 2019-12-19
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 15
15 b03Fixed
Related Reports
Relates :  
Relates :  
Description
On a debug build you get an assertion failure when generating the itable stub like this:

# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/vtableStubs_aarch64.cpp:220
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (src/hotspot/cpu/aarch64/vtableStubs_aarch64.cpp:220), pid=151750, tid=151751
#  assert(slop_delta >= 0) failed: itable #2: Code size estimate (152) for lookup_interface_method too small, required: 156
#
# JRE version: OpenJDK Runtime Environment (14.0) (fastdebug build 14-internal+0-adhoc.nicgas01.jdk)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 14-internal+0-adhoc.nicgas01.jdk, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-aarch64)
# Problematic frame:
# V  [libjvm.so+0x17034ec]  VtableStubs::create_itable_stub(int)+0xda4
#
# CreateCoredumpOnCrash turned off, no core file dumped
#
# An error report file with more information is saved as:
# /home/nicgas01/jdk/hs_err_pid151750.log
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#

On a release build there's a guarantee() failure later on:

#  Internal Error (vtableStubs.cpp:197), pid=6213, tid=6217
#  guarantee(masm->pc() <= s->code_end()) failed: itable #2: overflowed buffer, estimated len: 176, actual len: 180, overrun: 4

JDK-8231610 changed the location of where things are loaded during this test which triggers a very inefficient path in MacroAssembler::decode_klass_not_null. This then overflows the expected maximum itable stub size.
Comments
Fix Request (14u): Applies on jdk14u cleanly. This patch avoids a crash in certain situations when the CDS archive is relocated in memory.
10-04-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/dd4b4f273274 User: njian Date: 2019-12-19 01:53:12 +0000
19-12-2019

Review thread: https://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2019-December/037472.html
17-12-2019