[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13847519#comment-13847519
 ] 

Rakesh R commented on ZOOKEEPER-1839:
-------------------------------------

>From threaddump, it seems the deadlock is occuring in following way:

NettyServerCnxn -> sendCloseSession
When closing it got an exception and invokes 
CnxnChannelHandler#exceptionCaught, this will acquire 'factory.cnxns' and call 
NioWorker#close. Now closure will try to acquire 'channels lock'

NioWorker -> writeFromTaskLoop
Here NioWorker has acquired 'channels lock' and fireExceptionCaught. Now, 
exceptionCaught will be calling NettyServerCnxn#close() and try to acquire lock 
on 'factory.cnxns'

> Deadlock in NettyServerCnxn
> ---------------------------
>
>                 Key: ZOOKEEPER-1839
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1839
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.4.5
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>            Priority: Critical
>         Attachments: zk_threaddump-cnxn-closure.txt
>
>
> Deadlock found during NettyServerCnxn closure. Please see the attached 
> threaddump.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to