JDK-7107042 : assert(no_dead_loop) failed: dead loop detected
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs23,8-pool
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-11-01
  • Updated: 2015-12-02
  • Resolved: 2012-01-23
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 7 JDK 8 Other
7u4Fixed 8Fixed hs23Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
CTW hit this assert after next changes from 7105305:

src/share/vm/oops/constantPoolKlass.cpp	Mon Oct 31 15:43:37 2011
@@ -532,7 +532,7 @@
     if (cp->tag_at(i).is_unresolved_klass()) {
       // This will force loading of the class
       klassOop klass = cp->klass_at(i, CHECK);
-      if (klass->is_instance()) {
+      if (klass->klass_part()->oop_is_instance()) {
         // Force initialization of class
         instanceKlass::cast(klass)->initialize(CHECK);
       }

Comments
EVALUATION http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/670a74b863fc
22-03-2012

EVALUATION See main CR
30-11-2011

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-emb/hotspot/rev/670a74b863fc
29-11-2011

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/670a74b863fc
15-11-2011

EVALUATION Late inlining and IGVN may cut off part of ideal graph which become dead. But dead code may stay in graph and still be reachable from data nodes (for example constants). Region::Ideal() has code to kill not reachable from method's start dead code if Region node has only one input (second input path was cut off). But it can't eliminate a Region node which has two or more live inputs which are loop's back edges. EA may create dead loop Phi nodes if a scalar replaceable allocation is referenced inside such dead loops. Used dead nodes elimination code in PhaseIdealLoop before executing EA. But do not execute any loop optimizations to avoid ideal graph reshaping before EA. Also removed dead nodes from macro_nodes list in remove_useless_nodes(). During testing I hit several other problems and fixed them: Added missed failing() check after each late inline. Added missed parenthesis for Verbose output of CMOVE nodes. A switch value for indirect jumps could be shared but the matcher's code which detects it was skipped since incorrect state (Visit instead of Pre_Visit) was used. Split instance field load through Phi optimization was executed before Phi node is processed. Use PrintCompilation2 instead of PrintInlining flag to print compilation data after compilation is finished. Change PrintCompilation2 to diagnostic flag and replace it in previous usage (only one) with WizardMode flag. Fixed 7109987 problem.
09-11-2011

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/670a74b863fc
09-11-2011

EVALUATION It seems dead loop phi is created during EA: [t@45 l@45]: print orig_phi->dump(2) 7147 Phi === 7145 7365 7327 [[ 7243 7203 7467 7200 7163 7198 7172 7182 7223 7235 ]] #memory Memory: @BotPTR *+bot, idx=Bot; !orig=[7215] !jvms: functionParser::Q3119 @ bci:2077 7395 Proj === 7379 [[ 7467 7243 818 7457 7454 7417 7452 7426 7436 ]] #2 Memory: @BotPTR *+bot, idx=Bot; !jvms: functionParser::Q3119 @ bci:2074 7241 Region === 7241 7462 7240 [[ 7241 7259 7242 7243 7262 8784 ]] !jvms: functionParser::Q3119 @ bci:2021 7270 AddI === _ 7268 42 [[ 7280 7273 7272 ]] !jvms: functionParser::Q3515 @ bci:12 functionParser::Q3119 @ bci:2026 971 AddP === _ 105 105 197 [[ 972 3253 3262 3356 3365 3369 3436 3445 3720 3729 3780 3789 3939 3948 3951 4014 4023 4026 7163 7172 7259 7268 7272 7417 7426 7481 7490 7541 7550 7614 7624 7627 7687 7697 7700 7762 7772 7775 7834 7844 7847 ]] !jvms: functionParser::Q3519 @ bci:3 functionParser::Q3119 @ bci:72 7264 IfFalse === 7262 [[ 7277 7268 7272 ]] #0 !jvms: functionParser::Q3515 @ bci:3 functionParser::Q3119 @ bci:2026 7263 IfTrue === 7262 [[ 7249 ]] #1 !jvms: functionParser::Q3515 @ bci:3 functionParser::Q3119 @ bci:2026 7278 IfTrue === 7277 [[ 7249 7296 ]] #1 !jvms: functionParser::Q3515 @ bci:15 functionParser::Q3119 @ bci:2026 7243 Phi === 7241 7395 7147 [[ 7382 7352 7343 7314 7259 7309 7268 7272 7275 7305 7252 7299 7297 ]] #memory Memory: @BotPTR *+bot, idx=Bot; !jvms: functionParser::Q3119 @ bci:2021 7272 StoreI === 7264 7243 971 7270 [[ 7297 7275 7296 8783 ]] @int[int:>=0]:exact+any *, idx=4; Memory: @int[int:1]:NotNull:exact[0] *,iid=88, idx=35; !jvms: functionParser::Q3515 @ bci:14 functionParser::Q3119 @ bci:2026 7249 Region === 7249 7278 7263 [[ 7249 7297 7302 7253 8783 ]] !jvms: functionParser::Q3119 @ bci:2026 7297 Phi === 7249 7272 7243 [[ 7252 7305 7314 7382 7343 7352 ]] #memory Memory: @int[int:>=0]:exact+any *, idx=4; !orig=7251 !jvms: functionParser::Q3119 @ bci:2026 [t@45 l@45]: print result->dump() 8783 Phi === 7249 _ _ [[]] #memory Memory: @int[int:1]:NotNull:exact+any *,iid=88, idx=35; !orig=7297,7251 !jvms: functionParser::Q3119 @ bci:2026 [t@45 l@45]: print mem->dump() 7272 StoreI === 7264 7243 971 7270 [[ 7297 7275 7296 ]] @int[int:>=0]:exact+any *, idx=4; Memory: @int[int:1]:NotNull:exact[0] *,iid=88, idx=35; !jvms: functionParser::Q3515 @ bci:14 functionParser::Q3119 @ bci:2026 [t@45 l@45]: print mem->dump(1) 8785 Phi === 7145 8783 8783 [[ 8784 ]] #memory Memory: @int[int:1]:NotNull:exact+any *,iid=88, idx=35; !orig=7147,[7215] !jvms: functionParser::Q3119 @ bci:2077 8783 Phi === 7249 7272 _ [[ 7343 8784 7305 8785 7252 8785 ]] #memory Memory: @int[int:1]:NotNull:exact+any *,iid=88, idx=35; !orig=7297,7251 !jvms: functionParser::Q3119 @ bci:2026 7241 Region === 7241 7462 7240 [[ 7241 7259 7242 7243 7262 8784 ]] !jvms: functionParser::Q3119 @ bci:2021 8784 Phi === 7241 8783 8785 [[]] #memory Memory: @int[int:1]:NotNull:exact+any *,iid=88, idx=35; !orig=7243 !jvms: functionParser::Q3119 @ bci:2021 [t@45 l@45]: print result->dump(1) 8784 Phi === 7241 8783 8785 [[ 8783 ]] #memory Memory: @int[int:1]:NotNull:exact+any *,iid=88, idx=35; !orig=7243 !jvms: functionParser::Q3119 @ bci:2021 7272 StoreI === 7264 7243 971 7270 [[ 7297 7275 7296 8783 ]] @int[int:>=0]:exact+any *, idx=4; Memory: @int[int:1]:NotNull:exact[0] *,iid=88, idx=35; !jvms: functionParser::Q3515 @ bci:14 functionParser::Q3119 @ bci:2026 7249 Region === 7249 7278 7263 [[ 7249 7297 7302 7253 8783 ]] !jvms: functionParser::Q3119 @ bci:2026 8783 Phi === 7249 7272 8784 [[ 7343 8784 7305 8785 7252 8785 ]] #memory Memory: @int[int:1]:NotNull:exact+any *,iid=88, idx=35; !orig=7297,7251 !jvms: functionParser::Q3119 @ bci:2026
01-11-2011