JDK-8371959 : [REDO] Add CTW to hotspot_compiler testing
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17,21,25,26
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2025-11-16
  • Updated: 2025-11-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 27
27 masterUnresolved
Related Reports
Blocks :  
Blocks :  
Cloners :  
Description
Original fix was backed out due to massive failures, see JDK-8371958 and also JDK-8360557. We run hotspot_compiler with additional stress flags in the higher tiers and therefore hit all these bugs with CTW now. Let's REDO once the bugs are fixed.

CTW tests are for compiler testing, so it makes sense to run them as part of hotspot_compiler group. There are no external dependencies for CTW that processes JDK-s own modules, so we can add that.
Comments
There might be more but it's hard to tell because of all that noise.
17-11-2025

applications/ctw/modules/java_desktop.java -Xcomp -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:+TieredCompilation -XX:-DoEscapeAnalysis # assert(no_dead_loop) failed: dead loop detected Current CompileTask: C2:40022 9288 !b com.sun.beans.introspect.MethodInfo::get (273 bytes) Stack: [0x000000017291c000,0x0000000172b1f000], sp=0x0000000172b1ade0, free space=2043k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.dylib+0x126e2f8] VMError::report(outputStream*, bool)+0x1b68 (phaseX.cpp:784) V [libjvm.dylib+0x1271bf4] VMError::report_and_die(int, char const*, char const*, char*, Thread*, unsigned char*, void const*, void const*, char const*, int, unsigned long)+0x55c V [libjvm.dylib+0x5e4cf4] print_error_for_unit_test(char const*, char const*, char*)+0x0 V [libjvm.dylib+0xf54114] PhaseIterGVN::PhaseIterGVN(PhaseIterGVN*)+0x0 V [libjvm.dylib+0xf56b98] PhaseIterGVN::transform_old(Node*)+0xfc V [libjvm.dylib+0xf55a7c] PhaseIterGVN::optimize()+0x2c4 V [libjvm.dylib+0x53c870] Compile::inline_incrementally_cleanup(PhaseIterGVN&)+0x180 V [libjvm.dylib+0x53d1b0] Compile::inline_incrementally(PhaseIterGVN&)+0x23c V [libjvm.dylib+0x535340] Compile::Optimize()+0x2f4 V [libjvm.dylib+0x533c2c] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1578 V [libjvm.dylib+0x3f0e9c] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x204 V [libjvm.dylib+0x555588] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x98c V [libjvm.dylib+0x554888] CompileBroker::compiler_thread_loop()+0x3cc V [libjvm.dylib+0x94ed1c] JavaThread::thread_main_inner()+0x1f8 V [libjvm.dylib+0x11ade58] Thread::call_run()+0xf0 V [libjvm.dylib+0xefd090] thread_native_entry(Thread*)+0x138 C [libsystem_pthread.dylib+0x6f3c] _pthread_start+0x88 Lock stack of current Java thread (top to bottom):
17-11-2025

applications/ctw/modules/java_base.java -Xcomp -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:+TieredCompilation -XX:-UseCompressedOops # assert(false) failed: bad AD file Current CompileTask: C2:215255 38235 !b 4 java.lang.VirtualThread::unpark (130 bytes) Stack: [0x0000ffff4ad2e000,0x0000ffff4af2c000], sp=0x0000ffff4af27400, free space=2021k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x13e0924] Matcher::Label_Root(Node const*, State*, Node*, Node*&)+0x7c4 (matcher.cpp:1641) V [libjvm.so+0x13e0ac0] Matcher::match_tree(Node const*)+0x100 (matcher.cpp:1425) V [libjvm.so+0x13e7364] Matcher::xform(Node*, int)+0xc20 (matcher.cpp:1041) V [libjvm.so+0x13ea068] Matcher::match()+0x880 (matcher.cpp:338) V [libjvm.so+0x9e36e8] Compile::Code_Gen()+0x160 (compile.cpp:3032) V [libjvm.so+0x9e7eb0] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1764 (compile.cpp:893) V [libjvm.so+0x814c80] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x2dc (c2compiler.cpp:147) V [libjvm.so+0x9f6b4c] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xb08 (compileBroker.cpp:2345) V [libjvm.so+0x9f7a84] CompileBroker::compiler_thread_loop()+0x644 (compileBroker.cpp:1989) V [libjvm.so+0xefdd88] JavaThread::thread_main_inner()+0x108 (javaThread.cpp:776) V [libjvm.so+0x18750dc] Thread::call_run()+0xac (thread.cpp:242) V [libjvm.so+0x154704c] thread_native_entry(Thread*)+0x11c (os_linux.cpp:877) C [libpthread.so.0+0x7950] start_thread+0x190
17-11-2025

I also see this: applications/ctw/modules/java_desktop.java -Xcomp -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:-TieredCompilation -XX:-UseCompressedOops # assert(depth_count++ < K) failed: infinite loop in Node::uncast_helper Current CompileTask: C2:37077 5027 !b com.sun.beans.introspect.MethodInfo::get (273 bytes) Stack: [0x000071b44094e000,0x000071b440a4e000], sp=0x000071b440a48c30, free space=1003k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x177fff4] Node::uncast_helper(Node const*, bool)+0x1c4 (node.cpp:1013) V [libjvm.so+0xa26c6a] PhiNode::unique_input(PhaseValues*, bool)+0x24a (cfgnode.cpp:1532) V [libjvm.so+0xa2f774] PhiNode::Ideal(PhaseGVN*, bool)+0xa64 (cfgnode.cpp:2157) V [libjvm.so+0x1886ced] PhaseIterGVN::transform_old(Node*)+0xbd (phaseX.cpp:668) V [libjvm.so+0x188b515] PhaseIterGVN::optimize()+0xc5 (phaseX.cpp:1054) V [libjvm.so+0xba8e30] Compile::inline_incrementally_cleanup(PhaseIterGVN&)+0x360 (compile.cpp:2161) V [libjvm.so+0xba9bfe] Compile::inline_incrementally(PhaseIterGVN&)+0x42e (compile.cpp:2211) V [libjvm.so+0xbac64e] Compile::Optimize()+0x47e (compile.cpp:2338) V [libjvm.so+0xbb0033] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x2023 (compile.cpp:860) V [libjvm.so+0x9cbb33] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x4a3 (c2compiler.cpp:147) V [libjvm.so+0xbbf520] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x780 (compileBroker.cpp:2345) V [libjvm.so+0xbc0d80] CompileBroker::compiler_thread_loop()+0x530 (compileBroker.cpp:1989) V [libjvm.so+0x112197b] JavaThread::thread_main_inner()+0x13b (javaThread.cpp:774) V [libjvm.so+0x1b96236] Thread::call_run()+0xb6 (thread.cpp:242) V [libjvm.so+0x17f4cb8] thread_native_entry(Thread*)+0x118 (os_linux.cpp:877)
17-11-2025

Running these configurations and applications/ctw/modules: Conf 1: <out of the box> Conf 2: "-XX:-TieredCompilation -XX:+StressReflectiveCode -XX:-ReduceInitialCardMarks -XX:-ReduceBulkZeroing -XX:-ReduceFieldZeroing" Conf 3: "-XX:StressLongCountedLoop=2000000" Conf 4: "-ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:+TieredCompilation -Djava.awt.headless=true" So far I see no other issues except those covered with JDK-8371964 and JDK-8323727. Re-running with high repeat count now. [~thartmann] -- if you see any other configs I should stress, list them here, please?
17-11-2025

JDK-8323727 should be fixing "assert(verify(phase)) failed: missing Value() optimization" asserts. (I reverted https://git.openjdk.org/jdk/commit/e01f6da1b8e7de19f90c7cb21b3cd1ff2ab29cb7 locally, and CTW starts to pass).
17-11-2025

JDK-8371964 should be fixing "Unexpected load/store size" asserts.
17-11-2025

Thanks for backing it out promptly. I'll take a look if I can reproduce some of the reported failures before I propose this again.
17-11-2025

Yes, indeed. Thanks for working on this Aleksey!
17-11-2025

> Original fix was backed out due to massive failures Oh wow, so it serves as another proof that is very useful to run CTW tests in hotspot_compiler, as it finds compiler bugs :)
17-11-2025