JDK-8285885 : Replay compilation fails with assert(is_valid()) failed: check invoke
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 18,19
  • Priority: P3
  • Status: In Progress
  • Resolution: Unresolved
  • Submitted: 2022-04-29
  • Updated: 2022-05-03
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 19
19Unresolved
Related Reports
Relates :  
Description
Replay compilation with attached replay file replay_pid2967600.log fails since JDK-8271911:

#  Internal Error (/open/src/hotspot/share/interpreter/bytecode.cpp:122), pid=893400, tid=893401
#  assert(is_valid()) failed: check invoke
#
# JRE version: Java(TM) SE Runtime Environment (18.0+36) (fastdebug build 18+36-2087)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 18+36-2087, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x733725]  Bytecode_invoke::verify() const+0x285

Stack: [0x00007f536c1e7000,0x00007f536c2e8000],  sp=0x00007f536c2e68a0,  free space=1022k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x733725]  Bytecode_invoke::verify() const+0x285
V  [libjvm.so+0x99e4e9]  CompileReplay::parse_cp_ref(JavaThread*)+0x5f9
V  [libjvm.so+0x99f216]  CompileReplay::parse_klass(JavaThread*)+0x166
V  [libjvm.so+0x9a0b6c]  CompileReplay::process_instanceKlass(JavaThread*)+0x1c
V  [libjvm.so+0x998d68]  ciReplay::replay_impl(JavaThread*)+0xcd8
V  [libjvm.so+0x998e8f]  ciReplay::replay(JavaThread*)+0xf
V  [libjvm.so+0x1045eb8]  JNI_CreateJavaVM+0x5c8
C  [libjli.so+0x3aef]  JavaMain+0x8f
C  [libjli.so+0x7aa9]  ThreadJavaMain+0x9

I also attached the required jar files from Lucene but the issue reproduces without them.

Workaround:

sed '/@bci/d' replay_pid2967600.log > new_replay
Comments
A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/8514 Date: 2022-05-03 01:46:22 +0000
03-05-2022

No, most likely it's not the same version but the jar is not required to trigger the failure and I think replay compilation should be more robust when ReplayIgnoreInitErrors is enabled (especially since the failing classes/methods do not take part in the actual compilation that is to be replayed).
02-05-2022

The crash in JDK-8285835 says it is using lucene-core-10.0.0-SNAPSHOT.jar.
29-04-2022

[~thartmann], the bytecodes in the jar file don't match what is in the replay file. Are you sure this is the same jar file that was used to generate the replay file?
29-04-2022

Dean, could you please have a look?
29-04-2022

ILW = Replay compilation fails, replay files with cp ref, remove @bci statements from replay file = MMM = P3
29-04-2022