You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Rakesh R (JIRA)" <ji...@apache.org> on 2013/12/13 15:29:07 UTC

[jira] [Commented] (ZOOKEEPER-1839) Deadlock in NettyServerCnxn

    [ 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)