JDK-6953267 : assert in EA code with -XX:+StressReflectiveCode
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs18
  • Priority: P5
  • Status: Closed
  • Resolution: Fixed
  • OS: linux_2.6
  • CPU: x86
  • Submitted: 2010-05-17
  • 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
6u21pFixed 7Fixed hs19Fixed
Description
java -Xcomp -XX:CICompilerCount=1 -XX:+StressReflectiveCode -XX:+DoEscapeAnalysis t
VM option 'CICompilerCount=1'
VM option '+StressReflectiveCode'
VM option '+DoEscapeAnalysis'
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/ciObject.hpp:244
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/BUILD_AREA/jdk7/hotspot/src/share/vm/ci/ciObject.hpp:244), pid=29198, tid=9
#  Error: assert(is_instance_klass(),"bad cast")
#
# JRE version: 7.0-b93
# Java VM: Java HotSpot(TM) Server VM (18.0-b04-fastdebug compiled mode solaris-x86 )
# An error report file with more information is saved as:
# /export/home/kvn/work2/hg/lrgpage/hs_err_pid29198.log
#
# 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 (0x08193400):  JavaThread "CompilerThread0" daemon [_thread_in_native, id=9, stack(0xb485c000,0xb48dc000)] 
 
Stack: [0xb485c000,0xb48dc000],  sp=0xb48daa40,  free space=1fab48dc000k 
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) 
V  [libjvm.so+0x176fc71] void VMError::report(outputStream*) + 0x5a9
V  [libjvm.so+0x1770b81] void VMError::report_and_die() + 0x57d
V  [libjvm.so+0x7f33cd] void report_assertion_failure(const char*,int,const char*) + 0x61
V  [libjvm.so+0x8a9ff2] void ConnectionGraph::process_call_result(ProjNode*,PhaseTransform*) + 0x8ca
V  [libjvm.so+0x8aacb8] void ConnectionGraph::record_for_escape_analysis(Node*,PhaseTransform*) + 0xb50
V  [libjvm.so+0x8a5d9f] bool ConnectionGraph::compute_escape() + 0x443
V  [libjvm.so+0x70830a] Compile::Compile(ciEnv*,C2Compiler*,ciMethod*,int,bool,bool) + 0x198a
V  [libjvm.so+0x54c958] void C2Compiler::compile_method(ciEnv*,ciMethod*,int) + 0xdc
V  [libjvm.so+0x72080b] void CompileBroker::invoke_compiler_on_method(CompileTask*) + 0x115b
V  [libjvm.so+0x71ebc3] void CompileBroker::compiler_thread_loop() + 0xbcb
V  [libjvm.so+0x1686811] void compiler_thread_entry(JavaThread*,Thread*) + 0x2d
V  [libjvm.so+0x167cdfb] void JavaThread::thread_main_inner() + 0x18f
V  [libjvm.so+0x167caf5] void JavaThread::run() + 0x37d
V  [libjvm.so+0x13418bb] java_start + 0x117
C  [libc.so.1+0xbc2a6]  _thrp_setup+0x7e _thrp_setup + 0x7e
C  [libc.so.1+0xbc530]  _lwp_start+0x0 _lwp_start + 0x0
 
 
Current CompileTask: 
C2:144   b  java.lang.Class.getConstructor0([Ljava/lang/Class;I)Ljava/lang/reflect/Constructor; (103 bytes)

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/c52275c698d1
18-05-2010

EVALUATION EA code does not handle StressReflectiveCode when an array klass is used for Allocate node or instance klass - for AllocateArray node on never executed path (see method LibraryCallKit::inline_native_clone()).
17-05-2010