JDK-8254998 : C2: assert(!n->as_Loop()->is_transformed_long_loop()) failure with -XX:StressLongCountedLoop=1
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 16
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-10-19
  • Updated: 2024-07-17
  • Resolved: 2020-10-20
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
16 b21Fixed
Related Reports
Relates :  
Relates :  
Description
Reported by Tobias with  JDK-8223051:

#  Internal Error (t:/workspace/open/src/hotspot/share/opto/compile.cpp:3429), pid=577384, tid=462156
#  assert(!n->as_Loop()->is_transformed_long_loop()) failed: should have been turned into a counted loop
Current CompileTask:
C2:  33542 3956       4       jdk.jfr.internal.consumer.ConstantMap::resolve (66 bytes)
Stack: [0x0000000f9dc00000,0x0000000f9dd00000]
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0xaf3c41]  os::platform_print_native_stack+0xf1  (os_windows_x86.cpp:236)
V  [jvm.dll+0xd21ac6]  VMError::report+0xfc6  (vmError.cpp:731)
V  [jvm.dll+0xd234ae]  VMError::report_and_die+0x7de  (vmError.cpp:1548)
V  [jvm.dll+0xd23b64]  VMError::report_and_die+0x64  (vmError.cpp:1341)
V  [jvm.dll+0x4cb2c7]  report_vm_error+0x117  (debug.cpp:267)
V  [jvm.dll+0x48914f]  Compile::final_graph_reshaping_main_switch+0x167f  (compile.cpp:3429)
V  [jvm.dll+0x487965]  Compile::final_graph_reshaping_impl+0x4b5  (compile.cpp:2887)
V  [jvm.dll+0x48a391]  Compile::final_graph_reshaping_walk+0x2c1  (compile.cpp:3593)
V  [jvm.dll+0x486d49]  Compile::final_graph_reshaping+0x2c9  (compile.cpp:3695)
V  [jvm.dll+0x483d16]  Compile::Optimize+0x16c6  (compile.cpp:2280)
V  [jvm.dll+0x4801ba]  Compile::Compile+0x121a  (compile.cpp:749)
V  [jvm.dll+0x3b91cc]  C2Compiler::compile_method+0x12c  (c2compiler.cpp:105)
V  [jvm.dll+0x4987e0]  CompileBroker::invoke_compiler_on_method+0x8e0  (compileBroker.cpp:2226)
V  [jvm.dll+0x4969a8]  CompileBroker::compiler_thread_loop+0x458  (compileBroker.cpp:1900)
V  [jvm.dll+0xcb0037]  JavaThread::run+0x327  (thread.cpp:1977)
V  [jvm.dll+0xca7124]  Thread::call_run+0x1b4  (thread.cpp:401)
V  [jvm.dll+0xaf254e]  thread_native_entry+0x10e  (os_windows.cpp:476)
C  [ucrtbase.dll+0x21ffa]
C  [KERNEL32.DLL+0x17974]
C  [ntdll.dll+0x6a271]

-XX:+CreateCoredumpOnCrash -XX:+UseZGC -XX:+IgnoreUnrecognizedVMOptions -XX:StressLongCountedLoop=1 -XX:MaxRAMPercentage=50 -XX:MaxMetaspaceSize=512m

It seems to be reproducible but only happens with closed tests.
Comments
Changeset: 294e0705 Author: Roland Westrelin <roland@openjdk.org> Date: 2020-10-20 11:53:41 +0000 URL: https://git.openjdk.java.net/jdk/commit/294e0705
20-10-2020

ILW = Assert during C2 compilation (false positive), with stress option, no workaround = MMH = P3
20-10-2020