[concurrency-interest] ReentrantLock bug?

Dmitry Zaslavsky dmitry.zaslavsky at gmail.com
Thu Mar 19 16:54:15 EDT 2015


I'll try asking for later jdk but it's not under my control :(

Would you happen to know of any relevant specific changes

Thanks

Sent from mobile device

> On Mar 19, 2015, at 4:32 PM, Aleksey Shipilev <aleksey.shipilev at oracle.com> wrote:
> 
>> On 03/19/2015 11:02 PM, Dmitry Zaslavsky wrote:
>> Apologies for such a silly report / question.
>> 
>>    I have an application that out 100s of machines, every couple of runs would get into a state that’s only possible if ReentrantLock has a bug.
>>    While it would be hard to repro locally. On the grid it’s quite easy to repeat.
>>    Of course it’s possible I am doing something something very wrong.
>>    One time I saw RL in a locked state but the owner was null.
>>    I replaced all the uses of _lock.lock() try {} finally { _lock.unlock(); } with synchronized(_lock) and the problem went away.
>> 
>>   Still using jdk 7 u21
>>   Any suggestions?
> 
> The usual things:
> 
> a) Update the JDK to at least 7u40 (or even better, JDK 8u40);
> b) -Xbootclasspath/p: the latest jsr166.jar (only works with JDK 8, I
> think);
> 
> We have experimental RL tests in jcstress [1], you may want to try those
> on your target machines.
> 
> -Aleksey.
> 
> [1]
> http://hg.openjdk.java.net/code-tools/jcstress/file/5fcd4f948639/tests-custom/src/main/java/org/openjdk/jcstress/tests/locks
> 
> 



More information about the Concurrency-interest mailing list