United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7013812 C1: deopt blob too far from patching stub
JDK-7013812 : C1: deopt blob too far from patching stub

Details
Type:
Bug
Submit Date:
2011-01-21
Status:
Closed
Updated Date:
2011-04-23
Project Name:
JDK
Resolved Date:
2011-04-23
Component:
hotspot
OS:
solaris
Sub-Component:
compiler
CPU:
sparc
Priority:
P2
Resolution:
Fixed
Affected Versions:
hs20
Fixed Versions:
hs20 (b07)

Related Reports
Backport:
Backport:

Sub Tasks

Description
C1 fails during jprt jobs with specjvm98 and specjbb2005 on sparc 64-bit.

(jprt-sparc-q2-5)/opt/jprt/products/T1/jvm98/jvm98> vi /tmp/hs_err_pid634.log 
"/tmp/hs_err_pid634.log" 166 lines, 10628 characters 
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/tmp/jprt/P1/B/204627.bobv/source/src/cpu/sparc/vm/assembler_sparc.hpp:860), pid=634, tid=44
#  assert(nbits == 32 || -(1 << nbits-1) <= x && x < ( 1 << nbits-1)) failed: value out of range
#
# JRE version: 7.0
# Java VM: OpenJDK 64-Bit Server VM (20.0-b07-internal-201101202046.bobv.hotspot-fastdebug mixed mode solaris-sparc compressed oops)
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

---------------  T H R E A D  ---------------

Current thread (0x0000000101b0e000):  JavaThread "C1 CompilerThread14" daemon [_thread_in_vm,
id=44, stack(0xffffffff6de00000,0xffffffff6df00000)]


V  [libjvm.so+0x12bb4f0]  void VMError::report_and_die()+0x758
V  [libjvm.so+0x7196c8]  void report_vm_error(const char*,int,const char*,const char*)+0x78
V  [libjvm.so+0x226368]  void Assembler::assert_signed_range(long,int)+0x70
V  [libjvm.so+0x2194c4]  int Assembler::wdisp(long,long,int)+0x34
V  [libjvm.so+0x300628]  int Assembler::patched_branch(int,int,int)+0x148
V  [libjvm.so+0x1064e4c]  void Relocation::pd_set_call_destination(unsigned char*)+0x16c
V  [libjvm.so+0x60a06c]  void CodeBuffer::relocate_code_to(CodeBuffer*)const+0x51c
V  [libjvm.so+0x609ab0]  void CodeBuffer::copy_code_to(CodeBlob*)+0x100
V  [libjvm.so+0x603868]  CodeBlob::CodeBlob(const char*,CodeBuffer*,int,int,int,int,OopMapSet*)+0x178
V  [libjvm.so+0x604834]  RuntimeStub::RuntimeStub(const char*,CodeBuffer*,int,int,int,OopMapSet*,bool)+0x64
V  [libjvm.so+0x604930]  RuntimeStub*RuntimeStub::new_runtime_stub(const char*,CodeBuffer*,in,int,OopMapSet*,bool)+0xd0166 lines, 10628 characters
V  [libjvm.so+0x4978a0]  void Runtime1::initialize(BufferBlob*)+0x2f8
V  [libjvm.so+0x3b5ed0]  void Compiler::initialize_all()+0x138
V  [libjvm.so+0x1c392c]  void AbstractCompiler::initialize_runtimes(void(*)(),volatile int*)+x414
V  [libjvm.so+0x3b5f50]  void Compiler::initialize()+0x48
V  [libjvm.so+0x3b62b4]  void Compiler::compile_method(ciEnv*,ciMethod*,int)+0x294
V  [libjvm.so+0x663df8]  void CompileBroker::invoke_compiler_on_method(CompileTask*)+0x1d70
V  [libjvm.so+0x661aa4]  void CompileBroker::compiler_thread_loop()+0xb24
V  [libjvm.so+0x11ec6d4]  void JavaThread::thread_main_inner()+0x1a4
V  [libjvm.so+0x11ec510]  void JavaThread::run()+0x248
V  [libjvm.so+0xf349f0]  java_start+0x270

                                    

Comments
EVALUATION

access_filed_patching and load_klass_patching stubs are using effectively a bp instruction to jump to deopt blob. This limits the distance between the deopt blob and these stub to 2^20, which is not enough.
                                     
2011-01-21
SUGGESTED FIX

Since this situation could become possible also with a 32bit VM, always use long jumps.
                                     
2011-01-21
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/85330eaa15ee
                                     
2011-01-21
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/85330eaa15ee
                                     
2011-01-21



Hardware and Software, Engineered to Work Together