JDK-7035117 : G1: nsk/stress/jni/jnistress002 fails with assertion failure
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-04-08
  • Updated: 2013-09-18
  • Resolved: 2011-04-30
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 7 Other
7Fixed hs21Fixed
Related Reports
Relates :  
Description
After the push of the changes for 7009266, the nightly test:

nsk/stress/jni/stress002 is failing with the following assertion failure:

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/tmp/jprt/P1/B/171345.jc234399/source/src/share/vm/opto/type.hpp:1096), pid=1207, tid=35
#  assert(_base == Long) failed: Not a Long
#
# JRE version: 7.0-b136
# Java VM: Java HotSpot(TM) 64-Bit Server VM (21.0-b05-internal-201104071713.jc234399.7009266_push-fastdebug mixed mode solaris-sparc compressed oops)
# Core dump written. Default location: /export/local/46778.JDK7.NIGHTLY.VM+solaris-sparcv9_vm_server_mixed_nsk.stress.testlist/results/ResultDir/jnistress002/core or core.1207
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp

on solaris-sparcv9, linux-amd64, and solaris-amd64. The stack trace is:

Current thread (0x000000010aaa3800):  JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=35, stack(0xffffffff6dc00000,0xffffffff6dd00000)]

Stack: [0xffffffff6dc00000,0xffffffff6dd00000],  sp=0xffffffff6dcfc510,  free space=1009k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x122e2ec]  void VMError::report_and_die()+0x794;;  void VMError::report_and_die()+0x794
V  [libjvm.so+0x6e6f40]  void report_vm_error(const char*,int,const char*,const char*)+0x78;;  void report_vm_error(const char*,int,const char*,const char*)+0x78
V  [libjvm.so+0x222cb0]  const TypeLong*Type::is_long()const+0x40;;  const TypeLong*Type::is_long()const+0x40
V  [libjvm.so+0x10d1d70]  const Type*CmpLNode::sub(const Type*,const Type*)const+0x30;;  const Type*CmpLNode::sub(const Type*,const Type*)const+0x30
V  [libjvm.so+0xf5a63c]  Node*PhaseGVN::transform_no_reclaim(Node*)+0x144;;  Node*PhaseGVN::transform_no_reclaim(Node*)+0x144
V  [libjvm.so+0x87fe24]  void IdealKit::if_then(Node*,BoolTest::mask,Node*,float,float,bool)+0x35c;;  void IdealKit::if_then(Node*,BoolTest::mask,Node*,float,float,bool)+0x35c
V  [libjvm.so+0xcd5b40]  void LibraryCallKit::insert_g1_pre_barrier(Node*,Node*,Node*)+0x218;;  void LibraryCallKit::insert_g1_pre_barrier(Node*,Node*,Node*)+0x218
V  [libjvm.so+0xcd6b98]  bool LibraryCallKit::inline_unsafe_access(bool,bool,BasicType,bool)+0xc08;;  bool LibraryCallKit::inline_unsafe_access(bool,bool,BasicType,bool)+0xc08
V  [libjvm.so+0xccb3e4]  JVMState*LibraryIntrinsic::generate(JVMState*)+0xec;;  JVMState*LibraryIntrinsic::generate(JVMState*)+0xec
V  [libjvm.so+0x74f910]  void Parse::do_call()+0x5e8;;  void Parse::do_call()+0x5e8
V  [libjvm.so+0xf3dd14]  void Parse::do_one_bytecode()+0x6194;;  void Parse::do_one_bytecode()+0x6194
V  [libjvm.so+0xf26174]  void Parse::do_one_block()+0x484;;  void Parse::do_one_block()+0x484
V  [libjvm.so+0xf217fc]  void Parse::do_all_blocks()+0x554;;  void Parse::do_all_blocks()+0x554
V  [libjvm.so+0xf211f8]  Parse::Parse #Nvariant 1(JVMState*,ciMethod*,float)+0xa80;;  Parse::Parse(JVMState*,ciMethod*,float)+0xa80
V  [libjvm.so+0x4b59f8]  JVMState*ParseGenerator::generate(JVMState*)+0xd0;;  JVMState*ParseGenerator::generate(JVMState*)+0xd0
V  [libjvm.so+0x6202a4]  Compile::Compile(ciEnv*,C2Compiler*,ciMethod*,int,bool,bool)+0xbac;;  Compile::Compile(ciEnv*,C2Compiler*,ciMethod*,int,bool,bool)+0xbac
V  [libjvm.so+0x4b3bbc]  void C2Compiler::compile_method(ciEnv*,ciMethod*,int)+0xb4;;  void C2Compiler::compile_method(ciEnv*,ciMethod*,int)+0xb4
V  [libjvm.so+0x638e50]  void CompileBroker::invoke_compiler_on_method(CompileTask*)+0x16d8;;  void CompileBroker::invoke_compiler_on_method(CompileTask*)+0x16d8
V  [libjvm.so+0x637264]  void CompileBroker::compiler_thread_loop()+0x6e4;;  void CompileBroker::compiler_thread_loop()+0x6e4
V  [libjvm.so+0x116f43c]  void JavaThread::thread_main_inner()+0x1a4;;  void JavaThread::thread_main_inner()+0x1a4
V  [libjvm.so+0x116f278]  void JavaThread::run()+0x248;;  void JavaThread::run()+0x248
V  [libjvm.so+0xed9cb0]  java_start+0x270;;  java_start+0x270


Current CompileTask:
C2:   9572  17      sun.misc.Unsafe.getObject(Ljava/lang/Object;I)Ljava/lang/Object; (8 bytes)

This is definitely in code that was added for 7009266. The code is generating guards around a G1 barrier.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/59766fd005ff
23-04-2011

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/59766fd005ff
14-04-2011

EVALUATION The type of the offset in Unsafe.getObject can widen, in 64 bit, to a long. The code assumed integer. A similar problem exists in Tiered/C1.
12-04-2011