JDK-7045506 : assert(!can_reshape || !new_phi) failed: for igvn new phi should be hooked
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs21
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-05-17
  • Updated: 2011-09-22
  • Resolved: 2011-07-18
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
7Fixed 8Fixed hs21Fixed
Related Reports
Relates :  
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 http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/b55f5bd7ec66
09-06-2011

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

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

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

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

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).
20-05-2011

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().
19-05-2011