JDK-8071534 : assert(!failing()) failed: Must not have pending failure. Reason is: out of memory
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-01-24
  • Updated: 2015-09-29
  • Resolved: 2015-01-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 8 JDK 9
8u60Fixed 9 b52Fixed
Related Reports
Relates :  
Description
nsk/stress/metaspace/jck60/jck60022

[2015-01-23T10:17:48.70] #  Internal Error (C:\jprt\T\P1\192828.iggy\s\hotspot\src\share\vm\opto\compile.cpp:1165), pid=36248, tid=16152
[2015-01-23T10:17:48.70] #  assert(!failing()) failed: Must not have pending failure. Reason is: out of memory
[2015-01-23T10:17:48.70] #
[2015-01-23T10:17:48.70] # JRE version: Java(TM) SE Runtime Environment (9.0) (build 1.9.0-internal-fastdebug-20150122192828.iggy.8071302-b00)
[2015-01-23T10:17:48.70] # Java VM: Java HotSpot(TM) Server VM (1.9.0-internal-20150122192828.iggy.8071302-b00 compiled mode windows-x86 )
Comments
One of call stacks to CI from EA: =>[1] SymbolTable::lookup(name = 0xef3ed1 "javasoft/sqe/serial/StreamObjectClass;", len = 37, __the_thread__ = 0x7aff10), line 262 in "hotspot/8071534/src/share/vm/classfile/symbolTable.cpp" [2] SymbolTable::new_symbol(utf8_buffer = 0xef3ed1 "javasoft/sqe/serial/StreamObjectClass;", length = 37, __the_thread__ = 0x7aff10), line 193 in "hotspot/8071534/src/share/vm/classfile/symbolTable.hpp" [3] ciEnv::get_klass_by_name_impl(this = 0xfffffd7ff1011858, accessing_klass = 0xe00a10, cpool = CLASS, name = 0xedaf30, require_local = false), line 395 in "hotspot/8071534/src/share/vm/ci/ciEnv.cpp" [4] ciEnv::get_klass_by_index_impl(this = 0xfffffd7ff1011858, cpool = CLASS, index = 168, is_accessible = true, accessor = 0xe00a10), line 526 in "hotspot/8071534/src/share/vm/ci/ciEnv.cpp" [5] ciEnv::get_klass_by_index(this = 0xfffffd7ff1011858, cpool = CLASS, index = 168, is_accessible = true, accessor = 0xe00a10), line 566 in "hotspot/8071534/src/share/vm/ci/ciEnv.cpp" [6] ciField::ciField(this = 0xedae60, klass = 0xe00a10, index = 65541), line 97 in "hotspot/8071534/src/share/vm/ci/ciField.cpp" [7] ciEnv::get_field_by_index_impl(this = 0xfffffd7ff1011858, accessor = 0xe00a10, index = 65541), line 681 in "hotspot/8071534/src/share/vm/ci/ciEnv.cpp" [8] ciEnv::get_field_by_index(this = 0xfffffd7ff1011858, accessor = 0xe00a10, index = 65541), line 694 in "hotspot/8071534/src/share/vm/ci/ciEnv.cpp" [9] ciBytecodeStream::get_field(this = 0xfffffd7ff1009708, will_link = false), line 280 in "hotspot/8071534/src/share/vm/ci/ciStreams.cpp" [10] BCEscapeAnalyzer::iterate_one_block(this = 0xfffffd7ff1009b00, blk = 0xedac40, state = CLASS, successors = CLASS), line 852 in "hotspot/8071534/src/share/vm/ci/bcEscapeAnalyzer.cpp" [11] BCEscapeAnalyzer::iterate_blocks(this = 0xfffffd7ff1009b00, arena = 0xfffffd7ff1011868), line 1140 in "hotspot/8071534/src/share/vm/ci/bcEscapeAnalyzer.cpp" [12] BCEscapeAnalyzer::do_analysis(this = 0xfffffd7ff1009b00), line 1176 in "hotspot/8071534/src/share/vm/ci/bcEscapeAnalyzer.cpp" [13] BCEscapeAnalyzer::compute_escape_info(this = 0xfffffd7ff1009b00), line 1332 in "hotspot/8071534/src/share/vm/ci/bcEscapeAnalyzer.cpp" [14] BCEscapeAnalyzer::BCEscapeAnalyzer(this = 0xfffffd7ff1009b00, method = 0xe19ec0, parent = 0xe213a0), line 1463 in "hotspot/8071534/src/share/vm/ci/bcEscapeAnalyzer.cpp" [15] BCEscapeAnalyzer::invoke(this = 0xe213a0, state = CLASS, code = _invokespecial, target = 0xe19ec0, holder = 0xe00a10), line 315 in "hotspot/8071534/src/share/vm/ci/bcEscapeAnalyzer.cpp" [16] BCEscapeAnalyzer::iterate_one_block(this = 0xe213a0, blk = 0xe19860, state = CLASS, successors = CLASS), line 900 in "hotspot/8071534/src/share/vm/ci/bcEscapeAnalyzer.cpp" [17] BCEscapeAnalyzer::iterate_blocks(this = 0xe213a0, arena = 0xfffffd7ff1011868), line 1140 in "hotspot/8071534/src/share/vm/ci/bcEscapeAnalyzer.cpp" [18] BCEscapeAnalyzer::do_analysis(this = 0xe213a0), line 1176 in "hotspot/8071534/src/share/vm/ci/bcEscapeAnalyzer.cpp" [19] BCEscapeAnalyzer::compute_escape_info(this = 0xe213a0), line 1332 in "hotspot/8071534/src/share/vm/ci/bcEscapeAnalyzer.cpp" [20] BCEscapeAnalyzer::BCEscapeAnalyzer(this = 0xe213a0, method = 0xb27f70, parent = (nil)), line 1463 in "hotspot/8071534/src/share/vm/ci/bcEscapeAnalyzer.cpp" [21] ciMethod::get_bcea(this = 0xb27f70), line 1370 in "hotspot/8071534/src/share/vm/ci/ciMethod.cpp" [22] ConnectionGraph::add_call_node(this = 0xe10910, call = 0xe18c80), line 849 in "hotspot/8071534/src/share/vm/opto/escape.cpp" [23] ConnectionGraph::add_node_to_connection_graph(this = 0xe10910, n = 0xe18c80, delayed_worklist = 0xfffffd7ff100a988), line 363 in "hotspot/8071534/src/share/vm/opto/escape.cpp" [24] ConnectionGraph::compute_escape(this = 0xe10910), line 140 in "hotspot/8071534/src/share/vm/opto/escape.cpp" [25] ConnectionGraph::do_analysis(C = 0xfffffd7ff1010be0, igvn = 0xfffffd7ff100f038), line 96 in "hotspot/8071534/src/share/vm/opto/escape.cpp" [26] Compile::Optimize(this = 0xfffffd7ff1010be0), line 2139 in "hotspot/8071534/src/share/vm/opto/compile.cpp" [27] Compile::Compile(this = 0xfffffd7ff1010be0, ci_env = 0xfffffd7ff1011858, compiler = 0x781690, target = 0xb3ac00, osr_bci = -1, subsume_loads = true, do_escape_analysis = true, eliminate_boxing = true), line 840 in "hotspot/8071534/src/share/vm/opto/compile.cpp" [28] C2Compiler::compile_method(this = 0x781690, env = 0xfffffd7ff1011858, target = 0xb3ac00, entry_bci = -1), line 106 in "hotspot/8071534/src/share/vm/opto/c2compiler.cpp"
30-01-2015

diff -r c1a17f52db53 src/share/vm/opto/escape.cpp --- a/src/share/vm/opto/escape.cpp Wed Jan 28 07:55:27 2015 +0100 +++ b/src/share/vm/opto/escape.cpp Thu Jan 29 12:36:38 2015 -0800 @@ -206,6 +206,9 @@ _verify = false; } #endif + // Calls to CI during Call nodes processing may throw + // OOM exception when no memory left in metaspace. + if (C->failing()) return false; // 2. Finish Graph construction by propagating references to all // java objects through graph.
29-01-2015

I can't reproduce the failure. I instrumented VM to throw OOM exception always when Metaspace::allocate() is called from compiler thread. Still no luck. The fix is simple but I can't verify it.
29-01-2015

And the test IS called nsk/stress/metaspace/jck60/jck60022 :)
28-01-2015

Could be we out of metaspace: Metaspace used 130587K, capacity 130923K, committed 131044K, reserved 131456K Note, it is 32-bit server VM without tiered compilation (only C2).
28-01-2015

Attached hs_err file from failing test.
28-01-2015

Such failure record can be create only by ciEnv: void ciEnv::record_out_of_memory_failure() { // If memory is low, we stop compiling methods. record_method_not_compilable("out of memory"); } Escape Analysis uses BCEscapeAnalyzer in CI to do bytecode analysis. And it does not have failing checks after such calls: BCEscapeAnalyzer* call_analyzer = meth->get_bcea(); call_analyzer->copy_dependencies(_compile->dependencies());
28-01-2015

Could be missing failing() check in escape analysis.
27-01-2015

One thing I don't understand is, shouldn't all OOM situations in the compiler exit the VM?
27-01-2015

JDK-8023056 ;-)
27-01-2015

ILW=OOM;once;none=HLH=>P2 + nightly = P1
27-01-2015

;; Using jvm: "C:/local/aurora/sandbox/sca/vmsqe/jdk/nightly/fastdebug/comp_baseline/windows-i586/bin/server/jvm.dll" # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (C:\jprt\T\P1\192828.iggy\s\hotspot\src\share\vm\opto\compile.cpp:1165), pid=36248, tid=16152 # assert(!failing()) failed: Must not have pending failure. Reason is: out of memory # # JRE version: Java(TM) SE Runtime Environment (9.0) (build 1.9.0-internal-fastdebug-20150122192828.iggy.8071302-b00) # Java VM: Java HotSpot(TM) Server VM (1.9.0-internal-20150122192828.iggy.8071302-b00 compiled mode windows-x86 ) # Core dump written. Default location: C:\local\aurora\sandbox\results\ResultDir\jck60022\hs_err_pid36248.mdmp # # If you would like to submit a bug report, please visit: # http://bugreport.java.com/bugreport/crash.jsp # --------------- T H R E A D --------------- Current thread (0x272ca4d8): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=16152, stack(0x27930000,0x27a30000)] Stack: [0x27930000,0x27a30000], sp=0x27a2d9c8, free space=1014k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [jvm.dll+0x2e56f5] VMError::report_and_die+0x3d5;; ?report_and_die@VMError@@QAEXXZ+0x3d5 V [jvm.dll+0x2d92f5] report_vm_error+0x45;; ?report_vm_error@@YAXPBDH00@Z+0x45 V [jvm.dll+0x50f2b0] Compile::start+0x40;; ?start@Compile@@QBEPAVStartNode@@XZ+0x40 V [jvm.dll+0x52c7a1] ConnectionGraph::find_inst_mem+0x91;; ?find_inst_mem@ConnectionGraph@@AAEPAVNode@@PAV2@HAAV?$GrowableArray@PAVPhiNode@@@@@Z+0x91 V [jvm.dll+0x5304a1] ConnectionGraph::split_unique_types+0x1241;; ?split_unique_types@ConnectionGraph@@AAEXAAV?$GrowableArray@PAVNode@@@@@Z+0x1241 V [jvm.dll+0x533a31] ConnectionGraph::compute_escape+0x10c1;; ?compute_escape@ConnectionGraph@@AAE_NXZ+0x10c1 V [jvm.dll+0x5340d1] ConnectionGraph::do_analysis+0xb1;; ?do_analysis@ConnectionGraph@@SAXPAVCompile@@PAVPhaseIterGVN@@@Z+0xb1 V [jvm.dll+0x51ade1] Compile::Optimize+0x391;; ?Optimize@Compile@@AAEXXZ+0x391 V [jvm.dll+0x51bffb] Compile::Compile+0xccb;; ??0Compile@@QAE@PAVciEnv@@PAVC2Compiler@@PAVciMethod@@H_N33@Z+0xccb V [jvm.dll+0x4ec998] C2Compiler::compile_method+0xd8;; ?compile_method@C2Compiler@@UAEXPAVciEnv@@PAVciMethod@@H@Z+0xd8 V [jvm.dll+0xd3627] CompileBroker::invoke_compiler_on_method+0x417;; ?invoke_compiler_on_method@CompileBroker@@CAXPAVCompileTask@@@Z+0x417 V [jvm.dll+0xd3e13] CompileBroker::compiler_thread_loop+0x2b3;; ?compiler_thread_loop@CompileBroker@@SAXXZ+0x2b3 V [jvm.dll+0x2a45f9] JavaThread::thread_main_inner+0xd9;; ?thread_main_inner@JavaThread@@QAEXXZ+0xd9 V [jvm.dll+0x2a4793] JavaThread::run+0x173;; ?run@JavaThread@@UAEXXZ+0x173 V [jvm.dll+0x309b3c] java_start+0xcc;; ?java_start@@YGIPAVThread@@@Z+0xcc C [msvcr100.dll+0x5c556] C [msvcr100.dll+0x5c600] C [kernel32.dll+0x1338a] C [ntdll.dll+0x39f72] C [ntdll.dll+0x39f45]
27-01-2015

Odd. Is there a backtrace?
27-01-2015