JDK-8215757 : C2: PhaseIdealLoop::create_new_if_for_predicate() computes wrong IDOM
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,12
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-12-20
  • Updated: 2024-10-18
  • Resolved: 2019-01-16
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 12 JDK 13 JDK 8
11.0.4Fixed 12 b28Fixed 13Fixed 8u431Fixed
Related Reports
Relates :  
Relates :  
Description
The following assertion was hit by runthese testing in JDK12-24 ATR testing:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (t:/workspace/open/src/hotspot/share/opto/split_if.cpp:322), pid=33176, tid=40244
#  assert(prior_n->is_Region()) failed: must be a post-dominating merge point
#
# JRE version: Java(TM) SE Runtime Environment (12.0+24) (fastdebug build 12-ea+24)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 12-ea+24, mixed mode, sharing, tiered, compressed oops, parallel gc, windows-amd64)
# Core dump will be written. Default location: T:\testOutput\test-support\jtreg_closed_test_hotspot_jtreg_applications_runthese_RunThese30M_java\scratch\0\hs_err_pid33176.mdmp
#
# 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: -XX:MaxRAMPercentage=8 -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:+UseNUMA -XX:+IgnoreUnrecognizedVMOptions --add-opens=java.base/java.net=ALL-UNNAMED -Dseed=4189835214713881 -XX:MaxRAMPercentage=50 applications.runthese.Runner -duration 30 -runlist T:\testOutput\test-support\jtreg_closed_test_hotspot_jtreg_applications_runthese_RunThese30M_java\scratch\0\.\RunTheseTestList.dat

Host: sca00mgr, Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz, 6 cores, 30G,  Windows Server 2012 R2 , 64 bit Build 9600 (6.3.9600.17415)
Time: Sun Dec 16 07:36:47 2018 Ame elapsed time: 195 seconds (0d 0h 3m 15s)

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

Current thread (0x00000087f35ad800):  JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=40244, stack(0x00000087f4ed0000,0x00000087f4fd0000)]


Current CompileTask:
C2: 195431 32218       4       jdk.internal.module.Checks::isJavaIdentifier (76 bytes)

Stack: [0x00000087f4ed0000,0x00000087f4fd0000]
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0xb58ee1]  os::platform_print_native_stack+0xf1  (os_windows_x86.cpp:369)
V  [jvm.dll+0xd77310]  VMError::report+0xe80  (vmerror.cpp:698)
V  [jvm.dll+0xd78b64]  VMError::report_and_die+0x854  (vmerror.cpp:1471)
V  [jvm.dll+0xd79224]  VMError::report_and_die+0x64  (vmerror.cpp:1295)
V  [jvm.dll+0x57e3fe]  report_vm_error+0x7e  (debug.cpp:232)
V  [jvm.dll+0xc4ef90]  PhaseIdealLoop::spinup+0x2e0  (split_if.cpp:322)
V  [jvm.dll+0xc4efe4]  PhaseIdealLoop::spinup+0x334  (split_if.cpp:328)
V  [jvm.dll+0xc4eae5]  PhaseIdealLoop::handle_use+0x1d5  (split_if.cpp:419)
V  [jvm.dll+0xc4e5b4]  PhaseIdealLoop::do_split_if+0xe14  (split_if.cpp:546)
V  [jvm.dll+0xa0991d]  PhaseIdealLoop::split_if_with_blocks_post+0x69d  (loopopts.cpp:1304)
V  [jvm.dll+0xa09247]  PhaseIdealLoop::split_if_with_blocks+0x1d7  (loopopts.cpp:1491)
V  [jvm.dll+0x9e7139]  PhaseIdealLoop::build_and_optimize+0xeb9  (loopnode.cpp:2969)
V  [jvm.dll+0x511ee7]  Compile::optimize_loops+0x157  (compile.cpp:2180)
V  [jvm.dll+0x505df8]  Compile::Optimize+0x1498  (compile.cpp:2362)
V  [jvm.dll+0x501fa2]  Compile::Compile+0xed2  (compile.cpp:871)
V  [jvm.dll+0x3fe2fb]  C2Compiler::compile_method+0x10b  (c2compiler.cpp:112)
V  [jvm.dll+0x51ccf9]  CompileBroker::invoke_compiler_on_method+0x729  (compilebroker.cpp:2123)
V  [jvm.dll+0x51ac79]  CompileBroker::compiler_thread_loop+0x309  (compilebroker.cpp:1808)
V  [jvm.dll+0xd1be71]  JavaThread::run+0x2c1  (thread.cpp:1792)
V  [jvm.dll+0xd10b8b]  Thread::call_run+0x21b  (thread.cpp:394)
V  [jvm.dll+0xb57783]  thread_native_entry+0x123  (os_windows.cpp:459)
C  [ucrtbase.DLL+0x1d885]
C  [KERNEL32.DLL+0x13d2]
C  [ntdll.dll+0x154f4]
Comments
Fix Request (11u) Backporting this patch resolves a JVM crash (apparently seen with Solr). Patch applies cleanly to 11u, passes tier{1,2} tests with Linux x86_64 fastdebug. Changes look safe to Roland and myself (after reading the discussion in RFR).
02-05-2019

URL: http://hg.openjdk.java.net/jdk/jdk12/rev/c52a37f40324 User: vlivanov Date: 2019-01-16 17:57:06 +0000
16-01-2019

I think the priority should be higher: ILW = Crash in split if optimization, intermittent but easy to reproduce with replay compilation, disable split if (-XX:-SplitIfBlocks) or compilation of affected method = HMM = P2
03-01-2019

Crash reproducible with jdk12b24 fastdebug build and attached replay file ! $ ....jdk12b24/jdk-12/fastdebug/bin/java -XX:+ReplayCompiles -XX:+ReplayIgnoreInitErrors -XX:ReplayDataFile=replay_pid20824.log ....... ....... Resolving klass java/util/Objects at 429 Resolving klass jdk/internal/logger/LazyLoggers at 436 Resolving klass java/lang/IndexOutOfBoundsException at 10 ....... # A fatal error has been detected by the Java Runtime Environment: # Internal Error (....open/src/hotspot/share/opto/split_if.cpp:322), pid=8918, tid=8929 # assert(prior_n->is_Region()) failed: must be a post-dominating merge point # # JRE version: Java(TM) SE Runtime Environment (12.0+24) (fastdebug build 12-ea+24) # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 12-ea+24, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64) # Problematic frame: # V [libjvm.so+0x167f920] PhaseIdealLoop::spinup(Node*, Node*, Node*, Node*, Node*, small_cache*) [clone .part.42]+0x340 # ..............
03-01-2019

It doesn't need to make bug confidential if a closed test failed. It is only needed to put links into confidential comments.
30-12-2018