JDK-8331736 : C2: Live Node limit exceeded limit after JDK-8316991
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 23
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-05-06
  • Updated: 2024-06-07
  • Resolved: 2024-06-06
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 b26Fixed
Related Reports
Relates :  
Relates :  
Description
[~roland] originally reported this issue in JDK-8330565. I'm splittingĀ it from the original JBS entry so that I can handle the other remaining issues separately.

$ java -cp repro.jar -XX:+ReplayCompiles -XX:ReplayDataFile=replay_pid2063272.log -XX:+ReplayIgnoreInitErrors
# Internal Error (/home/roland/jdk-jdk/src/hotspot/share/opto/node.cpp:78), pid=2063272, tid=2063286
# assert(C->live_nodes() <= C->max_node_limit()) failed: Live Node limit exceeded limit
Comments
Changeset: b351b5f6 Author: Cesar Soares Lucas <cslucas@openjdk.org> Committer: Tobias Hartmann <thartmann@openjdk.org> Date: 2024-06-06 05:21:09 +0000 URL: https://git.openjdk.org/jdk/commit/b351b5f60ed836e6e21aa4ce5681e573a6057eb6
06-06-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/19545 Date: 2024-06-04 16:32:15 +0000
04-06-2024

Thanks Cesar!
29-05-2024

Hi [~chagedorn], thanks for the ping. I'll prioritize this to be completed this week.
28-05-2024

Hi [~cslucas], just to let you know, RDP 1 starts on June 6th and we should get this fixed since it's a regression. Do you have any update on this bug? It's a P3, so we still got some time left to fix it after the fork. Let us know if you need some help.
28-05-2024

ILW = Assert during C2 compilation due to running out of nodes, reproducible with CTW (never seen during normal execution), no other known workaround than to disable C2 compilation of affected method = HLM = P3
07-05-2024

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`.
06-05-2024