JDK-8312440 : assert(cast != nullptr) failed: must have added a cast to pin the node
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17,22
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2023-07-20
  • Updated: 2023-10-06
  • Resolved: 2023-07-27
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 21 JDK 22
17.0.10-oracleFixed 21.0.2Fixed 22 b09Fixed
Related Reports
Relates :  
Description
In recent test, we found below assertion failure. Attached Test.java is a reduced case to reproduce.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/penli01/jdk_src/src/hotspot/share/opto/loopopts.cpp:1721), pid=1778535, tid=1778557
#  assert(cast != nullptr) failed: must have added a cast to pin the node
#
# JRE version: OpenJDK Runtime Environment (22.0) (fastdebug build 22-internal-adhoc.penli01.jdksrc)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 22-internal-adhoc.penli01.jdksrc, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x12fc21c]  PhaseIdealLoop::try_sink_out_of_loop(Node*)+0x9fc
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /mnt/local/core.1778535)
#
# An error report file with more information is saved as:
# /mnt/local/hs_err_pid1778535.log
#
# Compiler replay data is saved as:
# /mnt/local/replay_pid1778535.log
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#
Aborted (core dumped)

Comments
Fix request [17u] I backport this for parity with 17.0.10-oracle. Required folowup of 8308103. Clean backport on top of 8308103. Test passes. SAP nightly testing passed.
05-10-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/1828 Date: 2023-10-04 08:11:44 +0000
04-10-2023

Fix request [21u] I backport this for parity with 17.0.10-oracle. After it being backported to 17.0.10-oracle, the risk of bringing it to 21u should be acceptable as this will have much less exposure. Clean backport on top of 8308103. Test passes. SAP nighlty testing passed.
27-09-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk21u/pull/200 Date: 2023-09-25 07:40:11 +0000
25-09-2023

Changeset: 01e135c9 Author: Roland Westrelin <roland@openjdk.org> Date: 2023-07-27 07:24:46 +0000 URL: https://git.openjdk.org/jdk/commit/01e135c91018a41800c2df534b1d6dbd396adbf4
27-07-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/14999 Date: 2023-07-24 14:26:48 +0000
24-07-2023

ILW = Assertion when trying to sink a node in Split If code, edge case, use -XX:-SplitIfBlocks = HLM = P3
20-07-2023

Starts to fail after JDK-8308103. [~roland] can you have a look?
20-07-2023