[concurrency-interest] ReentrantLock bug?

Dr Heinz M. Kabutz heinz at javaspecialists.eu
Thu Mar 19 17:34:00 EDT 2015


The initial discovery was shown here: https://github.com/rafaelbrandao/msc

Regards

Heinz
-- 
Dr Heinz M. Kabutz (PhD CompSci)
Author of "The Java(tm) Specialists' Newsletter"
Sun/Oracle Java Champion since 2005
JavaOne Rock Star Speaker 2012
http://www.javaspecialists.eu
Tel: +30 69 75 595 262
Skype: kabutz



Dr Heinz M. Kabutz wrote:
> Hi Dmitry,
>
> is it possible to send me a sanitized stack trace of what state the 
> thread would be in if RL caused a hang?  Someone reported a very 
> strange behaviour a long time ago on Linux with JDK 7, where you could 
> sometimes get a thread that was waiting for a lock, even though it was 
> Unlocked.  The lock they used was a direct copy of ReentrantLock, with 
> the only difference being that it had been not been loaded in the 
> system class loader.  I managed to reproduce it, although not sure of 
> the exact version of Java 7.  After several day of chasing it, I ran 
> out of time and left it, but I've always had the niggling suspicion 
> that it might be a bug that lives fine and well in the ReentrantLock.
>
> This was for Java 1.7.0_40, -server.  I thus do not share Aleksey's 
> optimism that moving over to that version is going to make the problem 
> go away.  I could not reproduce it on 1.8, but that might have just 
> been a coincidence.  It was quite difficult to reproduce.
>
> BTW, not a silly report / question at all.  Very important indeed, 
> especially considering how many classes in JDK use ReentrantLock 
> internally :-(((
>
> Regards
>
> Heinz


More information about the Concurrency-interest mailing list