2 Replies Latest reply: Oct 12, 2012 11:51 AM by 968039 RSS

    ReentrantLock is missing wake signals resulting in a deadlock

    960946
      We are hitting an issue with ReentrantLock where it is missing the awake signal resulting in a deadlock. Here is the thread dump for the same. As you can see, Thread-55 is blocked on acquiring the lock, which is not locked by any other thread. This issue is very similar to
      http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6822370 which happens in Sunspot JVM.

      "Thread-55" id=143 idx=0x2a4 tid=9388 prio=5 alive, parked, native_blocked
      -- Parking to wait for: java/util/concurrent/locks/ReentrantLock$NonfairSync@0x00000001A21AC9A8
      at jrockit/vm/Locks.park0(J)V(Native Method)
      at jrockit/vm/Locks.park(Locks.java:2230)[inlined]
      at jrockit/proxy/sun/misc/Unsafe.park(Unsafe.java:616)[inlined]
      at java/util/concurrent/locks/LockSupport.park(LockSupport.java:156)[inlined]
      at java/util/concurrent/locks/AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)[inlined]
      at java/util/concurrent/locks/AbstractQueuedSynchronizer.doAcquireInterruptibly(AbstractQueuedSynchronizer.java:867)[inlined]
      at java/util/concurrent/locks/AbstractQueuedSynchronizer.acquireInterruptibly(AbstractQueuedSynchronizer.java:1201)[inlined]
      at java/util/concurrent/locks/ReentrantLock.lockInterruptibly(ReentrantLock.java:312)[inlined]
      at java/util/concurrent/LinkedBlockingQueue.take(LinkedBlockingQueue.java:396)[optimized]
      at java/util/concurrent/ExecutorCompletionService.take(ExecutorCompletionService.java:164)[inlined]
      at com/teneo/esa/common/textengine/expander/StemIndexManager.isStemPresent(StemIndexManager.java:1345)[optimized]
      at com/teneo/esa/common/textengine/expander/StemIndexManager.buildStemIndex(StemIndexManager.java:425)[optimized]
      at com/teneo/esa/common/textengine/expander/StemIndexManager.buildStemIndex(StemIndexManager.java:825)
      at com/teneo/esa/analytics/stemindex/StemIndexAnalyticsImpl.process(StemIndexAnalyticsImpl.java:155)
      at com/teneo/esa/analytics/stemindex/StemIndexAnalyticsService$1.run(StemIndexAnalyticsService.java:128)
      at jrockit/vm/RNI.c2java(JJJJJ)V(Native Method)
      -- end of trace

      "pool-7-thread-1" id=170 idx=0x310 tid=5524 prio=5 alive, parked, native_blocked
      -- Parking to wait for: java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject@0x00000001D2094E90
      at jrockit/vm/Locks.park0(J)V(Native Method)
      at jrockit/vm/Locks.park(Locks.java:2230)[inlined]
      at jrockit/proxy/sun/misc/Unsafe.park(Unsafe.java:616)[inlined]
      at java/util/concurrent/locks/LockSupport.park(LockSupport.java:156)[inlined]
      at java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)[optimized]
      at java/util/concurrent/LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)[optimized]
      at java/util/concurrent/ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)[optimized]
      at java/util/concurrent/ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java/lang/Thread.run(Thread.java:662)
      at jrockit/vm/RNI.c2java(JJJJJ)V(Native Method)
      -- end of trace

      "pool-7-thread-2" id=171 idx=0x314 tid=15588 prio=
      2012-10-04 13:18:37,908 INFO [STDOUT] (RMI TCP Connection(1465)-10.65.59.167:) 5 alive, parked, native_blocked
      -- Parking to wait for: java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject@0x00000001D2094E90
      at jrockit/vm/Locks.park0(J)V(Native Method)
      at jrockit/vm/Locks.park(Locks.java:2230)[inlined]
      at jrockit/proxy/sun/misc/Unsafe.park(Unsafe.java:616)[inlined]
      at java/util/concurrent/locks/LockSupport.park(LockSupport.java:156)[inlined]
      at java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)[optimized]
      at java/util/concurrent/LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)[optimized]
      at java/util/concurrent/ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)[optimized]
      at java/util/concurrent/ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java/lang/Thread.run(Thread.java:662)
      at jrockit/vm/RNI.c2java(JJJJJ)V(Native Method)
      -- end of trace

      "pool-7-thread-3" id=172 idx=0x318 tid=6056 prio=5 alive, parked, native_blocked
      -- Parking to wait for: java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject@0x00000001D2094E90
      at jrockit/vm/Locks.park0(J)V(Native Method)
      at jrockit/vm/Locks.park(Locks.java:2230)[inlined]
      at jrockit/proxy/sun/misc/Unsafe.park(Unsafe.java:616)[inlined]
      at java/util/concurrent/locks/LockSupport.park(LockSupport.java:156)[inlined]
      at java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)[optimized]
      at java/util/concurrent/LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)[optimized]
      at java/util/concurrent/ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)[optimized]
      at java/util/concurrent/ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java/lang/Thread.run(Thread.java:662)
      at jrockit/vm/RNI.c2java(JJJJJ)V(Native Method)
      -- end of trace

      "pool-7-thread-4" id=173 idx=0x31c tid=6312 prio=5 alive, parked, native_blocked
      -- Parking to wait for: java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject@0x00000001D2094E90
      at jrockit/vm/Locks.park0(J)V(Native Method)
      at jrockit/vm/Locks.park(Locks.java:2230)[inlined]
      at jrockit/proxy/sun/misc/Unsafe.park(Unsafe.java:616)[inlined]
      at java/util/concurrent/locks/LockSupport.park(LockSupport.java:156)[inlined]
      at java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)[optimized]
      at java/util/concurrent/LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)[optimized]
      at java/util/concurrent/ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)[optimized]
      at java/util/concurrent/ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java/lang/Thread.run(Thread.java:662)
      at jrockit/vm/RNI.c2java(JJJJJ)V(Native Method)
      -- end of trace

      "pool-7-thread-5" id=174 idx=0x320 tid=15132 prio=5 alive, parked, native_blocked
      -- Parking to wait for: java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject@0x00000001D2094E90
      at jrockit/vm/Locks.park0(J)V(Native Method)
      at jrockit/vm/Locks.park(Locks.java:2230)[inlined]
      at jrockit/proxy/sun/misc/Unsafe.park(Unsafe.java:616)[inlined]
      at java/util/concurrent/locks/LockSupport.park(LockSupport.java:156)[inlined]
      at java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)[optimized]
      at java/util/concurrent/LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)[optimized]
      at java/util/concurrent/ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)[optimized]
      at java/util/concurrent/ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java/lang/Thread.run(Thread.java:662)
      at jrockit/vm/RNI.c2java(JJJJJ)V(Native Method)
      -- end of trace

      "pool-7-thread-6" id=175 idx=0x324 tid=10636 prio=5 alive, parked, native_blocked
      -- Parking to wait for: java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject@0x00000001D2094E90
      at jrockit/vm/Locks.park0(J)V
      2012-10-04 13:18:37,908 INFO [STDOUT] (RMI TCP Connection(1465)-10.65.59.167:) (Native Method)
      at jrockit/vm/Locks.park(Locks.java:2230)[inlined]
      at jrockit/proxy/sun/misc/Unsafe.park(Unsafe.java:616)[inlined]
      at java/util/concurrent/locks/LockSupport.park(LockSupport.java:156)[inlined]
      at java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)[optimized]
      at java/util/concurrent/LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)[optimized]
      at java/util/concurrent/ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)[optimized]
      at java/util/concurrent/ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java/lang/Thread.run(Thread.java:662)
      at jrockit/vm/RNI.c2java(JJJJJ)V(Native Method)
      -- end of trace

      "pool-7-thread-7" id=176 idx=0x328 tid=17820 prio=5 alive, parked, native_blocked
      -- Parking to wait for: java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject@0x00000001D2094E90
      at jrockit/vm/Locks.park0(J)V(Native Method)
      at jrockit/vm/Locks.park(Locks.java:2230)[inlined]
      at jrockit/proxy/sun/misc/Unsafe.park(Unsafe.java:616)[inlined]
      at java/util/concurrent/locks/LockSupport.park(LockSupport.java:156)[inlined]
      at java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)[optimized]
      at java/util/concurrent/LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)[optimized]
      at java/util/concurrent/ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)[optimized]
      at java/util/concurrent/ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java/lang/Thread.run(Thread.java:662)
      at jrockit/vm/RNI.c2java(JJJJJ)V(Native Method)
      -- end of trace

      "pool-7-thread-8" id=177 idx=0x32c tid=6516 prio=5 alive, parked, native_blocked
      -- Parking to wait for: java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject@0x00000001D2094E90
      at jrockit/vm/Locks.park0(J)V(Native Method)
      at jrockit/vm/Locks.park(Locks.java:2230)[inlined]
      at jrockit/proxy/sun/misc/Unsafe.park(Unsafe.java:616)[inlined]
      at java/util/concurrent/locks/LockSupport.park(LockSupport.java:156)[inlined]
      at java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)[optimized]
      at java/util/concurrent/LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)[optimized]
      at java/util/concurrent/ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)[optimized]
      at java/util/concurrent/ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java/lang/Thread.run(Thread.java:662)
      at jrockit/vm/RNI.c2java(JJJJJ)V(Native Method)
      -- end of trace

      Environment:
      VM Version: Jrockit R28.2.3
      JDK: 1.6.0_31
      OS: Windows 2008

      Let me know if you need any details.

      Thanks,
      Snehal

      Edited by: 957943 on Oct 4, 2012 11:38 AM