RFR(S): 8205472: Deadlock in Kitchensink when trying to print compile queues causing timeout
tobias.hartmann at oracle.com
Tue Jul 10 07:09:05 UTC 2018
thanks for the review.
On 09.07.2018 19:31, Vladimir Kozlov wrote:
> On 7/9/18 4:58 AM, Tobias Hartmann wrote:
>> please review the following patch:
>> When registering a compiled method in ciEnv::register_method() the compiler thread acquires the
>> MethodCompileQueue_lock and then performs a safepoint check before acquiring the Compile_lock as
>> well. If we enter a safepoint, the compiler thread is still holding the MethodCompileQueue_lock
>> while the VM thread may execute the VM_PrintCompileQueue VM operation which requires the
>> MethodCompileQueue_lock as well. We deadlock.
>> This bug is very intermittent and I was only able to reproduce it by modifying the VM to always
>> enter a safepoint (see comments in JIRA). The solution is to not acquire the MethodCompileQueue_lock
>> in CompileBroker::print_compile_queues() because we only execute that code at a safepoint anyway
>> (VM_PrintCompileQueue has evaluation_mode() == _safepoint).
More information about the hotspot-dev