[concurrency-interest] ReentrantLock bug?

Dr Heinz M. Kabutz heinz at javaspecialists.eu
Thu Mar 19 18:15:21 EDT 2015


I boiled it down to whether AQS was loaded in the boot class loader or
not.  Go figure. But as I said, I ran out of time to look at it more.

Heinz

On Friday, 20 March 2015, Vitaly Davidovich <vitalyd at gmail.com> wrote:

> Hmm, the symptoms seem very similar to the set of bugs (should've been
> fixed by 7u21 time though, AFAIR) that were filed due to missing barriers
> in the native Parker class.  In those cases, -XX:+UseMembar masked the
> problem and things worked -- has that been tried with the copy of RL?
>
> Also, what exactly are the differences between the JDK RL and the "nearly
> unmodified" one?
>
> On Thu, Mar 19, 2015 at 5:34 PM, Dr Heinz M. Kabutz <
> heinz at javaspecialists.eu
> <javascript:_e(%7B%7D,'cvml','heinz at javaspecialists.eu');>> wrote:
>
>> 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
>>>
>> _______________________________________________
>> Concurrency-interest mailing list
>> Concurrency-interest at cs.oswego.edu
>> <javascript:_e(%7B%7D,'cvml','Concurrency-interest at cs.oswego.edu');>
>> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
>>
>
>

-- 
Dr Heinz M. Kabutz (PhD CompSci)
Author of "The Java(tm) Specialists' Newsletter"
Sun/Oracle Java Champion
JavaOne Rockstar Speaker
http://www.javaspecialists.eu
Tel: +30 69 75 595 262
Skype: kabutz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20150320/7f76e327/attachment.html>


More information about the Concurrency-interest mailing list