JDK-8259706 : C2 compilation fails with assert(vtable_index == Method::invalid_vtable_index) failed: correct sentinel value
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-01-13
  • Updated: 2021-02-02
  • Resolved: 2021-01-14
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 16 JDK 17
11.0.11-oracleFixed 16.0.1Fixed 17 b06Fixed
Related Reports
Relates :  
Description
Failure only triggers with JDK 11u on Sparc but JDK 17 is affected as well:

#  Internal Error (open/src/hotspot/cpu/sparc/sparc.ad:2468), pid=17878, tid=12
#  assert(vtable_index == Method::invalid_vtable_index) failed: correct sentinel value

Current CompileTask:
C2:  41955  357       4       jdk.internal.misc.Unsafe::allocateUninitializedArray (52 bytes)

Stack: [0xffffffff52e00000,0xffffffff52f00000],  sp=0xffffffff52efa7c0,  free space=1001k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x24bbf38]  void VMError::report_and_die(int,const char*,const char*,void*,Thread*,unsigned char*,void*,void*,const char*,int,unsigned long)+0xa18
V  [libjvm.so+0x24bb4ac]  void VMError::report_and_die(Thread*,void*,const char*,int,const char*,const char*,void*)+0x3c
V  [libjvm.so+0x154b360]  void report_vm_error(const char*,int,const char*,const char*,...)+0x80
V  [libjvm.so+0xec5c1c]  void CallDynamicJavaDirectNode::emit(CodeBuffer&,PhaseRegAlloc*)const+0xbc
V  [libjvm.so+0x142d0c0]  unsigned Compile::scratch_emit_size(const Node*)+0x350
V  [libjvm.so+0x2010ff4]  void Compile::shorten_branches(unsigned*,int&,int&,int&)+0x4d4
V  [libjvm.so+0x2013db4]  CodeBuffer*Compile::init_buffer(unsigned*)+0x374
V  [libjvm.so+0x2010478]  void Compile::Output()+0x798
V  [libjvm.so+0x143adfc]  void Compile::Code_Gen()+0x74c
V  [libjvm.so+0x142e5d4]  Compile::Compile(ciEnv*,C2Compiler*,ciMethod*,int,bool,bool,bool,DirectiveSet*)+0x1344
V  [libjvm.so+0x1220e64]  void C2Compiler::compile_method(ciEnv*,ciMethod*,int,DirectiveSet*)+0x144
V  [libjvm.so+0x1455250]  void CompileBroker::invoke_compiler_on_method(CompileTask*)+0x5b0
V  [libjvm.so+0x1454028]  void CompileBroker::compiler_thread_loop()+0x3e8
V  [libjvm.so+0x23b63f4]  void JavaThread::thread_main_inner()+0x2e4
V  [libjvm.so+0x23ae230]  void Thread::call_run()+0x130
V  [libjvm.so+0x1ff3c54]  thread_native_entry+0x3f4

Comments
Fix Request (JDK 16u): This is a follow-up fix for JDK-8259339. The fix is trivial and low risk. The patch applies cleanly to JDK 16u.
28-01-2021

This is a follow-up fix for JDK-8259339, i.e. if we decide to backport JDK-8259339, this should be backported as well.
15-01-2021

[~thartmann] Does it make sense to port this issue to 16u also? ( if so, is that something that you can do? )
14-01-2021

Fix Request Should get backported for parity with 11.0.11-oracle. Applies cleanly. I want to backport this follow-up fix together with JDK-8259339.
14-01-2021

Changeset: 8b8b1f9a Author: Tobias Hartmann <thartmann@openjdk.org> Date: 2021-01-14 07:23:09 +0000 URL: https://git.openjdk.java.net/jdk/commit/8b8b1f9a
14-01-2021

ILW = Harmless assert due to unexpected sentinel value, only on Sparc with JDK 11u but affects other platforms as well, disable intrinsic = MLH = P4
13-01-2021