RFR(S): 8148696: Race loading hsdis may cause SIGSEGV

Nils Eliasson nils.eliasson at oracle.com
Sat Feb 6 07:44:19 UTC 2016


Hi Vladimir,

I am gulity of hasty cut paste. There is a lock disassembler.cpp:181 - 
just the wrong one. Still correct as long as it makes sure only one 
thread can execute the library load.

//Nils

On 2016-02-05 16:36, Vladimir Ivanov wrote:
> Nils,
>
> Is the webrev you posted complete? I don't see any 
> LoadDisassembler_lock usages and all the changed paths have ttyLocker.
>
> Best regards,
> Vladimir Ivanov
>
> On 2/5/16 6:22 PM, Nils Eliasson wrote:
>> Hi all,
>>
>> Please review this fix to loading hsdis library.
>>
>> Summary:
>> We have had two crashes on Sparc where two C2 thread simultaneously
>> tries to load the hsdis library. Three of four code paths are locked by
>> the ttyLocker, but the fourth is open to races.
>>
>> Solution:
>> I chose to add another lock (mutex) for this purpose and adapted the
>> code so that library_load code works as intented.
>> - The old can_decode() method was removed and resued as an wrapper for
>> the load_library().
>> - Fixed a typo
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8148696
>> Webrev: http://cr.openjdk.java.net/~neliasso/8148696/webrev.01/
>>
>> Regards,
>> Nils Eliasson



More information about the hotspot-compiler-dev mailing list