JDK-8260709 : C2: assert(false) failed: unscheduable graph
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 16,17
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-02-01
  • Updated: 2021-03-16
  • Resolved: 2021-02-04
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 16 JDK 17
16 b00Fixed 17Fixed
Related Reports
Relates :  
Relates :  
Description
The attached fuzzer test starts to fail after JDK-8258393 with the following assertion:

To reproduce (could only reproduce it with the replay file):
java -Xmx1G -XX:+ReplayCompiles -XX:ReplayDataFile=replay_pid5517.log -XX:+ReplayIgnoreInitErrors

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/opt/mach5/mesos/work_dir/slaves/983c483a-6907-44e0-ad29-98c7183575e2-S14607/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/eb38ced5-f547-47f5-8cdb-5f862460886e/runs/be7bd1d1-1006-4697-88a2-7187c1776884/workspace/open/src/hotspot/share/opto/gcm.cpp:276), pid=5517, tid=5544
#  assert(false) failed: unscheduable graph
#
# JRE version: Java(TM) SE Runtime Environment (16.0+34) (fastdebug build 16-ea+34-2216)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 16-ea+34-2216, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0xd101b2]  assert_dom(Block*, Block*, Node*, PhaseCFG const*)+0x1b2
..........
Command Line: -Xmx1G Test
..........
Current thread (0x00007fe54c494520):  JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=5544, stack(0x00007fe51b6ff000,0x00007fe51b800000)]


Current CompileTask:
C2:   6110  271       4       Test::mainTest (768 bytes)

Stack: [0x00007fe51b6ff000,0x00007fe51b800000],  sp=0x00007fe51b7fadb0,  free space=1007k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xd101b2]  assert_dom(Block*, Block*, Node*, PhaseCFG const*)+0x1b2
V  [libjvm.so+0xd11928]  PhaseCFG::schedule_early(VectorSet&, Node_Stack&)+0x588
V  [libjvm.so+0xd1a561]  PhaseCFG::global_code_motion()+0x281
V  [libjvm.so+0xd1e5f1]  PhaseCFG::do_global_code_motion()+0x51
V  [libjvm.so+0xa0eb40]  Compile::Code_Gen()+0x290
V  [libjvm.so+0xa19b77]  Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, DirectiveSet*)+0x1917
V  [libjvm.so+0x849c2c]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1dc
V  [libjvm.so+0xa298e8]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0xe88
V  [libjvm.so+0xa2a538]  CompileBroker::compiler_thread_loop()+0x5a8
V  [libjvm.so+0x18bb1e6]  JavaThread::thread_main_inner()+0x256
V  [libjvm.so+0x18c1b60]  Thread::call_run()+0x100
V  [libjvm.so+0x15a39b6]  thread_native_entry(Thread*)+0x116

Other failure mode:
#  Internal Error (/oracle/valhalla/open/src/hotspot/share/opto/gcm.cpp:744), pid=610421, tid=610439
#  assert(!LCA_orig->dominates(pred_block) || early->dominates(pred_block)) failed: early is high enough
Comments
Changeset: 4de3a6be Author: Roland Westrelin <roland@openjdk.org> Date: 2021-02-04 15:11:25 +0000 URL: https://git.openjdk.java.net/jdk16/commit/4de3a6be
04-02-2021

Fix Request for JDK 16 approved.
03-02-2021

Fix Request: this bug causes a c2 crash. The fix disables a c2 transformation for the specific case that causes the problem so risk should be low. Test coverage includes the usual tests, the fuzzer test that triggered the problem (with replay compilation) and a new jtreg test. The fix was reviewed by Tobias and Christian.
03-02-2021

ILW = Assert during C2 compilation (regression in JDK 16), reproducible with JavaFuzzer generated test, disable compilation of affected method = HMM = P2
01-02-2021