You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Bhupendra Kumar Jain (JIRA)" <ji...@apache.org> on 2017/07/05 12:15:00 UTC

[jira] [Created] (ZOOKEEPER-2839) Race condition between AcceptThread and SelectorThread may allow connections beyond the max client connection limit

Bhupendra Kumar Jain created ZOOKEEPER-2839:
-----------------------------------------------

             Summary: Race condition between AcceptThread and SelectorThread may allow connections beyond the max client connection limit
                 Key: ZOOKEEPER-2839
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2839
             Project: ZooKeeper
          Issue Type: Bug
            Reporter: Bhupendra Kumar Jain


Race condition between AcceptThread and SelectorThread may allow connections beyond the max client connection limit 

As per current code in NIOServerCnxnFactory
1. AcceptThread checks for max connection limit , accept the connection and add to acceptedQueue.
2. Later selector thread will poll the accepted connection , adds the new connection to the connection map.

So if too many concurrent connection happening at same time from same client and Selector thread has not yet processed the already accepted connections from acceptedQueue, then AcceptThread will accept more connections beyond the limit as it still gets the less current connection count  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)