JPPF Issue Tracker
star_faded.png
Please log in to bookmark issues
bug_report_small.png
CLOSED  Bug report JPPF-525  -  Deadlock in the driver during automated test run
Posted Jan 13, 2018 - updated Jan 17, 2018
icon_info.png This issue has been closed with status "Closed" and resolution "RESOLVED".
Issue details
  • Type of issue
    Bug report
  • Status
     
    Closed
  • Assigned to
     lolo4j
  • Progress
       
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     lolo4j
  • Owned by
    Not owned by anyone
  • Category
    Server
  • Resolution
    RESOLVED
  • Priority
    High
  • Reproducability
    Rarely
  • Severity
    Critical
  • Targetted for
    icon_milestones.png JPPF 5.2.9
Issue description
During the run of the tests for test.org.jppf.client.event.TestJobListener on 5.2.8, the following deadlock was detected:
- thread id 23 "JPPF NIO-0004" is waiting to lock java.util.concurrent.locks.ReentrantLock$NonfairSync@6c452fb4 which is held by thread id 20 "JPPF NIO-0001"
- thread id 20 "JPPF NIO-0001" is waiting to lock java.util.concurrent.locks.ReentrantLock$NonfairSync@71183515 which is held by thread id 23 "JPPF NIO-0004"
 
Stack trace information for the threads listed above
 
"JPPF NIO-0004" - 23 - state: WAITING - blocked count: 3 - blocked time: 0 - wait count: 33 - wait time: 11618
  at sun.misc.Unsafe.park(Native Method)
  - waiting on java.util.concurrent.locks.ReentrantLock$NonfairSync@6c452fb4
  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.jppf.server.protocol.AbstractServerJobBase.addBundle(AbstractServerJobBase.java:229)
  at org.jppf.server.queue.JPPFPriorityQueue.addBundle(JPPFPriorityQueue.java:121)
  at org.jppf.server.nio.client.WaitingJobState.performTransition(WaitingJobState.java:88)
  at org.jppf.server.nio.client.WaitingJobState.performTransition(WaitingJobState.java:34)
  at org.jppf.nio.StateTransitionTask.run(StateTransitionTask.java:78)
  - locked org.jppf.nio.SelectionKeyWrapper@158778fd
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
  at java.util.concurrent.FutureTask.run(FutureTask.java:262)
  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)
 
  Locked ownable synchronizers:
  - java.util.concurrent.locks.ReentrantLock$NonfairSync@71183515
  - java.util.concurrent.ThreadPoolExecutor$Worker@6524a69
 
"JPPF NIO-0001" - 20 - state: WAITING - blocked count: 7 - blocked time: 1 - wait count: 32 - wait time: 11579
  at sun.misc.Unsafe.park(Native Method)
  - waiting on java.util.concurrent.locks.ReentrantLock$NonfairSync@71183515
  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.jppf.server.queue.JPPFPriorityQueue.getJob(JPPFPriorityQueue.java:286)
  at org.jppf.server.queue.JPPFPriorityQueue.getBundleForJob(JPPFPriorityQueue.java:371)
  at org.jppf.server.nio.client.CompletionListener.removeJobFromQueue(CompletionListener.java:121)
  at org.jppf.server.nio.client.CompletionListener.taskCompleted(CompletionListener.java:74)
  at org.jppf.server.protocol.ServerTaskBundleClient.fireTasksCompleted(ServerTaskBundleClient.java:361)
  at org.jppf.server.protocol.ServerTaskBundleClient.resultReceived(ServerTaskBundleClient.java:218)
  at org.jppf.server.protocol.ServerJob.resultsReceived(ServerJob.java:139)
  at org.jppf.server.protocol.ServerTaskBundleNode.resultsReceived(ServerTaskBundleNode.java:197)
  at org.jppf.server.protocol.ServerJob.handleCancelledStatus(ServerJob.java:241)
  at org.jppf.server.protocol.ServerJob.cancel(ServerJob.java:276)
  at org.jppf.server.nio.client.ClientContext.cancelJobOnClose(ClientContext.java:279)
  at org.jppf.server.nio.client.ClientContext.handleException(ClientContext.java:121)
  at org.jppf.nio.StateTransitionTask.run(StateTransitionTask.java:94)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
  at java.util.concurrent.FutureTask.run(FutureTask.java:262)
  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)
 
  Locked ownable synchronizers:
  - java.util.concurrent.locks.ReentrantLock$NonfairSync@6c452fb4
  - java.util.concurrent.ThreadPoolExecutor$Worker@69663655
Attaching the whole logs zip for this test run.
Steps to reproduce this issue
This issue occurs when the server is receiving a job and at the same time the client connection which submits the job is closed

#2
Comment posted by
 lolo4j
Jan 13, 08:09
A file was uploaded. Test logs and artifactsicon_open_new.png
#6
Comment posted by
 lolo4j
Jan 17, 08:21
Fixed in: