--- old/src/share/vm/prims/jvmtiEnvThreadState.cpp Wed Dec 18 19:24:16 2013 +++ new/src/share/vm/prims/jvmtiEnvThreadState.cpp Wed Dec 18 19:24:10 2013 @@ -272,7 +272,7 @@ // There can be a race condition between a VM_Operation reaching a safepoint // and the target thread exiting from Java execution. // We must recheck the last Java frame still exists. - if (_thread->has_last_Java_frame()) { + if (!_thread->is_exiting() && _thread->has_last_Java_frame()) { javaVFrame* vf = _thread->last_java_vframe(&rm); assert(vf != NULL, "must have last java frame"); Method* method = vf->method();