United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6879902 CTW failure jdk6_18/hotspot/src/cpu/sparc/vm/assembler_sparc.hpp:845
JDK-6879902 : CTW failure jdk6_18/hotspot/src/cpu/sparc/vm/assembler_sparc.hpp:845

Details
Type:
Bug
Submit Date:
2009-09-08
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs16
Fixed Versions:
hs17 (b04)

Related Reports
Backport:
Backport:

Sub Tasks

Description
The issue is reproduced also on 32 client sparc.
To reproduce run:
/net/sqenfs-1.sfbay/export1/jdk/re/6u18/promoted/all/b01/binaries/solaris-sparcv9/fastdebug//bin/java   -server -d64  -XX:-ShowMessageBoxOnError -Xverify:all  -XX:+CompileTheWorld -XX:CompileTheWorldStartAt=1314 -XX:CompileTheWorldStopAt=1414 -Xbootclasspath/p:/net/sqenfs-1.sfbay/export1/comp/vm/testbase/ctw/build/../jars/ibiblio/maven2/org/codehaus/groovy/groovy-all-jdk14/1.6.0/groovy-all-jdk14-1.6.0.jar

----------------------------------------------------------------------------
-->/net/sqenfs-1.sfbay/export1/jdk/re/6u18/promoted/all/b01/binaries/solaris-sparc/fastdebug//bin/java   -client  -XX:-ShowMessageBoxOnError -Xverify:all  -XX:+CompileTheWorld -XX:CompileTheWorldStartAt=1314 -XX:CompileTheWorldStopAt=1414 -Xbootclasspath/p:/net/sqenfs-1.sfbay/export1/comp/vm/testbase/ctw/build/../jars/ibiblio/maven2/org/codehaus/groovy/groovy-all-jdk14/1.6.0/groovy-all-jdk14-1.6.0.jar
VM option '-ShowMessageBoxOnError'
VM option '+CompileTheWorld'
VM option 'CompileTheWorldStartAt=1314'
VM option 'CompileTheWorldStopAt=1414'
Warning:  Cannot open log file: hotspot.log
Warning:  Forcing option -XX:LogFile=/tmp//hs_pid1041.log
CompileTheWorld : Compiling all classes in /net/sqenfs-1.sfbay/export1/comp/vm/testbase/ctw/jars/ibiblio/maven2/org/codehaus/groovy/groovy-all-jdk14/1.6.0/groovy-all-jdk14-1.6.0.jar

Preloading failed for (13) groovy/grape/GrapeIvy$_getDependencies_closure2
Preloading failed for (17) groovy/grape/GrapeIvy
Preloading failed for (268) groovy/servlet/GroovyServlet$1
Preloading failed for (274) groovy/servlet/ServletBinding$ServletOutput
Preloading failed for (275) groovy/servlet/ServletBinding
Preloading failed for (276) groovy/servlet/ServletCategory
Preloading failed for (277) groovy/servlet/TemplateServlet$TemplateCacheEntry
Preloading failed for (525) groovy/ui/InteractiveShell
Preloading failed for (598) groovy/util/AntBuilder
Preloading failed for (602) groovy/util/CliBuilder$_option_closure1
Preloading failed for (603) groovy/util/CliBuilder
Preloading failed for (686) groovy/util/OptionAccessor
CompileTheWorld (1314) : groovyjarjarbackport/java/util/concurrent/locks/ReentrantLock$Sync
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/assembler_sparc.hpp:845
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/BUILD_AREA/jdk6_18/hotspot/src/cpu/sparc/vm/assembler_sparc.hpp:845), pid=1041, tid=7
#  Error: assert(nbits == 32 || -(1 << nbits-1) <= x && x < ( 1 << nbits-1),"value out of range")
#
# JRE version: 6.0_18-b01
# Java VM: Java HotSpot(TM) Client VM (16.0-b08-fastdebug mixed mode solaris-sparc )
# An error report file with more information is saved as:
# /tmp/hs_err_pid1041.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
Current thread is 7
Dumping core ...
Abort

                                    

Comments
EVALUATION

Too many arguments:

[t@1 l@1]: print total_args_passed
total_args_passed = 249

[t@1 l@1]: print i
i = 247

The addressing (SP + offset) can't be use. Put offset into register using arg_slot() functions:

#ifdef _LP64
  // On _LP64 argument slot values are loaded first into a register
  // because they might not fit into displacement.
  Register arg_slot(const int st_off);
  Register next_arg_slot(const int st_off);
                                     
2009-09-10
EVALUATION

The failing method is:

{method} 
 - klass: {other class}
 - method holder:     'org/codehaus/groovy/runtime/ArrayUtil'
 - constants:         0xffffffff7ed97683{constant pool}
 - access:            0x9  public static 
 - name:              'createArray'
 - signature:         '(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)[Ljava/lang/Object;'
 - max stack:         4
 - max locals:        249
 - size of params:    249
 - method size:       15
 - vtable index:      -3
 - i2i entry:         0xffffffff780138c0
 - adapter:           0x0000000000000000
 - compiled entry     0x0000000000000000
 - code size:         1612
 - code start:        0xfffffffef0719d00
 - code end (excl):   0xfffffffef071a34c
 - checked ex length: 0
 - linenumber start:  0xfffffffef071a34c
 - localvar length:   249
 - localvar start:    0xfffffffef071a352

But it happens with less arguments too.  I don't think using arg_slot() is the right thing to do as the outgoing arguments are for compiled frames, not for interpreted ones.  With the suggested fix the adapter for the above method compiles fine and the added testcase is OK.
                                     
2009-09-21
SUGGESTED FIX

diff -r 6a8ccac44f41 src/cpu/sparc/vm/sharedRuntime_sparc.cpp
--- a/src/cpu/sparc/vm/sharedRuntime_sparc.cpp
+++ b/src/cpu/sparc/vm/sharedRuntime_sparc.cpp
@@ -1109,8 +1109,14 @@ void AdapterGenerator::gen_i2c_adapter(
       // Convert stack slot to an SP offset
       int st_off = reg2offset(regs[i].first()) + STACK_BIAS;
       // Store down the shuffled stack word.  Target address _is_ aligned.
-      if (!r_2->is_valid()) __ stf(FloatRegisterImpl::S, r_1->as_FloatRegister(), SP, st_off);
-      else                  __ stf(FloatRegisterImpl::D, r_1->as_FloatRegister(), SP, st_off);
+      if (Assembler::is_simm13(st_off)) {
+        if (!r_2->is_valid()) __ stf(FloatRegisterImpl::S, r_1->as_FloatRegister(), SP, st_off);
+        else                  __ stf(FloatRegisterImpl::D, r_1->as_FloatRegister(), SP, st_off);
+      } else {
+        __ set(st_off, Rdisp);
+        if (!r_2->is_valid()) __ stf(FloatRegisterImpl::S, r_1->as_FloatRegister(), SP, Rdisp);
+        else                  __ stf(FloatRegisterImpl::D, r_1->as_FloatRegister(), SP, Rdisp);
+      }
     }
   }
   bool made_space = false;
                                     
2009-09-21
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/dcf03e02b020
                                     
2009-10-06



Hardware and Software, Engineered to Work Together