JDK-8324171 : assert failed: Live Node limit exceeded limit
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11.0.21
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2024-01-08
  • Updated: 2024-01-19
  • Resolved: 2024-01-19
Related Reports
Duplicate :  
Relates :  
Description
ADDITIONAL SYSTEM INFORMATION :
# JRE version: OpenJDK Runtime Environment (11.0.22) (fastdebug build 11.0.22-internal+0-adhoc.xiezifan.jdk11u)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 11.0.22-internal+0-adhoc.xiezifan.jdk11u, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)


A DESCRIPTION OF THE PROBLEM :
I conducted a modified regression test case on JDK 11.0.22 (mainline) and observed that the JVM crashed without any options being set. I reviewed three existing issues on the website that seemed similar to this problem: JDK-8210392 (https://bugs.openjdk.org/browse/JDK-8210392), JDK-8216137 (https://bugs.openjdk.org/browse/JDK-8216137), and JDK-8219520 (https://bugs.openjdk.org/browse/JDK-8219520).
 Among these, JDK-8210392, though reported to affect JDK 11u and not yet fixed in that version, did not cause a crash when I ran the reproducer mentioned in the issue's comments on JDK 11u (11.0.22). Therefore, I believe the current issue is different from JDK-8210392. Neither JDK-8216137 nor JDK-8219520 provided a clear reproducer, so I had to check against the commit records on GitHub. I found that both issues were fixed in JDK 11u by the same commit (https://github.com/openjdk/jdk11u-dev/commit/04d8f98cd19262e9de3b13fe1fbb6d6c595b170e), which was merged into JDK 11u on March 10, 2022. The JDK 11u (11.0.22) I'm using should not continue to exhibit similar issues, especially since the native frames of the current bug differ significantly from those two issues. Consequently, I suspect that the current bug is either a completely new one or it presents a new path to trigger an existing issue. 

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/data/xiezifan/jdk11u/src/hotspot/share/opto/node.cpp:82), pid=3176005, tid=3176047
#  assert(Compile::current()->live_nodes() < Compile::current()->max_node_limit()) failed: Live Node limit exceeded limit
#
# JRE version: OpenJDK Runtime Environment (11.0.22) (fastdebug build 11.0.22-internal+0-adhoc.xiezifan.jdk11u)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 11.0.22-internal+0-adhoc.xiezifan.jdk11u, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# 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 /data/xiezifan/JVM-Tesing-by-Anti-Optimization/toreport/TestBigObj_01_07_06_40_29/core.3176005)
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
java gc.TestBigObj

ACTUAL -
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/node.cpp:82
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/data/xiezifan/jdk11u/src/hotspot/share/opto/node.cpp:82), pid=3301111, tid=3301191
#  assert(Compile::current()->live_nodes() < Compile::current()->max_node_limit()) failed: Live Node limit exceeded limit
#
# JRE version: OpenJDK Runtime Environment (11.0.22) (fastdebug build 11.0.22-internal+0-adhoc.xiezifan.jdk11u)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 11.0.22-internal+0-adhoc.xiezifan.jdk11u, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# 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 /data/xiezifan/JVM-Tesing-by-Anti-Optimization/toreport/TestBigObj_01_07_06_40_29/core.3301111)
#
# An error report file with more information is saved as:
# /data/xiezifan/JVM-Tesing-by-Anti-Optimization/toreport/TestBigObj_01_07_06_40_29/hs_err_pid3301111.log
Detected the specified error message. Exiting.

---------- BEGIN SOURCE ----------
The source code file and hs_err file are available at the URL:
https://drive.google.com/file/d/1GeNuiwBGsabwodi3qttDtmy3nbKQMBgi/view?usp=sharing
---------- END SOURCE ----------

FREQUENCY : often



Comments
We hit the node limit when scalarizing a very large object (65521 fields). This is a benign issue because in a release build we simply bail out. The issue was fixed by JDK-8258553 in JDK 17 by adding a limit (EliminateAllocationFieldsLimit). Increasing the node limit by setting EliminateAllocationFieldsLimit (diagnostic flag) to a higher value, will also trigger this with latest JDK 23 but that's expected. I noticed that C2 spends an excessive amount of time just compiling the main method and filed JDK-8324205 for that.
19-01-2024

Testing with jdk-11.0.22/fastdebug java version "11.0.22" 2024-01-16 LTS Java(TM) SE Runtime Environment 18.9 (fastdebug build 11.0.22+9-LTS-219) Java HotSpot(TM) 64-Bit Server VM 18.9 (fastdebug build 11.0.22+9-LTS-219, mixed mode) Note: gc/TestBigObj.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Test Nro 1 /refresh/home/oracle/jdk-11.0.22/fastdebug/bin/java -cp . gc.TestBigObj Test Nro 2 /refresh/home/oracle/jdk-11.0.22/fastdebug/bin/java -cp . gc.TestBigObj Test Nro 3 /refresh/home/oracle/jdk-11.0.22/fastdebug/bin/java -cp . gc.TestBigObj Test Nro 4 /refresh/home/oracle/jdk-11.0.22/fastdebug/bin/java -cp . gc.TestBigObj Test Nro 5 /refresh/home/oracle/jdk-11.0.22/fastdebug/bin/java -cp . gc.TestBigObj # To suppress the following error report, specify this argument # after -XX: or in .hotspotrc: SuppressErrorAt=/node.cpp:82 # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (/opt/mach5/mesos/work_dir/slaves/afbc6042-3a24-4198-9369-18c663a3f74c-S34058/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/cc44b6f8-329d-428a-82b9-b261fa4d6358/runs/b83821bd-60ac-43c7-80a7-051518f421ff/workspace/open/src/hotspot/share/opto/node.cpp:82), pid=73569, tid=73581 # assert(Compile::current()->live_nodes() < Compile::current()->max_node_limit()) failed: Live Node limit exceeded limit # # JRE version: Java(TM) SE Runtime Environment 18.9 (11.0.22+9) (fastdebug build 11.0.22+9-LTS-219) # Java VM: Java HotSpot(TM) 64-Bit Server VM 18.9 (fastdebug 11.0.22+9-LTS-219, mixed mode, tiered, compressed oops, g1 gc, linux-amd64) # Core dump will be written. Default location: Core dumps may be processed with "/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t %P %I %h %e" (or dumping to /refresh/home/Downloads/core.73569) # # An error report file with more information is saved as: # /refresh/home/Downloads/hs_err_pid73569.log Replicated in-house with Oracle JDK-11.0.22 fastdebug and the new test case after 6 attempts. ILW = crash, Consistent failures in a test., no workaround = HHH = P1 Moving to dev for further analysis.
18-01-2024