Thu, 07 Apr 2011 21:32:23 -0700
7034957: acquiring lock CodeCache_lock/1 out of order with lock tty_lock/0 -- possible deadlock
Reviewed-by: iveresov
src/share/vm/code/codeCache.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/code/codeCache.cpp Thu Apr 07 17:12:23 2011 -0700 1.2 +++ b/src/share/vm/code/codeCache.cpp Thu Apr 07 21:32:23 2011 -0700 1.3 @@ -971,6 +971,8 @@ 1.4 if (CodeCache_lock->owned_by_self()) { 1.5 return _heap->largest_free_block(); 1.6 } else { 1.7 + // Avoid lock ordering problems with ttyLock. 1.8 + ttyUnlocker ttyul; 1.9 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); 1.10 return _heap->largest_free_block(); 1.11 }