JDK-8330565 : C2: Multiple crashes with CTW after JDK-8316991
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 23
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-04-18
  • Updated: 2024-05-23
  • Resolved: 2024-05-17
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 23
23 b24Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
I'm seeing multiple failures with:

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/roland/jdk-jdk/src/hotspot/share/opto/loopnode.cpp:6357), pid=2064861, tid=2065010
#  assert(false) failed: Bad graph detected in build_loop_late

when running some ctw testing. For instance with:
https://repo1.maven.org/maven2/org/apache/bookkeeper/bookkeeper-server-compat400/4.5.0/bookkeeper-server-compat400-4.5.0.jar


Comments
Changeset: 8acdd2d7 Author: Cesar Soares Lucas <cslucas@openjdk.org> Committer: Tobias Hartmann <thartmann@openjdk.org> Date: 2024-05-17 23:39:31 +0000 URL: https://git.openjdk.org/jdk/commit/8acdd2d7c8de17515b87815d54ce556237039406
17-05-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/19147 Date: 2024-05-08 23:44:23 +0000
08-05-2024

I updated the work item description by removing the failures covered by other work items.
06-05-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/19111 Date: 2024-05-06 21:02:07 +0000
06-05-2024

I created this work item to track the third issue: https://bugs.openjdk.org/browse/JDK-8331736 I'll create a PR to fix the other two failures.
06-05-2024

[~roland] Thank you for adding instructions to reproduce 3rd failure. I now have .java test cases to reproduce failures 1 and 2 and also fixes for them. However, for 3rd failure I think the problem really is that the graph of that method (Nidsheader::setProductInfo) is really prone to exceed the live nodes limit. _I attached some debug info to this work item with additional details_. The `setProductInfo` method is huge. There is only one reducible Phi in the graph but that Phi is merging 36 inputs (see attached files). With RAM disabled no scalar replacement happens in the method. With RAM enabled there is a need to create scalar replacement description of dozens of String objects. However, what is really adding the most nodes to the IR graph is Phase 3 of `split_unique_types`. The input to that phase is about 750 mergemem nodes, that phase on itself adds ~38k nodes to the graph because it goes recursively splitting memory phi nodes - if I recall correctly how it works. Phase 3 of `split_unique_types` doesn't execute for this method when RAM id disabled because all objects are considered NSR after call to `adjust_scalar_replaceable_state`. What do you think?
29-04-2024

I updated the instructions for the 3rd failure.
19-04-2024

Thanks for assigning to me. I'm looking into it. The second failure is same as the one reported in: JDK-8330247. I know what the problem is and I've a solution for it. I'll probably create a PR for it today. I'm going to try and reproduce the other two failures.
18-04-2024

The 3rd failure with cdm-5.0.0.jar doesn't reproduce. If I find a way to reproduce it, I'll post updated instructions.
18-04-2024

Please have a look [~cslucas], thanks!
18-04-2024

ILW = Multiple crashes in CTW after 8316991, medium?, disable compilation of affected method = P2
18-04-2024