JDK-8022288 : assert: stringStream is re-allocated with a different ResourceMark
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs25
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2013-08-06
  • Updated: 2013-10-03
  • Resolved: 2013-10-02
Related Reports
Duplicate :  
Relates :  
We hit new assert added with 7143807 when run VM with -XX:+PrintIntrinsics

jtreg -testjdk:/java/re/jdk/8/latest/binaries/solaris-sparcv9/fastdebug/ -va -server -d64 -XX:+PrintCompilation -XX:CICompilerCount=1 -XX:-TieredCompilation -XX:+PrintIntrinsics java/lang/invoke/MethodHandlesTest.java

  29390  579   !         test.java.lang.invoke.MethodHandlesTest::testCastFailure (454 bytes)
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/ostream.cpp:326
# A fatal error has been detected by the Java Runtime Environment:
#  Internal Error (hotspot/src/share/vm/utilities/ostream.cpp:326), pid=16667, tid=170
#  assert(rm == NULL || Thread::current()->current_resource_mark() == rm) failed: stringStream is re-allocated with a different ResourceMark
# JRE version: Java(TM) SE Runtime Environment (8.0-b101) (build 1.8.0-ea-fastdebug-b101)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.0-b43-fastdebug mixed mode solaris-sparc compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again

Stack: [0xfffffff7d7d00000,0xfffffff7d7e00000],  sp=0xfffffff7d7df6280,  free space=984k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x120b79c]  void VMError::report_and_die()+0x714
V  [libjvm.so+0x7064b8]  void report_vm_error(const char*,int,const char*,const char*)+0x78
V  [libjvm.so+0xf0b824]  void stringStream::write(const char*,unsigned long)+0xa4
V  [libjvm.so+0xf0ab34]  void outputStream::print(const char*,...)+0x48
V  [libjvm.so+0x5294e8]  void LateInlineMHCallGenerator::print_inlining_late(const char*)+0x160
V  [libjvm.so+0x66e5d4]  void Compile::dump_inlining()+0x3f4
V  [libjvm.so+0x6668e8]  void Compile::Optimize()+0x29e0
V  [libjvm.so+0x65dfe8]  Compile::Compile(ciEnv*,C2Compiler*,ciMethod*,int,bool,bool,bool)+0x13b8
V  [libjvm.so+0x51df4c]  void C2Compiler::compile_method(ciEnv*,ciMethod*,int)+0xec
V  [libjvm.so+0x679ba4]  void CompileBroker::invoke_compiler_on_method(CompileTask*)+0x594
V  [libjvm.so+0x679048]  void CompileBroker::compiler_thread_loop()+0x4d0
V  [libjvm.so+0x11593c8]  void JavaThread::thread_main_inner()+0x268
V  [libjvm.so+0x11590e0]  void JavaThread::run()+0x408
V  [libjvm.so+0xef3cd8]  java_start+0x258

Current CompileTask:
C2:  30208  579   !         test.java.lang.invoke.MethodHandlesTest::testCastFailure (454 bytes)

I was able to reproduce it on solaris x86 and in both cases only with 64-bit VM.
This is a debug flag to print out intrinsics. Fastdebug only, not crucial.