United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6908167 jbb2005, OptimizeStringConcat causes assert in EA
JDK-6908167 : jbb2005, OptimizeStringConcat causes assert in EA

Details
Type:
Bug
Submit Date:
2009-12-07
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
hotspot
OS:
solaris_10
Sub-Component:
compiler
CPU:
sparc
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs17
Fixed Versions:
hs17 (b06)

Related Reports
Backport:
Relates:

Sub Tasks

Description
HS16 and HS17 are affected.

% java -XX:+DoEscapeAnalysis -XX:+OptimizeStringConcat -XX:+AggressiveOpts -XX:+UseParallelOldGC -XX:ParallelGCThreads=6 -Xmx2560m -Xms2560m -Xmn2g -Xss256k -cp jbb.jar:check.jar spec.jbb.JBBmain

...

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Loading Warehouse 1...


Start User Threads
  started user thread for Warehouse 1
Timing Measurement began Mon Dec 07 15:55:07 PST 2009 for 0.5 minutes
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/escape.cpp:2285
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/export0/BUILD_AREA/jdk6_18/hotspot/src/share/vm/opto/escape.cpp:2285), pid=13269, tid=13
#  Error: assert(nt != PointsToNode::UnknownType,"all nodes should be known")
#
# JRE version: 6.0_18-b05
# Java VM: Java HotSpot(TM) Server VM (16.0-b12-fastdebug mixed mode solaris-x86 )
# An error report file with more information is saved as:
# /export/kvn/refworkload/benchmarks/specjbb2005/hs_err_pid13269.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
Current thread is 13
Dumping core ...
Abort

Caused by dead CreateEx node as input to Phi:

Current function is ConnectionGraph::build_connection_graph
 2285           assert(nt != PointsToNode::UnknownType, "all nodes should be known");

 236    CreateEx        ===  1  1  [[ 128 ]]  #java/lang/Throwable:NotNull *  Oop:java/lang/Throwable:NotNull * !jvms: History::buildData @ bci:28
 505    Phi     ===  496  376  495  [[ 128 ]]  #java/lang/OutOfMemoryError:NotNull:exact *  Oop:java/lang/OutOfMemoryError:NotNull:exact *
 125    Region  ===  125  1  1  1  1  496  1  [[ 125  126  127  128  267 ]]  !jvms: History::buildData @ bci:13
 128    Phi     ===  125  1  1  1  1  505  236  [[ 290 ]]  #java/lang/Throwable:NotNull *  Oop:java/lang/Throwable:NotNull * !jvms: History::buildData @ bci:13

CreateEx node becamo dead in GraphKit::replace_call() method:

  if (ejvms == NULL) {
    // No exception edges to simply kill off those paths
    C->gvn_replace_by(callprojs.catchall_catchproj, C->top());
    C->gvn_replace_by(callprojs.catchall_memproj,   C->top());
    C->gvn_replace_by(callprojs.catchall_ioproj,    C->top());


I set P4 since in Product VM it works fine since these edges will be skipped in ConnectionGraph::remove_deferred().

                                    

Comments
EVALUATION

Killing off these exception paths creates dead paths that EA isn't expecting to deal with.  I clean up some of these explicitly in PhaseStringOpt itself but GraphKit::replace_call doesn't do this cleanup.  This fixes it:

diff -r 8b22f86d1740 src/share/vm/opto/graphKit.cpp
--- a/src/share/vm/opto/graphKit.cpp    Wed Dec 02 13:29:00 2009 -0800
+++ b/src/share/vm/opto/graphKit.cpp    Tue Dec 08 13:03:16 2009 -0800
@@ -1714,6 +1714,11 @@ void GraphKit::replace_call(CallNode* ca
     C->gvn_replace_by(callprojs.catchall_catchproj, C->top());
     C->gvn_replace_by(callprojs.catchall_memproj,   C->top());
     C->gvn_replace_by(callprojs.catchall_ioproj,    C->top());
+
+    // Replace the old exception object with top
+    if (callprojs.exobj != NULL) {
+      C->gvn_replace_by(callprojs.exobj, C->top());
+    }
   } else {
     GraphKit ekit(ejvms);
                                     
2009-12-08
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/c5d3d979ae27
                                     
2009-12-09



Hardware and Software, Engineered to Work Together