Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.6.3, 3.7.0, 3.8.0, 3.9.0
-
None
-
zookeeper 3.6.3
Description
if network service is unavailable, as "ifdown eth0" or "service network stop" and so on, zk-client process running on this node will experience fd leakage 。it happens for invoking "new Zookeeper(..)".
when network service is unavailable, ClientCnxn::SendThread::run() method will continuely do startConnect(),and suffer exception "SocketException: Network is unreachable". Exception handlers catch this exception and do SendThread::cleanup() to do some clean operation,but because in ClientCnxnSocketNIO::registerAndConnect method socket is registed to selector firstly and do sock.connect operation leading the fd of sock can't be closed.
Changing the order of sock.connect and sock.register can solve this issue,and it will not affect Original sense because of the sock.reister take effect when selector.select(waitTimeOut) is triggered
Attachments
Attachments
Issue Links
- links to