JDK-8298520 : C2: assert(found_opaque == res) failed: wrong pattern
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 20,21
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-12-10
  • Updated: 2022-12-19
  • Resolved: 2022-12-14
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 20 JDK 21
20 b28Fixed 21Fixed
Related Reports
Relates :  
Relates :  
Description
java/util/Arrays/Sorting.java crashed with:

#  Internal Error (/opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S8428/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/1445d165-80b5-4b14-92d8-7aae86fb614c/runs/014b3580-b150-4560-8dbb-4e817bd2c9ad/workspace/open/src/hotspot/share/opto/loopnode.cpp:5488), pid=3005243, tid=3005258
#  assert(found_opaque == res) failed: wrong pattern
#
# JRE version: Java(TM) SE Runtime Environment (20.0+27) (fastdebug build 20-ea+27-2213)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 20-ea+27-2213, compiled mode, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x1499d75]  CountedLoopNode::is_canonical_loop_entry()+0x1e5

This is after the fix for JDK-8269820, which is a dup for JDK-8284301, which had the same error message.

VM options in one of the crashes:

-Xcomp -XX:+CreateCoredumpOnCrash -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:-TieredCompilation -XX:+DeoptimizeALot
Comments
This bug is fixed in jdk-20+28-2233.
14-12-2022

Changeset: 27d49711 Author: Roland Westrelin <roland@openjdk.org> Date: 2022-12-14 10:03:36 +0000 URL: https://git.openjdk.org/jdk20/commit/27d4971182ab1cbe7e6bc40cd22c1c70661a3ab2
14-12-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk20/pull/24 Date: 2022-12-13 14:49:31 +0000
13-12-2022

I verified that this is a regression from JDK-8269820 in JDK 20 (jdk-20+27-2173).
12-12-2022

ILW = Assert during C2 compilation, with single test and stress flags, no workaround but disable compilation of affected method = HMM = P3
12-12-2022

This does not reproduce anymore after JDK-8292289 in jdk-21+1-5 but it does reproduce with latest JDK 20 (jdk-20+28-2221). open/test/jdk/java/util/Arrays/Sorting.java -Xcomp -XX:+CreateCoredumpOnCrash -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:-TieredCompilation -XX:+DeoptimizeALot I attached another hs_err/replay from latest JDK 20 (replay_pid24526.log).
12-12-2022

I attached replay and hs_err files. Roland, could you please have a look?
12-12-2022