[concurrency-interest] ReentrantLock bug?

Dmitry Zaslavsky dmitry.zaslavsky at gmail.com
Thu Mar 19 16:02:48 EDT 2015


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?




More information about the Concurrency-interest mailing list