Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-4755

TransactionLockInterceptor deadlock

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • jBPM 6.3.0.Final
    • jBPM 6.3.0.CR2
    • Runtime Engine
    • None
    • NEW
    • NEW

      Under the conditions:

      you will hit a deadlock like this.

      Found one Java-level deadlock:
      =============================
      "pool-4-thread-2":
        waiting for ownable synchronizer 0x00000007b0bb32c8, (a java.util.concurrent.locks.ReentrantLock$NonfairSync),
        which is held by "pool-4-thread-1"
      "pool-4-thread-1":
        waiting to lock monitor 0x00007f9598b1e9f8 (object 0x00000007af6ffad0, a org.drools.persistence.SingleSessionCommandService),
        which is held by "pool-4-thread-2"
      
      Java stack information for the threads listed above:
      ===================================================
      "pool-4-thread-2":
      	at sun.misc.Unsafe.park(Native Method)
      	- parking to wait for  <0x00000007b0bb32c8> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
      	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:867)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1197)
      	at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:214)
      	at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:290)
      	at org.drools.persistence.jta.TransactionLockInterceptor.execute(TransactionLockInterceptor.java:81)
      	at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:377)
      	- locked <0x00000007af6ffad0> (a org.drools.persistence.SingleSessionCommandService)
      	at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.getProcessInstance(CommandBasedStatefulKnowledgeSession.java:120)
      	at com.sample.ProcessJPATest$1.run(ProcessJPATest.java:124)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      "pool-4-thread-1":
      	at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:377)
      	- waiting to lock <0x00000007af6ffad0> (a org.drools.persistence.SingleSessionCommandService)
      	at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.getProcessInstance(CommandBasedStatefulKnowledgeSession.java:120)
      	at com.sample.ProcessJPATest$1.run(ProcessJPATest.java:130)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      
      Found 1 deadlock.
      

      Attached a reproducer TransactionLockInterceptor.zip (mvn clean test).

              swiderski.maciej Maciej Swiderski (Inactive)
              rhn-support-tkobayas Toshiya Kobayashi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: