JDK-6896370 : CTW fails share/vm/opto/matcher.cpp:1475 "duplicating node that's already been matched"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs17
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: x86
  • Submitted: 2009-10-29
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
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
6u21Fixed 7Fixed hs17Fixed
Related Reports
Relates :  
Description
Crashes on the amd64. I have reproduce it on the jdk7b74.

Looks like a regression to 6791572

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/BUILD_AREA/jdk7/hotspot/src/share/vm/opto/matcher.cpp:1475), pid=1334, tid=11
#  Error: assert(C->node_arena()->contains(s->_leaf) || !has_new_node(s->_leaf),"duplicating node that's already been matched")
#
# JRE version: 7.0-b74
# Java VM: Java HotSpot(TM) 64-Bit Server VM (17.0-b03-fastdebug mixed mode solaris-amd64 compressed oops)
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

To reproduce run:

/net/sqenfs-1.sfbay/export1/jdk/re/7/promoted/all/b74/binaries/solaris-amd64/fastdebug/bin/java   -server -d64  -XX:+PrintCompilation -XX:-ShowMessageBoxOnError -Xverify:all  -XX:+CompileTheWorld -XX:CompileTheWorldStartAt=1 -XX:CompileTheWorldStopAt=101 -XX:LogFile=hotspot_1_101.log -Xbootclasspath/p:/net/sqenfs-1.sfbay/export1/comp/vm/testbase/ctw/build/../jars/ibiblio/maven2/org/apache/xbean/xbean-server/3.3/xbean-server-3.3.jar

Comments
PUBLIC COMMENTS Problem: It is compressed oops related. LoadN node is not marked as shared since the method Matcher::find_shared() misses the case of address phi which has AddP nodes as input (after split through phi). As result the special code for DecodeN in address expressions is not executed. Solution: Move DecodeN code outside the memory nodes only code. I also noticed that several new memory nodes are missing from the switch's cases in find_shared(). Instead of adding them I replaced cases with common code for stores and loads at the end of the switch.
05-11-2009

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/09572fede9d1
05-11-2009

EVALUATION It is compressed oops related. LoadN node is not marked as shared since the method Matcher::find_shared() misses the case of address phi (which has AddP nodes as input). As result the special code for address expressions is not executed.
03-11-2009