JDK-8202747 : C2: assert(mode == ControlAroundStripMined && use == sfpt) failed: missed a node
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2018-05-07
  • Updated: 2022-10-21
  • Resolved: 2018-06-11
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
11 b18Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
C2 fails to compile attached example with:
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/scratch/opt/mach5/mesos/work_dir/slaves/c4ee7e63-1ded-4e8c-9581-ce26f27e3af4-S69/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/586418bb-0ee2-42a6-9fa9-287343fddaec/runs/51c4f697-f1db-464c-9fe5-26245cfc50fe/workspace/open/src/hotspot/share/opto/loopopts.cpp:1617), pid=25103, tid=25114
#  assert(mode == ControlAroundStripMined && use == sfpt) failed: missed a node
#
# JRE version: Java(TM) SE Runtime Environment (11.0+12) (fastdebug build 11-ea+12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 11-ea+12, compiled mode, compressed oops, g1 gc, linux-amd64)
# Core dump will be written. Default location: Core dumps may be processed with "/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t e %P %I %h" (or dumping to /scratch/lmesnik/ws/crashes/r1-1242/core.25103)
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#

---------------  S U M M A R Y ------------

Command Line: -Xcomp -Xbatch -XX:CompileOnly=Test -XX:-TieredCompilation Test

Host: slc16ijb, Intel Core Processor (Haswell, no TSX), 4 cores, 14G, Oracle Linux Server release 7.4
Time: Mon May  7 16:35:07 2018 PDT elapsed time: 0 seconds (0d 0h 0m 0s)

---------------  T H R E A D  ---------------

Current thread (0x00007f8b682da800):  JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=25114, stack(0x00007f8b5817b000,0x00007f8b5827c000)]


Current CompileTask:
C2:    478    4    b        Test::vMeth (289 bytes)

Stack: [0x00007f8b5817b000,0x00007f8b5827c000],  sp=0x00007f8b58275e20,  free space=1003k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x1859d2f]  VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x25f
V  [libjvm.so+0x185aaef]  VMError::report_and_die(Thread*, void*, char const*, int, char const*, char const*, __va_list_tag*)+0x2f
V  [libjvm.so+0xadfb30]  report_vm_error(char const*, int, char const*, char const*, ...)+0x100
V  [libjvm.so+0x127e49c]  PhaseIdealLoop::clone_loop_handle_data_uses(Node*, Node_List&, IdealLoopTree*, IdealLoopTree*, Node_List*&, Node_List*&, Node_List*&, Node_List&, unsigned int, PhaseIdealLoop::CloneLoopMode)+0x5bc
V  [libjvm.so+0x127f7c7]  PhaseIdealLoop::clone_loop(IdealLoopTree*, Node_List&, int, PhaseIdealLoop::CloneLoopMode, Node*)+0xe27
V  [libjvm.so+0x1242e65]  PhaseIdealLoop::do_peeling(IdealLoopTree*, Node_List&)+0xd5
V  [libjvm.so+0x124940e]  PhaseIdealLoop::do_maximally_unroll(IdealLoopTree*, Node_List&)+0x7e
V  [libjvm.so+0x124dc91]  IdealLoopTree::iteration_split_impl(PhaseIdealLoop*, Node_List&)+0x581
V  [libjvm.so+0x124df4a]  IdealLoopTree::iteration_split(PhaseIdealLoop*, Node_List&)+0x24a
V  [libjvm.so+0x124de7c]  IdealLoopTree::iteration_split(PhaseIdealLoop*, Node_List&)+0x17c
V  [libjvm.so+0x124de7c]  IdealLoopTree::iteration_split(PhaseIdealLoop*, Node_List&)+0x17c
V  [libjvm.so+0x12740c1]  PhaseIdealLoop::build_and_optimize(bool, bool)+0xe31
V  [libjvm.so+0xa3d914]  Compile::Optimize()+0xb44
V  [libjvm.so+0xa3ec74]  Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool, bool, DirectiveSet*)+0xf94
V  [libjvm.so+0x835781]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, DirectiveSet*)+0xd1
V  [libjvm.so+0xa4c353]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x413
V  [libjvm.so+0xa4d327]  CompileBroker::compiler_thread_loop()+0x317
V  [libjvm.so+0x17a57a7]  JavaThread::thread_main_inner()+0x2c7
V  [libjvm.so+0x17a5aff]  JavaThread::run()+0x24f
V  [libjvm.so+0x14b9460]  thread_native_entry(Thread*)+0x100

Comments
URL: http://hg.openjdk.java.net/jdk/jdk/rev/f07979db6cb2 User: roland Date: 2018-06-11 12:36:16 +0000
11-06-2018

Roland, could you please have a look?
08-05-2018

The code was introduced for Loop Strip Mining by JDK-8186027. I'm able to reproduce this with latest JDK 11 but JDK 10 seems to be not affected.
08-05-2018

ILW = Assert during C2 compilation, single test but easy to reproduce, disable loop strip mining (-XX:LoopStripMiningIter=0) = HMM = P2
08-05-2018

Reproduced on JDK 11 b12 with: export JAVA_HOME=<fastdebug> build $JAVA_HOME/bin/javac Test.java $JAVA_HOME/bin/java -Xcomp -Xbatch -XX:CompileOnly=Test -XX:-TieredCompilation Test
07-05-2018