Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-562

c client can flood server with pings if tcp send queue filled

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 3.2.1
    • 3.1.2, 3.2.2, 3.3.0
    • c client
    • None
    • Reviewed
    • Hide
      Basically the problem here is that the client gets confused, it tries to send a ping to the server but since the tcp queue is full it's unable to do so. The logic responsible for sending occasional pings based on the timeout gets confused by this, and ends up flooding the server with pings. Eventually this clears up, however it can result in increased load on the server and instability for the effected client.
      Show
      Basically the problem here is that the client gets confused, it tries to send a ping to the server but since the tcp queue is full it's unable to do so. The logic responsible for sending occasional pings based on the timeout gets confused by this, and ends up flooding the server with pings. Eventually this clears up, however it can result in increased load on the server and instability for the effected client.

    Description

      The c client can flood the server with pings if the tcp queue is filled.

      Say the cluster is overloaded and shuts down the recv processing

      a c client can send a ping, but since last_send is only updated on successful pushing of data into the
      socket, if flush_send_queue fails to send any data (send_buffer returns 0) then last_send is not updated
      and zookeeper_interest will again send a ping the next time it is woken - which could be 0 if recv_to is close
      to 0, easily could happen if server is not sending data to the client.

      Attachments

        1. ZOOKEEPER-562.patch
          3 kB
          Benjamin Reed

        Activity

          People

            breed Benjamin Reed
            phunt Patrick D. Hunt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: