JDK-6738933 : assert with base pointers must match with compressed oops enabled
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs14
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_9
  • CPU: sparc
  • Submitted: 2008-08-19
  • Updated: 2011-03-07
  • Resolved: 2011-03-07
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
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 http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/60bc5071073f
03-09-2008

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.
19-08-2008

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); }
19-08-2008