XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.6.3, 3.7.0, 3.8.0, 3.9.0
    • None
    • java client, server
    • 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

        1. IMG_20230815_114433.jpg
          234 kB
          lchq
        2. a632150451be7e6648702326e9b216c9.jpg
          257 kB
          lchq
        3. 4cea510a57af58c08e73d146e8535ee4.jpg
          311 kB
          lchq

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lchq lchq
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m