JDK-8241041 : C2: "assert((Value(phase) == t) || (t != TypeInt::CC_GT && t != TypeInt::CC_EQ)) failed: missing Value() optimization" still happens after fix for 8239335
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 15
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • CPU: x86_64
  • Submitted: 2020-03-15
  • Updated: 2020-08-04
  • Resolved: 2020-04-06
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 15
15 b18Fixed
Related Reports
Relates :  
Relates :  
Description
The following test fails in the JDK15 CI:

applications/renaissance/RenaissanceStressTest24H.java

Here's a snippet from the log file:

====== dotty (scala-dotty) [default], iteration 25 started ======
====== dotty (scala-dotty) [default], iteration 25 completed (24603.955 ms) ======
====== dotty (scala-dotty) [default], iteration 26 started ======
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (t:/workspace/open/src/hotspot/share/opto/subtypenode.cpp:165), pid=14916, tid=40460
#  assert((Value(phase) == t) || (t != TypeInt::CC_GT && t != TypeInt::CC_EQ)) failed: missing Value() optimization
#
# JRE version: Java(TM) SE Runtime Environment (15.0+15) (fastdebug build 15-ea+15-573)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 15-ea+15-573, mixed mode, tiered, g1 gc, windows-amd64)
# Core dump will be written. Default location: T:\\testoutput\\test-support\\jtreg_closed_test_hotspot_jtreg_applications_renaissance_RenaissanceStressTest24H_java\\scratch\\0\\hs_err_pid14916.mdmp
#
Unsupported internal testing APIs have been used.

# An error report file with more information is saved as:
# T:\\testoutput\\test-support\\jtreg_closed_test_hotspot_jtreg_applications_renaissance_RenaissanceStressTest24H_java\\scratch\\0\\hs_err_pid14916.log
#
# Compiler replay data is saved as:
# T:\\testoutput\\test-support\\jtreg_closed_test_hotspot_jtreg_applications_renaissance_RenaissanceStressTest24H_java\\scratch\\0\\replay_pid14916.log
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#
----------System.err:(1020/83161)*----------
WARNING: Using incubator modules: jdk.incubator.foreign
[Sat Mar 14 15:56:55 GMT 2020] System.out/err are copied into glue.process.* logs. Starting.

--- Run and results directory --------------------------------------------------


Here's the crashing thread's stack:

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

Current thread (0x000000edca384800):  JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=40460, stack(0x000000edcbae0000,0x000000edcbbe0000)]


Current CompileTask:
C2:16190295 700964       4       dotty.tools.dotc.typer.Namer::recur$1 (252 bytes)

Stack: [0x000000edcbae0000,0x000000edcbbe0000]
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0x9e9741]  os::platform_print_native_stack+0xf1  (os_windows_x86.cpp:369)
V  [jvm.dll+0xbeb4db]  VMError::report+0xf0b  (vmerror.cpp:725)
V  [jvm.dll+0xbecd8e]  VMError::report_and_die+0x8ae  (vmerror.cpp:1533)
V  [jvm.dll+0xbed484]  VMError::report_and_die+0x64  (vmerror.cpp:1317)
V  [jvm.dll+0x413a82]  report_vm_error+0x102  (debug.cpp:264)
V  [jvm.dll+0xb1577e]  SubTypeCheckNode::Ideal+0x8be  (subtypenode.cpp:166)
V  [jvm.dll+0xa2af5f]  PhaseIterGVN::transform_old+0xcf  (phasex.cpp:1229)
V  [jvm.dll+0xa283ea]  PhaseIterGVN::optimize+0x29a  (phasex.cpp:1176)
V  [jvm.dll+0x3d4df6]  Compile::Optimize+0xe56  (compile.cpp:2375)
V  [jvm.dll+0x3d1622]  Compile::Compile+0xfe2  (compile.cpp:873)
V  [jvm.dll+0x311b4b]  C2Compiler::compile_method+0x12b  (c2compiler.cpp:114)
V  [jvm.dll+0x3e9f7e]  CompileBroker::invoke_compiler_on_method+0x79e  (compilebroker.cpp:2174)
V  [jvm.dll+0x3e7d5d]  CompileBroker::compiler_thread_loop+0x29d  (compilebroker.cpp:1854)
V  [jvm.dll+0xb8f4fe]  JavaThread::run+0x27e  (thread.cpp:1951)
V  [jvm.dll+0xb858f2]  Thread::call_run+0x192  (thread.cpp:404)
V  [jvm.dll+0x9e7e7e]  thread_native_entry+0x10e  (os_windows.cpp:465)
C  [ucrtbase.DLL+0x203ba]
C  [KERNEL32.DLL+0x13d2]
C  [ntdll.dll+0x154f4]


This failure looks like the following bug:

    JDK-8239335 C2: assert((Value(phase) == t) || (t != TypeInt::CC_GT && t != TypeInt::CC_EQ)) failed: missing Value() optimization

but that bug fix was pushed in jdk-15+14-529 and this failure
is happening in jdk-15+15-573.

Starting this bug as a P2 to match the priority of JDK-8239335.
Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/4ac1a45ab8f7 User: roland Date: 2020-04-06 07:42:44 +0000
06-04-2020

And just now it reproduced :D # Internal Error (t:/workspace/open/src/hotspot/share/opto/subtypenode.cpp:202), pid=49332, tid=118492 # Error: ShouldNotReachHere() 2766 CheckCastPP === 3776 3777 [[ 5457 992 1164 993 4926 ]] #dotty/tools/dotc/core/Contexts$Context:NotNull * Oop:dotty/tools/dotc/core/Contexts$Context:NotNull * !orig=[1836] !jvms: AbstractMap::<init> @ bci:21 AbstractMap::<init> @ bci:1 HashMap::<init> @ bci:1 HashMap::<init> @ bci:2 Map$::empty @ bci:4 Map$::empty @ bci:1 MutableMapFactory::newBuilder @ bci:1 GenMapFactory::apply @ bci:1 Namer::index @ bci:13 Namer::recur$1 @ bci:63 5675 ConP === 0 [[ 4926 ]] #precise klass dotty/tools/dotc/core/Contexts$FreshContext: 0x000000a878a5eb20:Constant:exact * Klass:precise klass dotty/tools/dotc/core/Contexts$FreshContext: 0x000000a878a5eb20:Constant:exact * !jvms: MapBuilder::result @ bci:1 MapBuilder::result @ bci:1 GenMapFactory::apply @ bci:13 Namer::index @ bci:13 Namer::recur$1 @ bci:63
18-03-2020

Roland provided a patch that adds additional debug information to me. I'm currently trying to reproduce the assert with that patch applied. No luck yet.
18-03-2020

ILW = Similar to 8239335 = P2 Hi [~roland], Request your help to check this task please. Thank you.
16-03-2020