JDK-8273895 : compiler/ciReplay/TestVMNoCompLevel.java fails due to wrong data size with TieredStopAtLevel=2,3
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17,18
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-09-16
  • Updated: 2022-12-02
  • Resolved: 2021-09-20
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 17 JDK 18
11.0.19-oracleFixed 17.0.3-oracleFixed 18 b16Fixed
Related Reports
Relates :  
Description
compiler/ciReplay/TestVMNoCompLevel.java fails when executed with TieredStopAtLevel=2 or 3 with the following assertion:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/christian/jdk/open/src/hotspot/share/ci/ciReplay.cpp:1353), pid=51529, tid=51545
#  assert(m->_data_size + m->_extra_data_size == rec->_data_length * (int)sizeof(rec->_data[0]) || m->_data_size == rec->_data_length * (int)sizeof(rec->_data[0])) failed: must agree
#
# JRE version: Java(TM) SE Runtime Environment (18.0) (slowdebug build 18-internal+0-2021-09-16-0618098.christian...)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (slowdebug 18-internal+0-2021-09-16-0618098.christian..., mixed mode, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x71e669]  ciReplay::initialize(ciMethodData*)+0x17d
...........
Command Line: -XX:TieredStopAtLevel=2 -XX:-CreateCoredumpOnCrash -XX:+IgnoreUnrecognizedVMOptions -XX:TypeProfileLevel=222 -XX:+ReplayCompiles -XX:ReplayDataFile=test_replay.txt -XX:-TieredCompilation 
...........
Current thread (0x00007f00e0310cd0):  JavaThread "C2 CompilerThread0" daemon [_thread_in_vm, id=51545, stack(0x00007f00d46ff000,0x00007f00d4800000)]


Current CompileTask:
C2:   1362   25    b        compiler.ciReplay.CiReplayBase$TestMain::test (30 bytes)

Stack: [0x00007f00d46ff000,0x00007f00d4800000],  sp=0x00007f00d47fc990,  free space=1014k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x71e669]  ciReplay::initialize(ciMethodData*)+0x17d
V  [libjvm.so+0x70dab3]  ciMethodData::load_data()+0x457
V  [libjvm.so+0x707cb8]  ciMethod::ensure_method_data(methodHandle const&)+0x11e
V  [libjvm.so+0x707e10]  ciMethod::ensure_method_data()+0x136
V  [libjvm.so+0x7abb36]  Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, bool, DirectiveSet*)+0xa8c
V  [libjvm.so+0x699436]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x138
V  [libjvm.so+0x7c978b]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x885
V  [libjvm.so+0x7c8417]  CompileBroker::compiler_thread_loop()+0x3df
V  [libjvm.so+0x7e86c3]  CompilerThread::thread_entry(JavaThread*, JavaThread*)+0x69
V  [libjvm.so+0x1193053]  JavaThread::thread_main_inner()+0x15d
V  [libjvm.so+0x1192eef]  JavaThread::run()+0x165
V  [libjvm.so+0x11907e4]  Thread::call_run()+0x180
V  [libjvm.so+0xf9a7bb]  thread_native_entry(Thread*)+0x18f
Comments
Fix request [17u] I backport this for parity with 17.0.3-oracle. No risk, only a test change. Clean backport. This was already approved by Rob. SAP nightly tests passed.
31-12-2021

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk17u-dev/pull/44 Date: 2021-12-29 20:38:31 +0000
29-12-2021

Changeset: a561eac9 Author: Christian Hagedorn <chagedorn@openjdk.org> Date: 2021-09-20 12:53:56 +0000 URL: https://git.openjdk.java.net/jdk/commit/a561eac912740da6a5982c47558e13f34481219f
20-09-2021

Starts to fail after JDK-8251462.
16-09-2021