JDK-8291599 : Assertion in PhaseIdealLoop::skeleton_predicate_has_opaque after JDK-8289127
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17,19,20
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_10
  • CPU: x86
  • Submitted: 2022-08-01
  • Updated: 2022-10-05
  • Resolved: 2022-09-12
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 17 JDK 19 JDK 20
17.0.6-oracleFixed 19.0.2Fixed 20 b15Fixed
Related Reports
Relates :  
Description
When running JMC (HEAD) with a slowdebug OpenJDK build (HEAD), the following assertion is hit loading a big JFR recording:
assert(init == verif_init && stride == verif_stride) failed: missed opaque node

This happens since the fix for bug JDK-8289127 was submitted (which introduced the triggering assertion).

The values of 'init' and 'stride' are 0, but the values of 'verify_init' and 'verify_stride' are 1.

The 'current compile task' is always for the same OSR compilation (for entry of the last while loop in the code):
C2: 392782 11513 %     4       org.openjdk.jmc.flightrecorder.internal.parser.v1.ChunkLoaderV1::call @ 119 (220 bytes)

Stack:
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0xe2b0c3]  os::platform_print_native_stack+0x63  (os_windows_x86.cpp:234)
V  [jvm.dll+0x111e145]  VMError::report+0x1235  (vmError.cpp:836)
V  [jvm.dll+0x11209ae]  VMError::report_and_die+0x6ce  (vmError.cpp:1684)
V  [jvm.dll+0x1121011]  VMError::report_and_die+0x81  (vmError.cpp:1469)
V  [jvm.dll+0x61179d]  report_vm_error+0x9d  (debug.cpp:285)
V  [jvm.dll+0xc69339]  PhaseIdealLoop::skeleton_predicate_has_opaque+0x309  (loopTransform.cpp:1451)
V  [jvm.dll+0xc59f86]  PhaseIdealLoop::get_skeleton_predicates+0x1e6  (loopPredicate.cpp:385)
V  [jvm.dll+0xc8bde1]  PhaseIdealLoop::collect_potentially_useful_predicates+0x261  (loopnode.cpp:4067)
V  [jvm.dll+0xc8be05]  PhaseIdealLoop::collect_potentially_useful_predicates+0x285  (loopnode.cpp:4070)
V  [jvm.dll+0xc8bbb7]  PhaseIdealLoop::collect_potentially_useful_predicates+0x37  (loopnode.cpp:4038)
V  [jvm.dll+0xc8bea4]  PhaseIdealLoop::eliminate_useless_predicates+0x94  (loopnode.cpp:4086)
V  [jvm.dll+0xc84689]  PhaseIdealLoop::build_and_optimize+0xbc9  (loopnode.cpp:4419)
V  [jvm.dll+0x59da2e]  PhaseIdealLoop::PhaseIdealLoop+0xee  (loopnode.hpp:1086)
V  [jvm.dll+0x5a0089]  PhaseIdealLoop::optimize+0x49  (loopnode.hpp:1166)
V  [jvm.dll+0x58e553]  Compile::optimize_loops+0x93  (compile.cpp:2173)
V  [jvm.dll+0x592efe]  Compile::Optimize+0xebe  (compile.cpp:2408)
V  [jvm.dll+0x58fe8e]  Compile::Compile+0x142e  (compile.cpp:824)
V  [jvm.dll+0x498f85]  C2Compiler::compile_method+0x145  (c2compiler.cpp:115)
V  [jvm.dll+0x5a46d6]  CompileBroker::invoke_compiler_on_method+0x7a6  (compileBroker.cpp:2314)
V  [jvm.dll+0x5a7a8a]  CompileBroker::compiler_thread_loop+0x35a  (compileBroker.cpp:1982)
V  [jvm.dll+0x5c5aa4]  CompilerThread::thread_entry+0x54  (compilerThread.cpp:60)
V  [jvm.dll+0x999888]  JavaThread::thread_main_inner+0x138  (javaThread.cpp:700)
V  [jvm.dll+0x999737]  JavaThread::run+0x127  (javaThread.cpp:683)
V  [jvm.dll+0x1086b6c]  Thread::call_run+0x15c  (thread.cpp:229)
V  [jvm.dll+0xe238e8]  thread_native_entry+0x108  (os_windows.cpp:546)
C  [ucrtbase.dll+0x21bb2]
C  [KERNEL32.DLL+0x17034]
C  [ntdll.dll+0x52651]

Comments
Fix request [17u] I backport this for parity with 17.0.6-oracle. Typical risk of C2 change. Medium. Clean backport. Test passes and fails without the fix. SAP nightly testing passed.
05-10-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/770 Date: 2022-10-04 15:05:25 +0000
04-10-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk19u/pull/29 Date: 2022-09-22 13:22:31 +0000
22-09-2022

Fix Request (JDK 19u) Fixes an assert in C2 (regression in JDK 19). The fix is medium risk and applies cleanly. Already tested and backported to Oracle JDK 17u.
22-09-2022

Changeset: 37df5f56 Author: Roland Westrelin <roland@openjdk.org> Date: 2022-09-12 07:30:47 +0000 URL: https://git.openjdk.org/jdk/commit/37df5f56259429482cfdbe38e8b6256f1efaf9e8
12-09-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/10022 Date: 2022-08-25 12:30:02 +0000
25-08-2022

[~rschmelter] thanks. I managed to reproduce it.
22-08-2022

[~roland] It's not too hard to reproduce. Just clone the jmc repository (https://github.com/openjdk/jmc), set JAVA_HOME to a JDK11 and have the VM and maven in the path. Then call build.[sh|bat] --packageJmc Then in another shell set JAVA_HOME to the test JDK and have it in the path. Then call build.[sh|bat] --run Start jconsole in parallel. In the JMC select the jconsole process in the event browser and start flight recording. Select 'Continious recording' and keep the rest as as it is. Wait a few minutes and then select 'Dump whole recoding' from the context menu of the flight recording run until you get the crash (takes 2 dumps for me usually).
22-08-2022

[~rschmelter] thanks for the replay file but I had no luck with it. How hard would it be for me to reproduce this by running jmc? Can you share the jfr recording and the required steps?
22-08-2022

[~rschmelter] Can you attach the hs_err_pidxxx.log/replay_pidxxx.log files?
18-08-2022

[~roland], please take a look.
02-08-2022

ILW = new assert fails; with JMC; disable compilation of affected method = MMM = P3
02-08-2022