JDK-8071821 : Assert failed in UnexpectedDeoptimizationTest.java
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2015-01-28
  • Updated: 2017-07-26
  • Resolved: 2015-02-12
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 9
9 b52Fixed
Related Reports
Duplicate :  
Description
#  Internal Error (hotspot/src/share/vm/ci/ciInstanceKlass.cpp:516), pid=28800, tid=3253730160
#  assert(_has_injected_fields == -1) failed: shouldn't be initialized yet

Stack:
V  [libjvm.so+0x105e178]  VMError::report_and_die()+0x198;;  VMError::report_and_die()+0x198
V  [libjvm.so+0x6df486]  report_vm_error(char const*, int, char const*, char const*)+0x76;;  report_vm_error(char const*, int, char const*, char const*)+0x76
V  [libjvm.so+0x571d97]  ciInstanceKlass::compute_injected_fields()+0x47;;  ciInstanceKlass::compute_injected_fields()+0x47
V  [libjvm.so+0x521938]  ArrayCopyNode::get_count(PhaseGVN*) const+0x228;;  ArrayCopyNode::get_count(PhaseGVN*) const+0x228
V  [libjvm.so+0x522a02]  ArrayCopyNode::Ideal(PhaseGVN*, bool)+0x2f2;;  ArrayCopyNode::Ideal(PhaseGVN*, bool)+0x2f2
V  [libjvm.so+0xe2cb5c]  PhaseGVN::transform_no_reclaim(Node*)+0x5c;;  PhaseGVN::transform_no_reclaim(Node*)+0x5c
V  [libjvm.so+0xbc2b21]  LibraryCallKit::copy_to_clone(Node*, Node*, Node*, bool, bool)+0x2d1;;  LibraryCallKit::copy_to_clone(Node*, Node*, Node*, bool, bool)+0x2d1
V  [libjvm.so+0xbc5591]  LibraryCallKit::inline_native_clone(bool)+0x931;;  LibraryCallKit::inline_native_clone(bool)+0x931
V  [libjvm.so+0xbcbc24]  LibraryCallKit::try_to_inline(int)+0x1294;;  LibraryCallKit::try_to_inline(int)+0x1294
V  [libjvm.so+0xbcc831]  LibraryIntrinsic::generate(JVMState*)+0x281;;  LibraryIntrinsic::generate(JVMState*)+0x281
V  [libjvm.so+0x78beef]  Parse::do_call()+0x4cf;;  Parse::do_call()+0x4cf
V  [libjvm.so+0xdfb529]  Parse::do_one_bytecode()+0xc49;;  Parse::do_one_bytecode()+0xc49
V  [libjvm.so+0xdeebf6]  Parse::do_one_block()+0x476;;  Parse::do_one_block()+0x476
V  [libjvm.so+0xdefaac]  Parse::do_all_blocks()+0x11c;;  Parse::do_all_blocks()+0x11c
V  [libjvm.so+0xdf1c56]  Parse::Parse(JVMState*, ciMethod*, float)+0xd96;;  Parse::Parse(JVMState*, ciMethod*, float)+0xd96
V  [libjvm.so+0x50d4f8]  ParseGenerator::generate(JVMState*)+0x158;;  ParseGenerator::generate(JVMState*)+0x158
V  [libjvm.so+0x78beef]  Parse::do_call()+0x4cf;;  Parse::do_call()+0x4cf
V  [libjvm.so+0xdfb529]  Parse::do_one_bytecode()+0xc49;;  Parse::do_one_bytecode()+0xc49
V  [libjvm.so+0xdeebf6]  Parse::do_one_block()+0x476;;  Parse::do_one_block()+0x476
V  [libjvm.so+0xdefaac]  Parse::do_all_blocks()+0x11c;;  Parse::do_all_blocks()+0x11c
V  [libjvm.so+0xdf1c56]  Parse::Parse(JVMState*, ciMethod*, float)+0xd96;;  Parse::Parse(JVMState*, ciMethod*, float)+0xd96
V  [libjvm.so+0x50d4f8]  ParseGenerator::generate(JVMState*)+0x158;;  ParseGenerator::generate(JVMState*)+0x158
V  [libjvm.so+0x658dea]  Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool, bool)+0x136a;;  Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool, bool)+0x136a
V  [libjvm.so+0x50bd56]  C2Compiler::compile_method(ciEnv*, ciMethod*, int)+0x196;;  C2Compiler::compile_method(ciEnv*, ciMethod*, int)+0x196
V  [libjvm.so+0x66647e]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0xc4e;;  CompileBroker::invoke_compiler_on_method(CompileTask*)+0xc4e
V  [libjvm.so+0x667456]  CompileBroker::compiler_thread_loop()+0x666;;  CompileBroker::compiler_thread_loop()+0x666
V  [libjvm.so+0xfc1bc5]  compiler_thread_entry(JavaThread*, Thread*)+0x55;;  compiler_thread_entry(JavaThread*, Thread*)+0x55
V  [libjvm.so+0xfd49f2]  JavaThread::thread_main_inner()+0x202;;  JavaThread::thread_main_inner()+0x202
V  [libjvm.so+0xfd4d46]  JavaThread::run()+0x2e6;;  JavaThread::run()+0x2e6
V  [libjvm.so+0xd9b8e0]  java_start(Thread*)+0x100;;  java_start(Thread*)+0x100
C  [libpthread.so.0+0x6a49]
C  [libc.so.6+0xe2aee]  clone+0x5e

Comments
verified by nightly testing
26-07-2017

Some ciInstanceKlass objects are shared between compiler threads so has_injected_fields() can be called on the same ciInstanceKlass concurrently by multiple threads and cause a concurrent initialization of the _has_injected_fields. In itself it���s armless (all threads will get the same result, the _has_inkected_fields will be set correctly) but it causes an assert to fire.
06-02-2015

The failing assert was introduced by the following changeset: http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/acfdd92cedaa Roland, can you please look at this? Thanks, Albert
03-02-2015