RFR: 8375055: C2: Better dead loop detection printout
Aleksey Shipilev
shade at openjdk.org
Tue Jan 13 08:44:33 UTC 2026
Chasing the maddeningly intermittent CTW failure. When C2 fails dead loop verification checks, it prints:
# Internal Error (/home/shipilev/shipilev-jdk/src/hotspot/share/opto/phaseX.cpp:784), pid=64465, tid=917
# assert(no_dead_loop) failed: dead loop detected
It also dumps the bad node graph to tty. This is not really convenient in automated testing and/or driver tests like CTW. With this fix, we now print:
# Internal Error (/home/shade/trunks/jdk/src/hotspot/share/opto/phaseX.cpp:781), pid=645409, tid=645480
# fatal error: Dead loop detected, node references itself
#
# Node: 1606 CastPP === 1 1606 [[ 3163 1460 1006 1006 1606 1111 ]] #instptr:java/lang/Object:NotNull+0,iid=bot floating narrowing dependency Oop:instptr:java/lang/Object:NotNull+0,iid=bot !orig=[1613],[1629],[1015],1442 !jvms: MethodInfo::get @ bci:236 (line 119)
...which allows to have more clues where things may go wrong, and allows to classify the failures better as well.
Additional testing:
- [x] Ad-hoc crashes with selected seeds
- [x] Linux x86_64 server fastdebug, `hotspot_compiler`
- [x] Linux x86_64 server fastdebug, `applications/ctw/modules`
-------------
Commit messages:
- Fix
Changes: https://git.openjdk.org/jdk/pull/29185/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29185&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8375055
Stats: 35 lines in 1 file changed: 17 ins; 2 del; 16 mod
Patch: https://git.openjdk.org/jdk/pull/29185.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/29185/head:pull/29185
PR: https://git.openjdk.org/jdk/pull/29185
More information about the hotspot-compiler-dev
mailing list