]> git.ipfire.org Git - thirdparty/squid.git/commit
Bug 4464: Reduce "!Comm::MonitorsRead(serverConnection->fd)" assertions.
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Sat, 1 Jul 2017 06:17:18 +0000 (18:17 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 1 Jul 2017 06:17:18 +0000 (18:17 +1200)
commitaf6f9f64c616d8efca2ea35ca70f274c42d0281c
tree3974eedf15ed4ad3e5cdae8c75e5da44c2edf6cf
parent6686299e0545cba6edcf75427f52a6dc1361f5c0
Bug 4464: Reduce "!Comm::MonitorsRead(serverConnection->fd)" assertions.

* Protect Squid Client classes from new requests that compete with
  ongoing pinned connection use and
* resume dealing with new requests when those Client classes are done
  using the pinned connection.

Replaced primary ConnStateData::pinConnection() calls with a pair of
pinBusyConnection() and notePinnedConnectionBecameIdle() calls,
depending on the pinned connection state ("busy" or "idle").

Removed pinConnection() parameters that were not longer used or could be computed from the remaining parameters.

Removed ConnStateData::httpsPeeked() code "hiding" the originating
request and connection peer details while entering the first "idle"
state. The old (trunk r11880.1.6) bump-server-first code used a pair of
NULLs because "Intercepted connections do not have requests at the
connection pinning stage", but that limitation no longer applicable
because Squid always fakes (when intercepting) or parses (a CONNECT)
request now, even during SslBump step1.

The added XXX and TODOs are not directly related to this fix. They
were added to document problems discovered while working on this fix.

In v3.5 code, the same problems manifest as Read.cc
"fd_table[conn->fd].halfClosedReader != NULL" assertions.

This is a Measurement Factory project
src/FwdState.cc
src/base/RefCount.h
src/client_side.cc
src/client_side.h
src/clients/FtpRelay.cc
src/http.cc
src/servers/FtpServer.cc
src/tests/stub_client_side.cc