United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7045506 assert(!can_reshape || !new_phi) failed: for igvn new phi should be hooked
JDK-7045506 : assert(!can_reshape || !new_phi) failed: for igvn new phi should be hooked

Details
Type:
Bug
Submit Date:
2011-05-17
Status:
Closed
Updated Date:
2011-09-22
Project Name:
JDK
Resolved Date:
2011-07-18
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs21
Fixed Versions:
hs21 (b15)

Related Reports
Backport:
Backport:
Backport:
Relates:

Sub Tasks

Description
Fastdebug VM crashes with

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/tmp/jprt/P1/B/051054.et151817/source/src/share/vm/opto/cfgnode.cpp:1559), pid=4323, tid=2612128672
#  assert(!can_reshape || !new_phi) failed: for igvn new phi should be hooked
#
# JRE version: 7.0-b142
# Java VM: Java HotSpot(TM) Server VM (21.0-b13-internal-201105130510.et151817.hs21-b13-snapshot-fastdebug compiled mode linux-x86 )

V  [libjvm.so+0xaaed91]  VMError::report_and_die()+0x1a1
V  [libjvm.so+0x4cc5a8]  report_vm_error(char const*, int, char const*, char const*)+0x68
V  [libjvm.so+0x394087]  PhiNode::Ideal(PhaseGVN*, bool)+0x337
V  [libjvm.so+0x93a459]  PhaseIterGVN::transform_old(Node*)+0x169
V  [libjvm.so+0x934e0a]  PhaseIterGVN::transform(Node*)+0x4a
V  [libjvm.so+0x88e610]  AndINode::Ideal(PhaseGVN*, bool)+0x414
V  [libjvm.so+0x93a3a1]  PhaseIterGVN::transform_old(Node*)+0xb1
V  [libjvm.so+0x934e0a]  PhaseIterGVN::transform(Node*)+0x4a
V  [libjvm.so+0x88dc5e]  MulNode::Ideal(PhaseGVN*, bool)+0x5f0
V  [libjvm.so+0x88e90d]  AndINode::Ideal(PhaseGVN*, bool)+0x711
V  [libjvm.so+0x93a459]  PhaseIterGVN::transform_old(Node*)+0x169
V  [libjvm.so+0x936926]  PhaseIterGVN::optimize()+0x236
V  [libjvm.so+0x45be40]  Compile::Optimize()+0x9f0
V  [libjvm.so+0x45f9a4]  Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool)+0x1114
V  [libjvm.so+0x374bf9]  C2Compiler::compile_method(ciEnv*, ciMethod*, int)+0x229
V  [libjvm.so+0x469908]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x548
V  [libjvm.so+0x46a5fb]  CompileBroker::compiler_thread_loop()+0x5bb
V  [libjvm.so+0xa48fef]  compiler_thread_entry(JavaThread*, Thread*)+0x4f
V  [libjvm.so+0xa54794]  JavaThread::thread_main_inner()+0xf4
V  [libjvm.so+0x8e0e91]  java_start(Thread*)+0x111
C  [libpthread.so.0+0x535b]  start_thread+0x8b


Current CompileTask:
C2: 234274 11036  s!b        com.sleepycat.je.dbi.DbTree::doCreateDb (360 bytes)

                                    

Comments
EVALUATION

Most likely caused by fix for 7026700. After that fix LoadNode::split_through_phi() always creates a new split phi which could hit this assert since the transformed load node could be a new node without users. In this bug case it is new LoadUB node created in AndINode::Ideal().
                                     
2011-05-19
SUGGESTED FIX

Replace the assert in PhiNode::Ideal with check to avoid transformation of new phi.

src/share/vm/opto/cfgnode.cpp	Thu May 19 11:03:54 2011 -0700
@@ -1556,7 +1556,9 @@
 
   Node *top = phase->C->top();
   bool new_phi = (outcnt() == 0); // transforming new Phi
-  assert(!can_reshape || !new_phi, "for igvn new phi should be hooked");
+  // No change for igvn if new phi is not hooked
+  if (new_phi && can_reshape)
+    return NULL;
 
   // The are 2 situations when only one valid phi's input is left
   // (in addition to Region input).
                                     
2011-05-20
EVALUATION

In product VM such phi node (outcnt() == 0) will be marked as dead which could lead to incorrect code genearation.
                                     
2011-05-20
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/b55f5bd7ec66
                                     
2011-05-21
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/b55f5bd7ec66
                                     
2011-05-24
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/b55f5bd7ec66
                                     
2011-06-03
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/b55f5bd7ec66
                                     
2011-06-09



Hardware and Software, Engineered to Work Together