JDK-6712835 : Server compiler fails with assertion (loop_count < K,"infinite loop in PhaseIterGVN::transform")
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs10
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2008-06-10
  • Updated: 2011-03-07
  • Resolved: 2011-03-07
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 6 JDK 7 Other
6u14Fixed 7Fixed hs14Fixed
Description
Server compiler (both 32 and 64 bit) fails with assertion
#  Internal Error (/export2/BUILD_AREA/jdk7/hotspot/src/share/vm/opto/phaseX.cpp:1013), pid=23426, tid=8
#  Error: assert(loop_count < K,"infinite loop in PhaseIterGVN::transform")

in fastdebug jvm

and with 
#  Internal Error (allocation.cpp:117), pid=13355, tid=12
#  Error: ChunkPool::allocate
in product vm.

The failure is observed in -Xcomp mode only.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/6ca61c728c2d
25-07-2008

SUGGESTED FIX diff --git a/src/share/vm/opto/ifnode.cpp b/src/share/vm/opto/ifnode.cpp --- a/src/share/vm/opto/ifnode.cpp +++ b/src/share/vm/opto/ifnode.cpp @@ -725,6 +725,11 @@ static Node *remove_useless_bool(IfNode int true_path = phi->is_diamond_phi(); if( true_path == 0 ) return NULL; + // Make sure that iff and the control of the phi are different. This + // should really only happen for dead control flow since it requires + // an illegal cycle. + if (phi->in(0)->in(1)->in(0) == iff) return NULL; + // phi->region->if_proj->ifnode->bool->cmp BoolNode *bol2 = phi->in(0)->in(1)->in(0)->in(1)->as_Bool(); @@ -751,6 +756,7 @@ static Node *remove_useless_bool(IfNode } Node* new_bol = (flip ? phase->transform( bol2->negate(phase) ) : bol2); + assert(new_bol != iff->in(1), "must make progress"); iff->set_req(1, new_bol); // Intervening diamond probably goes dead phase->C->set_major_progress();
11-06-2008

EVALUATION The remove_useless_bool routine is signaling progress even though it not actually making any. This is caused by a cycle in some dead code.
11-06-2008