[squid-dev] [PATCH] Bug3329

Amos Jeffries squid3 at treenet.co.nz
Tue May 26 07:59:26 UTC 2015

On 26/05/2015 12:43 a.m., Tsantilas Christos wrote:
> On 05/25/2015 02:37 PM, Amos Jeffries wrote:
>> On 25/05/2015 10:13 p.m., Tsantilas Christos wrote:
>>> Hi all,
>>>    I am attaching new squid patches for bug3329.
>> +1 on the conversion of comm_close() to X->close()
>> However please name the noteClsure() as noteClosureXXX() to highlight
>> that this function is undesirable and we need to fix the underlying
>> problem still for the places which find themselves having to use it
> The suggestion of this patch is to start use the noteClosure method to
> all comm_close handlers to avoid such problems.
> The problem is not appears only when the comm_close method on fds is
> used. We may face the same problem when a timeout is expired but not a
> timeout-handler is installed for the fd. In this case squid code will
> just close the fd. Still some Comm::Connection objects may use the fd,
> but not informed about the fd closure.

A better long term way would be the comm FD opening code to install the
first close callback that hold reference to the Comm::Connection and
sets the FD to -1 when its closed without close().

We cant do that until those "abandoned" and "orphan" connections are all
figured out though. So we dont end up with that close handler being a
lingering reference-count that holds all the state alive.

So I agree this method is needed right now, but only as a temporary fix.


More information about the squid-dev mailing list