JDK-8333697 : C2: Hit MemLimit in PhaseCFG::global_code_motion
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 23,24,25
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2024-06-06
  • Updated: 2025-02-11
  • Resolved: 2025-02-05
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 25
25 b09Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
I've observed that we hit the MemLimit with vmTestbase/vm/mlvm/meth/stress/compiler/i2c_c2i/Test.java in a seemingly unrelated patch over and over again but never with mainline. I've now observed it again with a completely different patch. I'm therefore filing this bug to further investigate since I don't think that my patches have anything to do with it.

Additional VM flags required:

-Xcomp -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:-TieredCompilation -XX:+DeoptimizeALot

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/opt/mach5/mesos/work_dir/slaves/a4a7850a-7c35-410a-b879-d77fbb2f6087-S15438/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/cac83830-bb2d-420d-b575-debda39cf5a6/runs/092497a8-b7ab-448c-acd2-5d0fd1e146cc/workspace/open/src/hotspot/share/compiler/compilationMemoryStatistic.cpp:559), pid=4003, tid=4104
#  fatal error: c2 java/lang/invoke/LambdaForm$MH+0x00007f3af3efb000::invoke((Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;): Hit MemLimit (limit: 1073741824 now: 1073752152)


Stack: [0x00007f3b338fa000,0x00007f3b339fa000],  sp=0x00007f3b339f4d30,  free space=1003k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x18a3fa2]  VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x482  (compilationMemoryStatistic.cpp:559)
V  [libjvm.so+0xa96855]  report_fatal(VMErrorType, char const*, int, char const*, ...)+0x105  (debug.cpp:214)
V  [libjvm.so+0x9c5eed]  CompilationMemoryStatistic::on_arena_change(long, Arena const*)+0x3fd  (compilationMemoryStatistic.cpp:559)
V  [libjvm.so+0x5f2efc]  Arena::grow(unsigned long, AllocFailStrategy::AllocFailEnum)+0x10c  (arena.cpp:299)
V  [libjvm.so+0xe09bdf]  IndexSet::initialize(unsigned int)+0x20f  (arena.hpp:119)
V  [libjvm.so+0xdf1016]  PhaseIFG::init(unsigned int)+0xf6  (ifg.cpp:56)
V  [libjvm.so+0xd697aa]  PhaseCFG::global_code_motion()+0x78a  (gcm.cpp:1577)
V  [libjvm.so+0xd6c171]  PhaseCFG::do_global_code_motion()+0x51  (gcm.cpp:1644)
V  [libjvm.so+0x9ec994]  Compile::Code_Gen()+0x2a4  (compile.cpp:2966)
V  [libjvm.so+0x9ef6ac]  Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1bdc  (compile.cpp:886)
V  [libjvm.so+0x844875]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1d5  (c2compiler.cpp:142)
V  [libjvm.so+0x9fb3e8]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x928  (compileBroker.cpp:2303)
V  [libjvm.so+0x9fc078]  CompileBroker::compiler_thread_loop()+0x478  (compileBroker.cpp:1961)
V  [libjvm.so+0xea461c]  JavaThread::thread_main_inner()+0xcc  (javaThread.cpp:759)
V  [libjvm.so+0x17c0dd6]  Thread::call_run()+0xb6  (thread.cpp:225)
V  [libjvm.so+0x14a7ed7]  thread_native_entry(Thread*)+0x127  (os_linux.cpp:846)
Comments
[~dholmes] How can I reproduce the failure?
11-02-2025

Sorry [~roland] but we are still seeing the test fail after this fix: # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (/System/Volumes/Data/mesos/work_dir/slaves/9d672765-c677-49d5-b011-1d8d922c9421-S1581/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/a7570317-49d1-4abf-9fb0-08bb7f4a6284/runs/dacab4f1-d071-445f-bf1e-fc4307dea320/workspace/open/src/hotspot/share/compiler/compilationMemoryStatistic.cpp:567), pid=46837, tid=28675 # fatal error: c2 java/lang/invoke/LambdaForm$MH+0x00000fc001593000::invoke((Ljava/lang/Object;)Ljava/lang/Object;): Hit MemLimit (limit: 1073741824 now: 1073769944) # # JRE version: Java(TM) SE Runtime Environment (25.0+10) (fastdebug build 25-ea+10-LTS-1011) # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 25-ea+10-LTS-1011, mixed mode, sharing, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64) # Core dump will be written. Default location: core.46837 # # If you would like to submit a bug report, please visit: # https://bugreport.java.com/bugreport/crash.jsp # --------------- S U M M A R Y ------------ Command Line: -Dtest.vm.opts=-XX:MaxRAMPercentage=6.25 -Dtest.boot.jdk=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk/23/37/bundles/macos-aarch64/jdk-23_macos-aarch64_bin.tar.gz/jdk-23.jdk/Contents/Home -Djava.io.tmpdir=/System/Volumes/Data/mesos/work_dir/slaves/b9ab8c44-e044-401b-814f-5af393738dc1-S1342/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/5af4c72c-4af3-48c6-a729-6a6245207718/runs/7f3d59d7-74d0-496d-babf-26bc542208e4/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_vm_mlvm/tmp -Dtest.tool.vm.opts=-J-XX:MaxRAMPercentage=6.25 -J-Dtest.boot.jdk=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk/23/37/bundles/macos-aarch64/jdk-23_macos-aarch64_bin.tar.gz/jdk-23.jdk/Contents/Home -J-Djava.io.tmpdir=/System/Volumes/Data/mesos/work_dir/slaves/b9ab8c44-e044-401b-814f-5af393738dc1-S1342/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/5af4c72c-4af3-48c6-a729-6a6245207718/runs/7f3d59d7-74d0-496d-babf-26bc542208e4/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_vm_mlvm/tmp -Dtest.compiler.opts= -Dtest.java.opts=-XX:-TieredCompilation -XX:+AlwaysIncrementalInline -Dtest.jdk=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-25+10-1011/macosx-aarch64-debug.jdk/jdk-25/fastdebug -Dcompile.jdk=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-25+10-1011/macosx-aarch64-debug.jdk/jdk-25/fastdebug -Dtest.timeout.factor=4.0 -Dtest.nativepath=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-25+10-1011/macosx-aarch64-debug.test/hotspot/jtreg/native -Dtest.root=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-25+10-1011/src.full/open/test/hotspot/jtreg -Dtest.name=vmTestbase/vm/mlvm/meth/stress/compiler/i2c_c2i/Test.java -Dtest.file=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-25+10-1011/src.full/open/test/hotspot/jtreg/vmTestbase/vm/mlvm/meth/stress/compiler/i2c_c2i/Test.java -Dtest.src=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-25+10-1011/src.full/open/test/hotspot/jtreg/vmTestbase/vm/mlvm/meth/stress/compiler/i2c_c2i -Dtest.src.path=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-25+10-1011/src.full/open/test/hotspot/jtreg/vmTestbase/vm/mlvm/meth/stress/compiler/i2c_c2i:/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-25+10-1011/src.full/open/test/hotspot/jtreg/vmTestbase:/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-25+10-1011/src.full/open/test/lib -Dtest.classes=/System/Volumes/Data/mesos/work_dir/slaves/b9ab8c44-e044-401b-814f-5af393738dc1-S1342/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/5af4c72c-4af3-48c6-a729-6a6245207718/runs/7f3d59d7-74d0-496d-babf-26bc542208e4/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_vm_mlvm/classes/2/vmTestbase/vm/mlvm/meth/stress/compiler/i2c_c2i/Test.d -Dtest.class.path=/System/Volumes/Data/mesos/work_dir/slaves/b9ab8c44-e044-401b-814f-5af393738dc1-S1342/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/5af4c72c-4af3-48c6-a729-6a6245207718/runs/7f3d59d7-74d0-496d-babf-26bc542208e4/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_vm_mlvm/classes/2/vmTestbase/vm/mlvm/meth/stress/compiler/i2c_c2i/Test.d:/System/Volumes/Data/mesos/work_dir/slaves/b9ab8c44-e044-401b-814f-5af393738dc1-S1342/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/5af4c72c-4af3-48c6-a729-6a6245207718/runs/7f3d59d7-74d0-496d-babf-26bc542208e4/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_vm_mlvm/classes/2/vmTestbase:/System/Volumes/Data/mesos/work_dir/slaves/b9ab8c44-e044-401b-814f-5af393738dc1-S1342/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/5af4c72c-4af3-48c6-a729-6a6245207718/runs/7f3d59d7-74d0-496d-babf-26bc542208e4/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_vm_mlvm/classes/2/test/lib -Dtest.class.path.prefix=/System/Volumes/Data/mesos/work_dir/slaves/b9ab8c44-e044-401b-814f-5af393738dc1-S1342/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/5af4c72c-4af3-48c6-a729-6a6245207718/runs/7f3d59d7-74d0-496d-babf-26bc542208e4/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_vm_mlvm/classes/2/vmTestbase/vm/mlvm/meth/stress/compiler/i2c_c2i/Test.d:/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-25+10-1011/src.full/open/test/hotspot/jtreg/vmTestbase/vm/mlvm/meth/stress/compiler/i2c_c2i:/System/Volumes/Data/mesos/work_dir/slaves/b9ab8c44-e044-401b-814f-5af393738dc1-S1342/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/5af4c72c-4af3-48c6-a729-6a6245207718/runs/7f3d59d7-74d0-496d-babf-26bc542208e4/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_vm_mlvm/classes/2/vmTestbase:/System/Volumes/Data/mesos/work_dir/slaves/b9ab8c44-e044-401b-814f-5af393738dc1-S1342/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/5af4c72c-4af3-48c6-a729-6a6245207718/runs/7f3d59d7-74d0-496d-babf-26bc542208e4/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_vm_mlvm/classes/2/test/lib -XX:MaxRAMPercentage=6.25 -Dtest.boot.jdk=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk/23/37/bundles/macos-aarch64/jdk-23_macos-aarch64_bin.tar.gz/jdk-23.jdk/Contents/Home -Djava.io.tmpdir=/System/Volumes/Data/mesos/work_dir/slaves/b9ab8c44-e044-401b-814f-5af393738dc1-S1342/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/5af4c72c-4af3-48c6-a729-6a6245207718/runs/7f3d59d7-74d0-496d-babf-26bc542208e4/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_vm_mlvm/tmp -XX:-TieredCompilation -XX:+AlwaysIncrementalInline -Djava.library.path=/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-25+10-1011/macosx-aarch64-debug.test/hotspot/jtreg/native com.sun.javatest.regtest.agent.MainWrapper /System/Volumes/Data/mesos/work_dir/slaves/b9ab8c44-e044-401b-814f-5af393738dc1-S1342/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/5af4c72c-4af3-48c6-a729-6a6245207718/runs/7f3d59d7-74d0-496d-babf-26bc542208e4/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_vm_mlvm/vmTestbase/vm/mlvm/meth/stress/compiler/i2c_c2i/Test.d/main.0.jta Host: "Mac14,3" arm64, 8 cores, 16G, Darwin 22.3.0, macOS 13.2.1 (22D68) Time: Tue Feb 11 00:20:56 2025 GMT elapsed time: 9.558034 seconds (0d 0h 0m 9s) --------------- T H R E A D --------------- Current thread (0x000000011c017010): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=28675, stack(0x000000016ebf0000,0x000000016edf3000) (2060K)] Current CompileTask: C2:9558 2980 java.lang.invoke.LambdaForm$MH/0x00000fc001593000::invoke (122 bytes) Stack: [0x000000016ebf0000,0x000000016edf3000], sp=0x000000016edee1f0, free space=2040k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.dylib+0x1160f14] VMError::report(outputStream*, bool)+0x1aac (compilationMemoryStatistic.cpp:567) V [libjvm.dylib+0x1164500] VMError::report_and_die(int, char const*, char const*, char*, Thread*, unsigned char*, void const*, void const*, char const*, int, unsigned long)+0x548 V [libjvm.dylib+0x578010] DebuggingContext::~DebuggingContext()+0x0 V [libjvm.dylib+0x4c64b8] CompilationMemoryStatistic::on_arena_change(long, Arena const*)+0x3bc V [libjvm.dylib+0x2516e0] Arena::grow(unsigned long, AllocFailStrategy::AllocFailEnum)+0xc4 V [libjvm.dylib+0xdf3480] Node::out_grow(unsigned int)+0x1c8 V [libjvm.dylib+0x212b10] Node::set_req(unsigned int, Node*)+0x128 V [libjvm.dylib+0x7cf360] GraphKit::clone_map()+0xf8 V [libjvm.dylib+0x7d1a6c] GraphKit::set_map_clone(SafePointNode*)+0x18 V [libjvm.dylib+0xe7a708] Parse::throw_to_exit(SafePointNode*)+0x34 V [libjvm.dylib+0xe7a670] Parse::do_exceptions()+0x134 V [libjvm.dylib+0xe7960c] Parse::do_one_block()+0x508 V [libjvm.dylib+0xe77638] Parse::do_all_blocks()+0x480 V [libjvm.dylib+0xe73e1c] Parse::Parse(JVMState*, ciMethod*, float)+0xa34 V [libjvm.dylib+0x39a520] ParseGenerator::generate(JVMState*)+0x104 V [libjvm.dylib+0x39d4e0] CallGenerator::do_late_inline_helper()+0x648 V [libjvm.dylib+0x4d870c] Compile::inline_incrementally_one()+0xec V [libjvm.dylib+0x4d8c50] Compile::inline_incrementally(PhaseIterGVN&)+0x27c V [libjvm.dylib+0x4d19a4] Compile::Optimize()+0x230 V [libjvm.dylib+0x4d03fc] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x138c V [libjvm.dylib+0x398a80] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1e0 V [libjvm.dylib+0x4ef140] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x868 V [libjvm.dylib+0x4ee570] CompileBroker::compiler_thread_loop()+0x348 V [libjvm.dylib+0x8c27dc] JavaThread::thread_main_inner()+0x1a8 V [libjvm.dylib+0x10ae4b4] Thread::call_run()+0xf4 V [libjvm.dylib+0xe47d14] thread_native_entry(Thread*)+0x138 C [libsystem_pthread.dylib+0x706c] _pthread_start+0x94 Lock stack of current Java thread (top to bottom):
11-02-2025

[~roland] Here's the bug JDK-8349772, I think it's unrelated.
11-02-2025

Changeset: 6b994cd8 Branch: master Author: Roland Westrelin <roland@openjdk.org> Date: 2025-02-05 13:54:35 +0000 URL: https://git.openjdk.org/jdk/commit/6b994cd8ccba4f5d0199cb2925f0a6b5450ac115
05-02-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/23075 Date: 2025-01-13 14:49:10 +0000
13-01-2025

Updated ILW = Excessive memory usage which might be expected, many tests, no workaround except setting higher memory limit = MMH = P3
09-12-2024

[~dholmes] Let's do that. I guess 95 cases justify to give this an M for likelihood which makes it a P3.
09-12-2024

We now have 95 cases of this failure linked in our CI. Can we bump the priority please.
08-12-2024

# # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (c:\sb\prod\1733094483\workspace\open\src\hotspot\share\compiler\compilationMemoryStatistic.cpp:568), pid=27432, tid=12156 # fatal error: c2 java/lang/invoke/LambdaForm$MH+0x000001fd5a686800::invoke((Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;): Hit MemLimit (limit: 1073741824 now: 1073756560) # # JRE version: Java(TM) SE Runtime Environment (24.0+27) (fastdebug build 24-ea+27-3398) # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 24-ea+27-3398, compiled mode, sharing, compressed oops, compressed class ptrs, g1 gc, windows-amd64) # Core dump will be written. Default location: C:\sb\prod\1733169997\testoutput\test-support\jtreg_open_test_hotspot_jtreg_vmTestbase_vm_mlvm\scratch\3\hs_err_pid27432.mdmp # # If you would like to submit a bug report, please visit: # https://bugreport.java.com/bugreport/crash.jsp # --------------- S U M M A R Y ------------ Command Line: -Dtest.vm.opts=-XX:MaxRAMPercentage=4.16667 -Dtest.boot.jdk=c:\ade\mesos\work_dir\jib-master\install\jdk\23\37\bundles\windows-x64\jdk-23_windows-x64_bin.zip\jdk-23 -Djava.io.tmpdir=c:\sb\prod\1733169997\testoutput\test-support\jtreg_open_test_hotspot_jtreg_vmTestbase_vm_mlvm\tmp -XX:+CreateCoredumpOnCrash -Dtest.tool.vm.opts=-J-XX:MaxRAMPercentage=4.16667 -J-Dtest.boot.jdk=c:\ade\mesos\work_dir\jib-master\install\jdk\23\37\bundles\windows-x64\jdk-23_windows-x64_bin.zip\jdk-23 -J-Djava.io.tmpdir=c:\sb\prod\1733169997\testoutput\test-support\jtreg_open_test_hotspot_jtreg_vmTestbase_vm_mlvm\tmp -J-XX:+CreateCoredumpOnCrash -Dtest.compiler.opts= -Dtest.java.opts=-Xcomp -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:-TieredCompilation -XX:+DeoptimizeALot -Dtest.jdk=c:\ade\mesos\work_dir\jib-master\install\jdk-24+27-3398\windows-x64-debug.jdk\jdk-24\fastdebug -Dcompile.jdk=c:\ade\mesos\work_dir\jib-master\install\jdk-24+27-3398\windows-x64-debug.jdk\jdk-24\fastdebug -Dtest.timeout.factor=10.0 -Dtest.nativepath=c:\ade\mesos\work_dir\jib-master\install\jdk-24+27-3398\windows-x64-debug.test\hotspot\jtreg\native -Dtest.root=C:\ade\mesos\work_dir\jib-master\install\jdk-24+27-3398\src.full\open\test\hotspot\jtreg -Dtest.name=vmTestbase/vm/mlvm/meth/stress/compiler/i2c_c2i/Test.java -Dtest.file=C:\ade\mesos\work_dir\jib-master\install\jdk-24+27-3398\src.full\open\test\hotspot\jtreg\vmTestbase\vm\mlvm\meth\stress\compiler\i2c_c2i\Test.java -Dtest.src=C:\ade\mesos\work_dir\jib-master\install\jdk-24+27-3398\src.full\open\test\hotspot\jtreg\vmTestbase\vm\mlvm\meth\stress\compiler\i2c_c2i -Dtest.src.path=C:\ade\mesos\work_dir\jib-master\install\jdk-24+27-3398\src.full\open\test\hotspot\jtreg\vmTestbase\vm\mlvm\meth\stress\compiler\i2c_c2i;C:\ade\mesos\work_dir\jib-master\install\jdk-24+27-3398\src.full\open\test\hotspot\jtreg\vmTestbase;C:\ade\mesos\work_dir\jib-master\install\jdk-24+27-3398\src.full\open\test\lib -Dtest.classes=C:\sb\prod\1733169997\testoutput\test-support\jtreg_open_test_hotspot_jtreg_vmTestbase_vm_mlvm\classes\2\vmTestbase\vm\mlvm\meth\stress\compiler\i2c_c2i\Test.d -Dtest.class.path=C:\sb\prod\1733169997\testoutput\test-support\jtreg_open_test_hotspot_jtreg_vmTestbase_vm_mlvm\classes\2\vmTestbase\vm\mlvm\meth\stress\compiler\i2c_c2i\Test.d;C:\sb\prod\1733169997\testoutput\test-support\jtreg_open_test_hotspot_jtreg_vmTestbase_vm_mlvm\classes\2\vmTestbase;C:\sb\prod\1733169997\testoutput\test-support\jtreg_open_test_hotspot_jtreg_vmTestbase_vm_mlvm\classes\2\test\lib -Dtest.class.path.prefix=C:\sb\prod\1733169997\testoutput\test-support\jtreg_open_test_hotspot_jtreg_vmTestbase_vm_mlvm\classes\2\vmTestbase\vm\mlvm\meth\stress\compiler\i2c_c2i\Test.d;C:\ade\mesos\work_dir\jib-master\install\jdk-24+27-3398\src.full\open\test\hotspot\jtreg\vmTestbase\vm\mlvm\meth\stress\compiler\i2c_c2i;C:\sb\prod\1733169997\testoutput\test-support\jtreg_open_test_hotspot_jtreg_vmTestbase_vm_mlvm\classes\2\vmTestbase;C:\sb\prod\1733169997\testoutput\test-support\jtreg_open_test_hotspot_jtreg_vmTestbase_vm_mlvm\classes\2\test\lib -XX:MaxRAMPercentage=4.16667 -Dtest.boot.jdk=c:\ade\mesos\work_dir\jib-master\install\jdk\23\37\bundles\windows-x64\jdk-23_windows-x64_bin.zip\jdk-23 -Djava.io.tmpdir=c:\sb\prod\1733169997\testoutput\test-support\jtreg_open_test_hotspot_jtreg_vmTestbase_vm_mlvm\tmp -XX:+CreateCoredumpOnCrash -Xcomp -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -XX:-TieredCompilation -XX:+DeoptimizeALot -Djava.library.path=c:\ade\mesos\work_dir\jib-master\install\jdk-24+27-3398\windows-x64-debug.test\hotspot\jtreg\native com.sun.javatest.regtest.agent.MainWrapper C:\sb\prod\1733169997\testoutput\test-support\jtreg_open_test_hotspot_jtreg_vmTestbase_vm_mlvm\vmTestbase\vm\mlvm\meth\stress\compiler\i2c_c2i\Test.d\main.0.jta Host: AMD EPYC 7J13 64-Core Processor , 12 cores, 23G, Windows Server 2022 , 64 bit Build 20348 (10.0.20348.2760) Time: Mon Dec 2 20:33:25 2024 Etc elapsed time: 198.746763 seconds (0d 0h 3m 18s) --------------- T H R E A D --------------- Current thread (0x000001fd16a646b0): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=12156, stack(0x000000b0f3b00000,0x000000b0f3c00000) (1024K)] Current CompileTask: C2:198747 21914 b java.lang.invoke.LambdaForm$MH/0x000001fd5a686800::invoke (291 bytes) Stack: [0x000000b0f3b00000,0x000000b0f3c00000] Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [jvm.dll+0xd6c891] os::win32::platform_print_native_stack+0x101 (os_windows_x86.cpp:185) V [jvm.dll+0x104880d] VMError::report+0x148d (vmError.cpp:1011) V [jvm.dll+0x104aead] VMError::report_and_die+0x80d (vmError.cpp:1846) V [jvm.dll+0x5d9a71] report_fatal+0xb1 (debug.cpp:223) V [jvm.dll+0x54dc8c] CompilationMemoryStatistic::on_arena_change+0x37c (compilationMemoryStatistic.cpp:568) V [jvm.dll+0x26e441] Arena::set_size_in_bytes+0x111 (arena.cpp:266) V [jvm.dll+0x26e26e] Arena::grow+0x18e (arena.cpp:309) V [jvm.dll+0x845288] IndexSet::initialize+0xb8 (indexSet.cpp:268) V [jvm.dll+0x839a44] PhaseIFG::init+0xc4 (ifg.cpp:57) V [jvm.dll+0x7cbab4] PhaseCFG::global_code_motion+0x5b4 (gcm.cpp:1689) V [jvm.dll+0x7ca2fd] PhaseCFG::do_global_code_motion+0x6d (gcm.cpp:1757) V [jvm.dll+0x5556ad] Compile::Code_Gen+0x19d (compile.cpp:2965) V [jvm.dll+0x5540eb] Compile::Compile+0x12db (compile.cpp:886) V [jvm.dll+0x45b979] C2Compiler::compile_method+0x179 (c2compiler.cpp:145) V [jvm.dll+0x572103] CompileBroker::invoke_compiler_on_method+0x7b3 (compileBroker.cpp:2319) V [jvm.dll+0x56f6fb] CompileBroker::compiler_thread_loop+0x33b (compileBroker.cpp:1978) V [jvm.dll+0x8bfb46] JavaThread::thread_main_inner+0x266 (javaThread.cpp:773) V [jvm.dll+0xfa60e4] Thread::call_run+0x1b4 (thread.cpp:237) V [jvm.dll+0xd6ad51] thread_native_entry+0xe1 (os_windows.cpp:545) C [ucrtbase.dll+0x26b4c] (no source info available) C [KERNEL32.DLL+0x14cb0] (no source info available) C [ntdll.dll+0x7ecdb] (no source info available)
02-12-2024

We continue to see this regularly in our CI tier 7 runs and are now up to 94 linked failures.
02-12-2024

I'm deferring this to JDK 25 for now. Feel free to still fix in JDK 24 if the fix is ready in time.
19-11-2024

After fixing this issue, please remove the -XX:CompileCommand=MemLimit,*.*,0 from TestFindInstMemRecursion.java (added in https://github.com/openjdk/jdk/pull/20238, for JDK-8324345) and verify that the test still passes.
05-08-2024

I've attached a simple test (Test.java) that results in a similar failure: Current CompileTask: C2:47493 10866 b javax.swing.plaf.basic.BasicLookAndFeel::initComponentDefaults (14883 bytes) Stack: [0x00007f22e91f3000,0x00007f22e92f3000], sp=0x00007f22e92edb00, free space=1002k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x1899f36] VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x486 (compilationMemoryStatistic.cpp:559) V [libjvm.so+0xa8a475] report_fatal(VMErrorType, char const*, int, char const*, ...)+0x105 (debug.cpp:214) V [libjvm.so+0x9b816e] CompilationMemoryStatistic::on_arena_change(long, Arena const*)+0x3fe (compilationMemoryStatistic.cpp:559) V [libjvm.so+0x5df6dc] Arena::grow(unsigned long, AllocFailStrategy::AllocFailEnum)+0x10c (arena.cpp:295) V [libjvm.so+0xdfcada] IndexSet::initialize(unsigned int, Arena*)+0x13a (arena.hpp:122) V [libjvm.so+0x122cf76] PhaseLive::getfreeset()+0x56 (live.cpp:214) V [libjvm.so+0x122dcfb] PhaseLive::compute(unsigned int)+0x2fb (live.cpp:102) V [libjvm.so+0xd5c831] PhaseCFG::global_code_motion()+0x7c1 (gcm.cpp:1581) V [libjvm.so+0xd5f1c1] PhaseCFG::do_global_code_motion()+0x51 (gcm.cpp:1644) V [libjvm.so+0x9debd4] Compile::Code_Gen()+0x2a4 (compile.cpp:2948) V [libjvm.so+0x9e1a2c] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1bec (compile.cpp:885) V [libjvm.so+0x833b95] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1d5 (c2compiler.cpp:142) V [libjvm.so+0x9ed588] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x928 (compileBroker.cpp:2303) V [libjvm.so+0x9ee218] CompileBroker::compiler_thread_loop()+0x478 (compileBroker.cpp:1961) V [libjvm.so+0xe97b1c] JavaThread::thread_main_inner()+0xcc (javaThread.cpp:757) V [libjvm.so+0x17b6646] Thread::call_run()+0xb6 (thread.cpp:225) V [libjvm.so+0x149fd57] thread_native_entry(Thread*)+0x127 (os_linux.cpp:858) Lock stack of current Java thread (top to bottom):
16-07-2024

Roland, I'm assigning this to you for now since you mentioned that you'll take a look. Feel free to un-assign again.
26-06-2024

Another failure: Current CompileTask: C2:103813 9152 javax.swing.plaf.basic.BasicLookAndFeel::initComponentDefaults (14883 bytes) Stack: [0x00007fae5440b000,0x00007fae5450b000], sp=0x00007fae54505ac0, free space=1002k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x1895156] VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x486 (compilationMemoryStatistic.cpp:559) V [libjvm.so+0xa892c5] report_fatal(VMErrorType, char const*, int, char const*, ...)+0x105 V [libjvm.so+0x9b727e] CompilationMemoryStatistic::on_arena_change(long, Arena const*)+0x3fe V [libjvm.so+0x5de85c] Arena::grow(unsigned long, AllocFailStrategy::AllocFailEnum)+0x10c V [libjvm.so+0xdfb617] IndexSet::populate_free_list()+0xf7 V [libjvm.so+0xdfba15] IndexSet::alloc_block_containing(unsigned int)+0x115 V [libjvm.so+0x122c46d] PhaseLive::add_liveout(Block_List&, Block*, IndexSet*, VectorSet&)+0x2fd V [libjvm.so+0x122d2fd] PhaseLive::compute(unsigned int)+0x9fd V [libjvm.so+0xd5bffc] PhaseCFG::global_code_motion()+0x7bc V [libjvm.so+0xd5e991] PhaseCFG::do_global_code_motion()+0x51 V [libjvm.so+0x9ddd54] Compile::Code_Gen()+0x2a4 V [libjvm.so+0x9e0bd3] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1c23 V [libjvm.so+0x832825] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1d5 V [libjvm.so+0x9ec798] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x928 V [libjvm.so+0x9ed428] CompileBroker::compiler_thread_loop()+0x478 V [libjvm.so+0xe96e0c] JavaThread::thread_main_inner()+0xcc V [libjvm.so+0x17b1b76] Thread::call_run()+0xb6 V [libjvm.so+0x149b867] thread_native_entry(Thread*)+0x127 Lock stack of current Java thread (top to bottom):
26-06-2024