JDK-8275326 : C2: assert(no_dead_loop) failed: dead loop detected
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,17,18
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-10-15
  • Updated: 2022-01-20
  • Resolved: 2021-12-01
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 11 JDK 17 JDK 18
11.0.15-oracleFixed 17.0.3-oracleFixed 18 b26Fixed
Related Reports
Relates :  
Relates :  
Description
(synopsis is provisional, feel free to change it or close as duplicate of known bug)

Attached Fuzzer test fails like this:

$ ./build/linux-x86_64-server-fastdebug/images/jdk/bin/java -XX:+StressIGVN -XX:StressSeed=77325781 -Xcomp -XX:CompileOnly=Test Test
...
#  Internal Error (/home/shade/trunks/jdk/src/hotspot/share/opto/phaseX.cpp:945), pid=2711484, tid=2711497
#  assert(no_dead_loop) failed: dead loop detected

Bisection shows it started with JDK-8273612, but that might only be because the profiling info had changed a bit.
Comments
A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk11u-dev/pull/772 Date: 2022-01-18 12:40:14 +0000
18-01-2022

Fix request [11u] I backport this for parity with 11.0.15-oracle. Clean backport. SAP nightly tests passed.
18-01-2022

Fix request [17u] I backport this for parity with 11.0.15-oracle. As it is in 11, I think it should also go to 17. Typical risk of changing C2. Clean backport. SAP nightly tests passed. Pre-submit tests passed in PR 43.
29-12-2021

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk17u-dev/pull/43 Date: 2021-12-29 17:11:27 +0000
29-12-2021

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk17u-dev/pull/31 Date: 2021-12-22 16:18:38 +0000
22-12-2021

Changeset: 70d5dffb Author: Christian Hagedorn <chagedorn@openjdk.org> Date: 2021-12-01 08:24:59 +0000 URL: https://git.openjdk.java.net/jdk/commit/70d5dffb4e7110902b59b56efaef31614916148c
01-12-2021

Could only reproduce this with the attached replay file with latest JDK even after repeated runs with StressIGVN + RepeatCompilation. Added label noreg-hard accordingly.
08-11-2021

ILW = C2 assertion during IGVN due to dead data loop, only fails with single Java Fuzzer test, disable compilation of affected method = HLM = P3
29-10-2021

This dead loop assertion failure involves a MergeMemNode replacing a phi node which results in a dead data loop. This failure is unrelated to JDK-8271056 which creates a dead data loop with cmoving identity. I therefore reopen and retriage this bug for 18.
29-10-2021

Might be related to JDK-8271056. I found some dead loop fails with the Java Fuzzer which I'm currently looking into. I propose to close this as a dup of it and reopen this one if the fix for JDK-8271056 is unrelated.
15-10-2021