United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6738933 assert with base pointers must match with compressed oops enabled
JDK-6738933 : assert with base pointers must match with compressed oops enabled

Details
Type:
Bug
Submit Date:
2008-08-19
Status:
Closed
Updated Date:
2011-03-07
Project Name:
JDK
Resolved Date:
2011-03-07
Component:
hotspot
OS:
solaris_9
Sub-Component:
compiler
CPU:
sparc
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs14
Fixed Versions:
hs14 (b05)

Related Reports
Backport:
Backport:

Sub Tasks

Description
Hi,

I've been doing some testing on a G1 merge with the GC baseline and I hit the following assertion:

# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/compile.cpp:2032
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/java/east/u2/ap31282/hotspot-gc/src/share/vm/opto/compile.cpp:2032), pid=12778, tid=26
#  Error: assert(!addp->is_AddP() || addp->in(AddPNode::Base)->is_top() || addp->in(AddPNode::Base) == n->in(AddPNode::Base),"Base pointers must match")
#
# Java VM: OpenJDK 64-Bit Server VM (14.0-b01-internal-fastdebug mixed mode solaris-sparc compressed oops)
# An error report file with more information is saved as:
# /java/east/u2/ap31282/gc_test_suite_sparcv9/dacapo/hs_err_pid12778.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

I can also reproduce it with the latest GC baseline (i.e., no G1 stuff in it). It only seems to happen with sparcv9 (sparc and x86 were clean; I didn't try amd64) and both CMS and SerialGC. I can easily reproduce it with the dacapo eclipse benchmark and a fastdebug VM (basically, it crashes every time). Ah, and I just noticed that compressed oops were being turned on. Turning them off makes the assert disappear.

Is this known? I would be happy to give you instructions on how to reproduce it (or even do more testing...).

Tony


cd gc_test_suite/dacapo

java -XX:+UseConcMarkSweepGC -Xms64m -Xmx512m -d64 -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -jar dacapo-2006-10.jar -s default eclipse

(and make sure coops are enabled)

                                    

Comments
EVALUATION

During PhaseIdealLoop::split_if_with_blocks_post, if a shared loop-varying computation has no loop-varying uses then a copy is cloned to the uses.  The copying logic is fairly blind and since gvn will recommon the cloned operations it removes the nodes from the worklist so that they won't re-GVN.  There's an existing cutout that skips the yank is the node is a Load and the comments around it suggests that it's done because the node could be the base of an AddP.  With compressed oops the base of AddPs is normally a DecodeN so the logic needs to test for DecodeN as well.
                                     
2008-08-19
SUGGESTED FIX

diff --git a/src/share/vm/opto/loopopts.cpp b/src/share/vm/opto/loopopts.cpp
--- a/src/share/vm/opto/loopopts.cpp
+++ b/src/share/vm/opto/loopopts.cpp
@@ -932,7 +932,7 @@ void PhaseIdealLoop::split_if_with_block
             // to fold a StoreP and an AddP together (as part of an
             // address expression) and the AddP and StoreP have
             // different controls.
-            if( !x->is_Load() ) _igvn._worklist.yank(x);
+            if( !x->is_Load() && !x->is_DecodeN() ) _igvn._worklist.yank(x);
           }
           _igvn.remove_dead_node(n);
         }
                                     
2008-08-19
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/60bc5071073f
                                     
2008-09-03



Hardware and Software, Engineered to Work Together