[squid-dev] [PATCH] FtpServer.cc:1024: "reply != NULL" assertion

Tsantilas Christos chtsanti at users.sourceforge.net
Wed Aug 19 10:26:09 UTC 2015


Patch applied to trunk as rev.14230

I am attaching the squid-3.5 version of the patch.

On 08/19/2015 08:56 AM, Amos Jeffries wrote:
> On 19/08/2015 4:08 a.m., Tsantilas Christos wrote:
>>
>> Handle nil HttpReply pointer inside various handlers called from
>> Ftp::Server::handleReply(). For example, when the related StoreEntry
>> object is aborted, the client_side_reply.cc code may call the
>> Ftp::Server::handleReply() method with a nil reply pointer.
>>
>> The Ftp::Server::handleReply() methods itself cannot handle nil replies
>> because they are valid in many states. Only state-specific handlers know
>> whether they need the reply.
>>
>> The Ftp::Server::handleReply() method is called [via Store] from Client
>> code. Thus, exceptions in handleReply() are handled by the Ftp::Client
>> job. That job does not have enough information to know whether the
>> client-to-Squid connection should be closed; the job keeps the
>> connection open. When the reply is nil, that open connection becomes
>> unusable, leading to more problems.
>>
>> This patch fixes the Ftp::Server::handleReply() to handle exceptions,
>> including closing the connections in the case of an exception. It also
>> adds Must(reply) checks to check for nil HttpReply pointers where the
>> reply is required. Eventually, Store should start using async calls to
>> protect jobs waiting for Store updates. Meanwhile, this should help.
>>
>> This is a Measurement Factory project.
>>
>
> +1. Please apply. Thank you.
>
> Amos
>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: Squid-Assertion-FtpServer_cc_1024-reply_neq_NULL-squid-3.5-t5.patch
Type: text/x-patch
Size: 10426 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20150819/41e77bcb/attachment-0001.bin>


More information about the squid-dev mailing list