JDK-8202950 : C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 10,11
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2018-05-11
  • Updated: 2018-08-16
  • Resolved: 2018-05-24
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 b16Fixed
Related Reports
Relates :  
Description
C2 fails to compile example with 
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/scratch/opt/mach5/mesos/work_dir/slaves/9190d864-6621-4810-ba08-d8d8c75ba674-S395/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/b528528e-501d-44e6-b294-995b8b2b1881/runs/3f528bbf-2970-4319-80de-390e34a632b0/workspace/open/src/hotspot/share/opto/loopnode.cpp:916), pid=23044, tid=23055
#  assert(found_sfpt) failed: no node in loop that's not input to safepoint
#
# JRE version: Java(TM) SE Runtime Environment (11.0+7) (fastdebug build 11-ea+7)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 11-ea+7, 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 /tmp/fuzzer.tmp.XWph5hV3Hg/core.23044)
#
# 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: -Xmx1G -Xcomp -Xbatch -XX:-TieredCompilation -XX:CompileOnly= Test

Host: slc16ijb, Intel Core Processor (Haswell, no TSX), 4 cores, 14G, Oracle Linux Server release 7.4
Time: Mon Apr 30 18:17:45 2018 PDT elapsed time: 7 seconds (0d 0h 0m 7s)

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

Current thread (0x00007f5a40267000):  JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=23055, stack(0x00007f5a306ba000,0x00007f5a307bb000)]


Current CompileTask:
C2:   7175 1364    b        Test::lMeth (290 bytes)

Stack: [0x00007f5a306ba000,0x00007f5a307bb000],  sp=0x00007f5a307b4eb0,  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+0x180fd12]  VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x162
V  [libjvm.so+0x1810baf]  VMError::report_and_die(Thread*, char const*, int, char const*, char const*, __va_list_tag*)+0x2f
V  [libjvm.so+0xb28abd]  report_vm_error(char const*, int, char const*, char const*, ...)+0xdd
V  [libjvm.so+0x1250690]  LoopNode::verify_strip_mined(int) const+0x6b0
V  [libjvm.so+0x1250c81]  CountedLoopNode::skip_strip_mined(int)+0x21
V  [libjvm.so+0x122f05e]  PhaseIdealLoop::loop_predication_impl(IdealLoopTree*) [clone .part.79]+0x15e
V  [libjvm.so+0x1230ceb]  IdealLoopTree::loop_predication(PhaseIdealLoop*)+0x20b
V  [libjvm.so+0x1230b07]  IdealLoopTree::loop_predication(PhaseIdealLoop*)+0x27
V  [libjvm.so+0x1230b07]  IdealLoopTree::loop_predication(PhaseIdealLoop*)+0x27
V  [libjvm.so+0x1230b26]  IdealLoopTree::loop_predication(PhaseIdealLoop*)+0x46
V  [libjvm.so+0x1265405]  PhaseIdealLoop::build_and_optimize(bool, bool)+0xf65
V  [libjvm.so+0xa8d6fd]  Compile::Optimize()+0x4ad
V  [libjvm.so+0xa8f4ee]  Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool, bool, DirectiveSet*)+0x124e
V  [libjvm.so+0x8b27d2]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, DirectiveSet*)+0x2e2
V  [libjvm.so+0xa99d48]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x3b8
V  [libjvm.so+0xa9a9d1]  CompileBroker::compiler_thread_loop()+0x281
V  [libjvm.so+0x17635f2]  JavaThread::thread_main_inner()+0x242
V  [libjvm.so+0x17637f4]  JavaThread::run()+0x144
V  [libjvm.so+0x1495212]  thread_native_entry(Thread*)+0x112

Comments
Testing passed clean. [~roland] you can push.
24-05-2018

http://cr.openjdk.java.net/~roland/8202950/webrev.00/
23-05-2018

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

ILW = Crash during verification of loop strip mining, reproducible with javafuzzer test, disable loop strip mining (-XX:LoopStripMiningIter=0) = HMM = P2
11-05-2018

To reproduce run: export JAVA_HOME=<fastdebug> build $JAVA_HOME/bin/javac Test.java $JAVA_HOME/bin/java -Xcomp -Xbatch -XX:CompileOnly=Test -XX:-TieredCompilation Test
11-05-2018