]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Squid-to-client write_timeout triggers client_lifetime timeout (#747)
authorAlex Rousskov <rousskov@measurement-factory.com>
Sun, 8 Nov 2020 17:50:03 +0000 (17:50 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Tue, 10 Nov 2020 17:19:34 +0000 (17:19 +0000)
Since commit 5ef5e5c, a socket write timeout triggers two things:
* reporting of a write error to the socket writer (as designed/expected)
* reporting of a socket read timeout to the socket reader (unexpected).

The exact outcome probably depends on the transaction state, but one
known manifestation of this bug is the following level-1 message in
cache.log, combined with an access.log record showing a
much-shorter-than-client_lifetime transaction response time.

    WARNING: Closing client connection due to lifetime timeout

src/comm.cc

index b0404d127fa2097123cdf7a7a94f45880441acd5..e49268ddae28fd62fe376b8b02110832031c67a3 100644 (file)
@@ -1607,6 +1607,7 @@ checkTimeouts(void)
             Comm::SetSelect(fd, COMM_SELECT_WRITE, NULL, NULL, 0);
             COMMIO_FD_WRITECB(fd)->finish(Comm::COMM_ERROR, ETIMEDOUT);
             CodeContext::Reset();
+            continue;
 #if USE_DELAY_POOLS
         } else if (F->writeQuotaHandler != nullptr && COMMIO_FD_WRITECB(fd)->conn != nullptr) {
             // TODO: Move and extract quota() call to place it inside F->codeContext.