# HG changeset patch # User anoll # Date 1399493202 -7200 # Node ID 0c0e68524c17709a71e9bbb4bcef9ab34581c7d4 # Parent 41dcdd636080fb837033ca7b2ee0811c471b0f59 8042570: Excessive number of tests timing out on nightly testing due to fix for 8040798 Summary: Remove unnecessary lock in CompileBroker::mark_on_stack() that causes the deadlock Reviewed-by: kvn, dcubed diff -r 41dcdd636080 -r 0c0e68524c17 src/share/vm/compiler/compileBroker.cpp --- a/src/share/vm/compiler/compileBroker.cpp Tue Apr 29 07:59:22 2014 +0200 +++ b/src/share/vm/compiler/compileBroker.cpp Wed May 07 22:06:42 2014 +0200 @@ -1128,15 +1128,16 @@ /** * Set the methods on the stack as on_stack so that redefine classes doesn't - * reclaim them + * reclaim them. This method is executed at a safepoint. */ void CompileBroker::mark_on_stack() { + assert(SafepointSynchronize::is_at_safepoint(), "sanity check"); + // Since we are at a safepoint, we do not need a lock to access + // the compile queues. if (_c2_compile_queue != NULL) { - MutexLocker locker(_c2_compile_queue->lock()); _c2_compile_queue->mark_on_stack(); } if (_c1_compile_queue != NULL) { - MutexLocker locker(_c1_compile_queue->lock()); _c1_compile_queue->mark_on_stack(); } }