JDK-6716441 : error in meet with +DoEscapeAnalysis
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs13
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_9
  • CPU: sparc
  • Submitted: 2008-06-18
  • 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
6u14Fixed 7Fixed hs14Fixed
Related Reports
Relates :  
Relates :  
Description
The report for 6589823 includes a test case which fails with meet not symmetric but it's failing for different reasons.  From the comments of that report:

Please see Tester.java class generated by JITTester which fails the same
way starting from HS12-b03 (jdk7b26). The error is:

=== Meet Not Symmetric ===
t   =                   narrowoop: Tester_Class_2:TopPTR:exact *[int:48]:AnyNull:exact *,iid=-58
this=                   Tester_Class_0:AnyNull *
mt=(t meet this)=       java/lang/Object:NotNull:exact *,iid=-58
t_dual=                 narrowoop: Tester_Class_2:exact *[int:48]:NotNull:exact *,iid=58
this_dual=              Tester_Class_0:NotNull *
mt_dual=                java/lang/Object:AnyNull:exact *,iid=58
mt_dual meet t_dual=    narrowoop: Tester_Class_2:exact *[int:48]:NotNull:exact *
mt_dual meet this_dual= java/lang/Object:NotNull *
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/type.cpp:541
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/BUILD_AREA/jdk7/hotspot/src/share/vm/opto/type.cpp:541), pid=12905, tid=1083214144
#  Error: meet not symmetric
#


The problem is not reproduced with HS12-b01 (jdk7b25).
The problem is -XX:+AggressiveOpts specific.

To reproduce the problem do something like:
1. ssh linux-amd64 machine
2. javac Tester.java
3. /net/sqenfs-1.sfbay/export1/jdk/re/7/promoted/all/b27/binaries/linux-amd64/fastdebug/bin/java  -Xcomp -d64 -server  -XX:+AggressiveOpts Tester

Running with +DoEscapeAnalysis alone it fails like this with current c2_baseline:

java -d64 -XX:+DoEscapeAnalysis -Xcomp Tester                             VM option '+DoEscapeAnalysis'
=== Meet Not Symmetric ===
t   =                   Tester_Class_2:TopPTR:exact *[int:48]:AnyNull:exact *,iid=-55
this=                   Tester_Class_0:AnyNull *
mt=(t meet this)=       java/lang/Object:NotNull:exact *,iid=-55
t_dual=                 Tester_Class_2:exact *[int:48]:NotNull:exact *,iid=55
this_dual=              Tester_Class_0:NotNull *
mt_dual=                java/lang/Object:AnyNull:exact *,iid=55
mt_dual meet t_dual=    Tester_Class_2:exact *[int:48]:NotNull:exact *
mt_dual meet this_dual= java/lang/Object:NotNull *
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/type.cpp:552
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/net/smite.sfbay/export/ws/baseline/src/share/vm/opto/type.cpp:552), pid=16221, tid=9
#  Error: meet not symmetric
#
# Java VM: OpenJDK 64-Bit Server VM (13.0-b01-never-baseline-jvmg compiled mode solaris-sparc )
# An error report file with more information is saved as:
# /never/hs_err_pid16221.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
Current thread is 9
Dumping core ...
Abort (core dumped)

I think the problem is that mt, which is the value we're going to return, has an instance id which seems like it should have been stripped during the meet.

Comments
SUGGESTED FIX Implement lattice based instance_id with Top and Bot values. Set instance_id to InstanceBot for InstPtr->meet(AryPtr) (and reverse) when types are not related. Add missing instance_id arguments. Rename methods is_instance to is_known_instance.
26-06-2008

EVALUATION Incorrect instance_id is used for InstPtr->meet(AryPtr) (and reverse) when types are not related (return j.l.Object*).
26-06-2008