JDK-8260420 : C2 compilation fails with assert(found_sfpt) failed: no node in loop that's not input to safepoint
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,16,17
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-01-26
  • Updated: 2021-05-25
  • Resolved: 2021-02-02
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 17
11.0.12-oracleFixed 17 b08Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
class MyClass {
    int x = 42;
}

class MainClass {
    static int f1;
    
    static int test(MyClass obj1, MyClass obj2) {
        for (int i = 0; i < 60; ++i) {
            for (int j = 0; j < 10; ++j) {
                f1 = obj1.x;
                obj2.x = 12;
            }
        }
        return f1;
    }
   
    public static void main(String[] args) {
        MyClass obj = new MyClass() ;
        for (int i = 0; i < 10_000; ++i) {
            test(obj, obj);
        }
    }
}

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/oracle/jdk/open/src/hotspot/share/opto/loopnode.cpp:1782), pid=398590, tid=398612
#  assert(found_sfpt) failed: no node in loop that's not input to safepoint
#
# JRE version: Java(TM) SE Runtime Environment (17.0) (fastdebug build 17-internal+0-2020-12-02-1200406.tobias...)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 17-internal+0-2020-12-02-1200406.tobias..., mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x130e9de]  LoopNode::verify_strip_mined(int) const+0xaee

Current CompileTask:
C2:   1211  489 %     4       MainClass::test @ 2 (45 bytes)

Stack: [0x00007fa5c004a000,0x00007fa5c014b000],  sp=0x00007fa5c0145020,  free space=1004k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x130e9de]  LoopNode::verify_strip_mined(int) const+0xaee
V  [libjvm.so+0x130efbc]  CountedLoopNode::skip_strip_mined(int)+0x4c
V  [libjvm.so+0x12ee75b]  PhaseIdealLoop::do_peeling(IdealLoopTree*, Node_List&)+0xbb
V  [libjvm.so+0x12f66ff]  IdealLoopTree::do_remove_empty_loop(PhaseIdealLoop*) [clone .part.0]+0x6cf
V  [libjvm.so+0x13004a5]  IdealLoopTree::iteration_split(PhaseIdealLoop*, Node_List&)+0x125
V  [libjvm.so+0x13003b5]  IdealLoopTree::iteration_split(PhaseIdealLoop*, Node_List&)+0x35
V  [libjvm.so+0x132d313]  PhaseIdealLoop::build_and_optimize(LoopOptsMode)+0xc93
V  [libjvm.so+0xa1b38b]  PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0x32b
V  [libjvm.so+0xa17d5b]  Compile::Optimize()+0x14fb
V  [libjvm.so+0xa19b20]  Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, DirectiveSet*)+0x1840
V  [libjvm.so+0x849c4c]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1dc
V  [libjvm.so+0xa29b58]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0xe88
V  [libjvm.so+0xa2a7a8]  CompileBroker::compiler_thread_loop()+0x5a8
V  [libjvm.so+0x18ad306]  JavaThread::thread_main_inner()+0x256
V  [libjvm.so+0x18b3d10]  Thread::call_run()+0x100
V  [libjvm.so+0x1596a06]  thread_native_entry(Thread*)+0x116
Comments
Fix Request (OpenJDK 11u): Please approve backporting this to OpenJDK 11.0.12 for Oracle parity. Patch applies clean, regression test fails prior and passes after. Testing tier1 fastdebug.
03-03-2021

Changeset: fe407cf1 Author: Tobias Hartmann <thartmann@openjdk.org> Date: 2021-02-02 07:23:55 +0000 URL: https://git.openjdk.java.net/jdk/commit/fe407cf1
02-02-2021

ILW = Same as JDK-8229483 = P3
26-01-2021