1. 07 May, 2019 12 commits
  2. 06 May, 2019 9 commits
  3. 02 May, 2019 2 commits
  4. 26 Apr, 2019 11 commits
  5. 25 Apr, 2019 6 commits
    • Ondřej Surý's avatar
      Merge branch '615-tcp-client-crash-v9_14-master' into 'master' · 2c85466c
      Ondřej Surý authored
      Resolve "tcp-clients mostly ineffective"
      
      Closes #615
      
      See merge request isc-projects/bind9!1871
      2c85466c
    • Evan Hunt's avatar
      CHANGES, release note · 4551c58e
      Evan Hunt authored
      (cherry picked from commit 244e44af432121a05e0a308b7ccce96a8ecd28ab)
      (cherry picked from commit 79fad84b)
      4551c58e
    • Evan Hunt's avatar
      restore allowance for tcp-clients < interfaces · d809ec6c
      Evan Hunt authored
      in the "refactor tcpquota and pipeline refs" commit, the counting
      of active interfaces was tightened in such a way that named could
      fail to listen on an interface if there were more interfaces than
      tcp-clients. when checking the quota to start accepting on an
      interface, if the number of active clients was above zero, then
      it was presumed that some other client was able to handle accepting
      new connections. this, however, ignored the fact that the current client
      could be included in that count, so if the quota was already exceeded
      before all the interfaces were listening, some interfaces would never
      listen.
      
      we now check whether the current client has been marked active; if so,
      then the number of active clients on the interface must be greater
      than 1, not 0.
      
      (cherry picked from commit 02365b87ea0b1ea5ea8b17376f6734c811c95e61)
      (cherry picked from commit cae79e1b)
      d809ec6c
    • Evan Hunt's avatar
      refactor tcpquota and pipeline refs; allow special-case overrun in isc_quota · 2f3876d1
      Evan Hunt authored
      - if the TCP quota has been exceeded but there are no clients listening
        for new connections on the interface, we can now force attachment to the
        quota using isc_quota_force(), instead of carrying on with the quota not
        attached.
      - the TCP client quota is now referenced via a reference-counted
        'ns_tcpconn' object, one of which is created whenever a client begins
        listening for new connections, and attached to by members of that
        client's pipeline group. when the last reference to the tcpconn
        object is detached, it is freed and the TCP quota slot is released.
      - reduce code duplication by adding mark_tcp_active() function
      - convert counters to stdatomic
      
      (cherry picked from commit a8dd133d270873b736c1be9bf50ebaa074f5b38f)
      (cherry picked from commit 4a8fc979)
      2f3876d1
    • Evan Hunt's avatar
      better tcpquota accounting and client mortality checks · a0f4a3fa
      Evan Hunt authored
      - ensure that tcpactive is cleaned up correctly when accept() fails.
      - set 'client->tcpattached' when the client is attached to the tcpquota.
        carry this value on to new clients sharing the same pipeline group.
        don't call isc_quota_detach() on the tcpquota unless tcpattached is
        set.  this way clients that were allowed to accept TCP connections
        despite being over quota (and therefore, were never attached to the
        quota) will not inadvertently detach from it and mess up the
        accounting.
      - simplify the code for tcpquota disconnection by using a new function
        tcpquota_disconnect().
      - before deciding whether to reject a new connection due to quota
        exhaustion, check to see whether there are at least two active
        clients. previously, this was "at least one", but that could be
        insufficient if there was one other client in READING state (waiting
        for messages on an open connection) but none in READY (listening
        for new connections).
      - before deciding whether a TCP client object can to go inactive, we
        must ensure there are enough other clients to maintain service
        afterward -- both accepting new connections and reading/processing new
        queries.  A TCP client can't shut down unless at least one
        client is accepting new connections and (in the case of pipelined
        clients) at least one additional client is waiting to read.
      
      (cherry picked from commit 427a2fb4d17bc04ca3262f58a9dcf5c93fc6d33e)
      (cherry picked from commit 08968412)
      a0f4a3fa
    • Michał Kępień's avatar
      use reference counter for pipeline groups (v3) · 3c0f8d91
      Michał Kępień authored
      Track pipeline groups using a shared reference counter
      instead of a linked list.
      
      (cherry picked from commit 31f392db20207a1b05d6286c3c56f76c8d69e574)
      (cherry picked from commit 22111202)
      3c0f8d91