When running with the new HPROF basher test the VM periodically
crashes. Analysis of the core files indicate that IterateOverReachableObjects
is encountering un-initialized objects in the heap - particularly during
the post-iteration step to reset the mark bits to their pre-iteration
values. Running with -XX:+VerifyBeforeGC yields further information and
the crash occurs earilier and more reliably.
Basically, an allocation fails and a GC is required to satisfy the
request. When the GC has completed the allocation has been satisfied
but the object has not been initialized (yet). At this point the
VM operation epilogue is executed and this posts the GarbageCollectionOccured
event. If the callback for the event blocks and a SIGQUIT is delivered
to dump the heap then we see the crash.
Here's the stack trace of the VM thread and the thread executing the
callback. In this core file the memory between _bottom and _top is
still set to 0xbaadbabe and the size of this area correponds to the
size of the object that was satisfied by the last GC.
current thread: t@2
[1] _lwp_kill(0x0, 0x6, 0x0, 0xff33c000, 0x2, 0x0), at 0xff31e71c
[2] raise(0x6, 0x0, 0xfdd7e478, 0xff33c000, 0x0, 0x0), at 0xff2cd754
[3] abort(0xff02e60c, 0x0, 0xfdd7e558, 0x0, 0x0, 0x0), at 0xff2b69e8
=>[4] error_abort(), line 79 in "hprof_error.c"
[5] signal_handler(sig = 6), line 87 in "hprof_error.c"
[6] __sighndlr(0x6, 0x0, 0xfdd7e738, 0xfeff99a0, 0x0, 0x0), at 0xff395b0c
[7] call_user_handler(0x6, 0x0, 0xfdd7e738, 0x0, 0x0, 0x0), at 0xff38f804
[8] sigacthandler(0x6, 0x0, 0xfdd7e738, 0x0, 0x0, 0x0), at 0xff38f9b4
---- called from signal handler with signal 6 (SIGABRT) ------
[9] __sigprocmask(0x0, 0xfdd7ea54, 0x0, 0x0, 0x0, 0x0), at 0xff395a50
[10] _thr_sigsetmask(0x2, 0xfdd7eb38, 0x0, 0x0, 0x0, 0x0), at 0xff38ff30
[11] _ti_sigprocmask(0x2, 0xfdd7eb38, 0x0, 0xff33c000, 0x0, 0x0), at 0xff38ffd4
[12] _sigrelse(0x6, 0x6, 0xfdd7eba8, 0x7efefeff, 0x81010100, 0xff00), at 0xff2d01d8
[13] abort(0xfdd7ec50, 0xfeda69de, 0xfeda69db, 0x2, 0x81010100, 0xff00), at 0xff2b6998
[14] os::abort(dump_core = 1), line 1514 in "os_solaris.cpp"
[15] VMError::report_and_die(this = 0xfdd7eef0), line 686 in "vmError.cpp"
[16] JVM_handle_solaris_signal(sig = 10, info = 0xfdd7f438, ucVoid = 0xfdd7f180, abort_if_unrecognized = 1), line 859 in "os_solaris_sparc.cpp"
[17] signalHandler(sig = 10, info = 0xfdd7f438, ucVoid = 0xfdd7f180), line 3011 in "os_solaris.cpp"
[18] __sighndlr(0xa, 0xfdd7f438, 0xfdd7f180, 0xfe9577b8, 0x0, 0x0), at 0xff395b0c
[19] call_user_handler(0xa, 0xfdd7f438, 0xfdd7f180, 0x0, 0x0, 0x0), at 0xff38f804
[20] sigacthandler(0xa, 0xfdd7f438, 0xfdd7f180, 0x0, 0x0, 0x0), at 0xff38f9b4
---- called from signal handler with signal 10 (SIGBUS) ------
[21] oopDesc::verify_on(this = 0xf2800000, st = 0x38e20), line 83 in "oop.cpp"
[22] oopDesc::verify(this = 0xf2800000), line 89 in "oop.cpp"
[23] ContiguousSpace::verify(this = 0xcb288, allow_dirty = 1), line 443 in "space.cpp"
[24] DefNewGeneration::verify(this = 0xc19b0, allow_dirty = 1), line 864 in "defNewGeneration.cpp"
[25] GenCollectedHeap::verify(this = 0xc1598, allow_dirty = 1, silent = 0), line 1001 in "genCollectedHeap.cpp"
[26] Universe::verify(allow_dirty = 1, silent = 0), line 877 in "universe.cpp"
[27] GenCollectedHeap::do_collection(this = 0xc1598, full = 1, clear_all_soft_refs = 0, size = 0, is_large_noref = 0, is_tlab = 0, max_level = 1, notify_ref_lock = 0xfd57f694), line 405 in "genCollectedHeap.cpp"
[28] GenCollectedHeap::do_full_collection(this = 0xc1598, clear_all_soft_refs = 0, max_level = 1, notify_ref_lock = 0xfd57f694), line 726 in "genCollectedHeap.cpp"
[29] VM_GenCollectFull::doit(this = 0xfd57f678), line 116 in "vm_operations.cpp"
[30] VM_Operation::evaluate(this = 0xfd57f678), line 26 in "vm_operations.cpp"
[31] VMThread::evaluate_operation(this = 0x12e8e8, op = 0xfd57f678), line 268 in "vmThread.cpp"
[32] VMThread::loop(this = 0x12e8e8), line 360 in "vmThread.cpp"
[33] VMThread::run(this = 0x12e8e8), line 186 in "vmThread.cpp"
[34] _start(data = 0x12e8e8), line 798 in "os_solaris.cpp"
current thread: t@1
[1] ___lwp_mutex_lock(0x4, 0xb3e68, 0x8, 0x0, 0x0, 0x0), at 0xff31e844
=>[2] os::Solaris::mutex_lock(mx = 0xb3e98), line 177 in "os_solaris.hpp"
[3] os::Solaris::Event::lock(this = 0xb3e68), line 295 in "os_solaris.hpp"
[4] Mutex::wait_for_lock_implementation(this = 0xb3e00), line 26 in "mutex_solaris.inline.hpp"
[5] Mutex::lock_without_safepoint_check(this = 0xb3e00), line 100 in "mutex.cpp"
[6] SafepointSynchronize::block(thread = 0xb5500), line 432 in "safepoint.cpp"
[7] JavaThread::check_safepoint_and_suspend_for_native_trans(thread = 0xb5500), line 1934 in "thread.cpp"
[8] ThreadStateTransition::transition_from_native(thread = 0xb5500, to = _thread_in_vm), line 111 in "interfaceSupport.hpp"
[9] ThreadStateTransition::trans_from_native(this = 0xffbfcaa0, to = _thread_in_vm), line 118 in "interfaceSupport.hpp"
[10] ThreadInVMfromNative::ThreadInVMfromNative(this = 0xffbfcaa0, thread = 0xb5500), line 164 in "interfaceSupport.hpp"
[11] jni_ExceptionOccurred(env = 0xb55d4), line 385 in "jni.cpp"
[12] checked_jni_ExceptionOccurred(env = 0xb55d4), line 478 in "jniCheck.cpp"
[13] exceptionOccurred(env = 0xb55d4), line 343 in "hprof_util.c"
[14] pushLocalFrame(env = 0xb55d4, capacity = 1), line 653 in "hprof_util.c"
[15] reset_class_load_status(env = 0xb55d4, thread = (nil)), line 854 in "hprof_init.c"
[16] object_free_cleanup(env = 0xb55d4, force_class_table_reset = '\0'), line 932 in "hprof_init.c"
[17] cbGarbageCollectionOccurred(jvmti = 0x3db84, env = 0xb55d4), line 1560 in "hprof_init.c"
[18] JvmtiExport::post_garbage_collection_occurred(), line 1969 in "jvmtiExport.cpp"
[19] VM_GC_Operation::doit_epilogue(this = 0xffbfd038), line 100 in "vm_operations.cpp"
[20] VMThread::execute(op = 0xffbfd038), line 471 in "vmThread.cpp"
[21] TwoGenerationCollectorPolicy::mem_allocate_work(this = 0xc0f28, size = 6U, is_large_noref = 0, is_tlab = 0), line 206 in "collectorPolicy.cpp"
[22] GenCollectedHeap::mem_allocate(this = 0xc1598, size = 6U, is_large_noref = 0, is_tlab = 0), line 319 in "genCollectedHeap.cpp"
[23] CollectedHeap::common_mem_allocate_noinit(size = 6U, is_noref = 0, __the_thread__ = 0xb5500), line 62 in "collectedHeap.inline.hpp"
[24] CollectedHeap::common_mem_allocate_init(size = 6U, is_noref = 0, __the_thread__ = 0xb5500), line 72 in "collectedHeap.inline.hpp"
[25] CollectedHeap::array_allocate(klass = CLASS, size = 6, length = 2, __the_thread__ = 0xb5500), line 129 in "collectedHeap.inline.hpp"
[26] instanceKlass::allocate_objArray(this = 0xf68051e0, n = 1, length = 2, __the_thread__ = 0xb5500), line 487 in "instanceKlass.cpp"
[27] oopFactory::new_objArray(klass = 0xf68051d8, length = 2, __the_thread__ = 0xb5500), line 55 in "oopFactory.cpp"
[28] InterpreterRuntime::anewarray(thread = 0xb5500, pool = 0xf6bebd88, index = 11, size = 2), line 112 in "interpreterRuntime.cpp"
[29] 0xfac26c28(0xf29fe7a8, 0xb6, 0x0, 0xfac1a5e0, 0xf29ffff0, 0xffbfd498), at 0xfac26c27
[30] 0xfac05764(0xf29fcc28, 0xb6, 0x0, 0xfac25740, 0xf29ffff0, 0xffbfd530), at 0xfac05763
[31] 0xfac05984(0xf29fcc28, 0xb7, 0x0, 0xfac25740, 0xf29ffff0, 0xffbfd5b8), at 0xfac05983
[32] 0xfac05984(0xf29fbf58, 0xb6, 0x8, 0xfac25bd8, 0xf29ffff0, 0xffbfd648), at 0xfac05983
[33] 0xfac05830(0xf29fbf58, 0xb7, 0x0, 0xfac25740, 0xf29ffff0, 0xffbfd6c8), at 0xfac0582f
[34] 0xfac05984(0xf29fbd30, 0xb7, 0xffbfd828, 0xfac25c30, 0xf6862e30, 0xffbfd748), at 0xfac05983
[35] 0xfac05830(0xf29fbd30, 0xb6, 0xffbfd8b8, 0xfac25aa0, 0xf6d6bca0, 0xffbfd7c0), at 0xfac0582f
[36] 0xfac05830(0xf29fbd30, 0xb6, 0xffbfd940, 0xfac25740, 0xf6b8af30, 0xffbfd850), at 0xfac0582f
[37] 0xfac05984(0xf29fb9b8, 0xb7, 0xffbfd9c0, 0xfac25740, 0xf29fbd00, 0xffbfd8e0), at 0xfac05983
[38] 0xfac05984(0xf29fb9b8, 0xb6, 0xffbfda44, 0xfac25aa0, 0xf6eb14f0, 0xffbfd960), at 0xfac05983
[39] 0xfac05984(0xf29fb9b8, 0xb6, 0xffbfdac4, 0xfac25740, 0xf29ffff0, 0xffbfd9e0), at 0xfac05983
[40] 0xfac05984(0xf29fb9b8, 0xb7, 0x0, 0xfac25740, 0xf29ffff0, 0xffbfda60), at 0xfac05983
[41] 0xfac05984(0xf29fb9b8, 0xb7, 0x0, 0xfac25aa0, 0xf29ffff0, 0xffbfdae0), at 0xfac05983
[42] 0xfac05984(0xf29f59e0, 0xb7, 0x0, 0xfac25c30, 0xf6ba1b88, 0xffbfdb88), at 0xfac05983
[43] 0xfac05984(0xf29e72e0, 0xb7, 0x0, 0xfac25c30, 0xf680aec0, 0xffbfdc30), at 0xfac05983
[44] 0xfac05984(0xf29bd3d8, 0xb7, 0xf2f24c00, 0xfac25aa0, 0xf29be2a0, 0xffbfdcf8), at 0xfac05983
[45] 0xfac05984(0xf2921400, 0xb7, 0x0, 0xfac25aa0, 0xf2925a20, 0xffbfdd98), at 0xfac05983
[46] 0xfac05984(0xf28ca0f8, 0xb5500, 0x8, 0xfac25c30, 0xffbfe168, 0xffbfde50), at 0xfac05983
[47] 0xfac002c8(0xffbfdf38, 0xffbfe248, 0xa, 0xf69a67d8, 0xfac0df40, 0xffbfe148), at 0xfac002c7
[48] JavaCalls::call_helper(result = 0xffbfe240, m = 0xffbfe108, args = 0xffbfe13c, __the_thread__ = 0xb5500), line 367 in "javaCalls.cpp"
[49] os::os_exception_wrapper(f = 0xfe5ff7b0 = &JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*), value = 0xffbfe240, method = 0xffbfe108, args = 0xffbfe13c, thread = 0xb5500), line 2978 in "os_solaris.cpp"
[50] JavaCalls::call(result = 0xffbfe240, method = CLASS, args = 0xffbfe13c, __the_thread__ = 0xb5500), line 286 in "javaCalls.cpp"
[51] jni_invoke_static(env = 0xb55d4, result = 0xffbfe240, receiver = (nil), call_type = JNI_STATIC, method_id = 0x1d98c2, args = 0xffbfe224, __the_thread__ = 0xb5500), line 781 in "jni.cpp"
[52] jni_CallStaticVoidMethodV(env = 0xb55d4, cls = 0xb63f4, methodID = 0x1d98c2, args = 0xffbfe360), line 1222 in "jni.cpp"
[53] checked_jni_CallStaticVoidMethod(env = 0xb55d4, cls = 0xb63f4, methodID = 0x1d98c2, ...), line 1085 in "jniCheck.cpp"
[54] main(argc = 2, argv = 0x386d4), line 421 in "java.c"
- duplicates
-
JDK-4987996 NEWHPROF: Java2Demo with hprof crashes when abruptly terminated (GcOccurred)
-
- Closed
-