Hi Tianyin;
asserts are used to guard the code against logic errors; if they are
triggered in response to external input, then it is the result of a
bug showing up, not a normal response to that input.
The best way forward is to either to make the developers aware of this
or, even better, to file a bug in the squid Bugzilla database.
On Tue, Jan 8, 2013 at 9:33 AM, Tianyin Xu <tixu_at_cs.ucsd.edu> wrote:
> The patch looks good.
>
> An inexistant DNS name definitely should not crash the system by
> assertion failure. The good behavior is to tolerate the problem and
> print out the error log to notify the users. It's better to print out
> a message before simply return -1.
>
> Best,
> Tianyin
>
>
> On Mon, Jan 7, 2013 at 11:06 PM, Loïc BLOT <loic.blot_at_unix-experience.fr> wrote:
>> In my case, it seems the ASSERT is thrown when GetAddrInfo look at
>> inexistant DNS name. (in the backtrace the DNS name does'nt exists).
>> Before there is 2 conditions for IPv4 and IPv6. This function is called
>> before any helper i think (Comm::ConnOpener::start), squidGuard doesn't
>> show anything about this case in the logs.
>> One thing is sure, when i resolve this problem my squid doesn't crash
>> anymore, and my clients can work without any problem.
>> For asserts, i understand your view. In my case, i prefer to handle code
>> rather than force crash program, that's better for stability. I know
>> assert means the program comes to an unattended area.
>> Since this patch, squid stability is now perfect
>> 6104 _squid 2 0 3067M 3070M sleep/1 poll 20:53 0.73%
>> squid
>>
>> 20h uptime, 0 crash, whereas before 2 min only.
>> ~45000 requests were treated during uptime.
>> --
>> Cordialement,
>> Loïc BLOT, UNIX systems, security and network expert
>> http://www.unix-experience.fr
>>
>> Le mardi 08 janvier 2013 à 00:58 +0200, Eliezer Croitoru a écrit :
>>> I didn't had much time to look at the back-trace.
>>> Also I dont know what is your knowledge is about assert or other things.
>>> I dont know about this specific one but.. in most cases it's there for a
>>> reason.
>>> It's there to make an assessment about the state of the code.
>>> Maybe the server is not crashing but just me throwing an idea about
>>> maybe some of your clients getting the wrong content.
>>>
>>> So it's good..
>>> If for most users there is no problem there might be one that you have
>>> discovered but it might not be the case and you should try to start from
>>> ground up and not to just remove it.
>>>
>>> Have you tried without squidguard at all?
>>> maybe there is another bug that we should know about that this assert is
>>> about?
>>>
>>> I hope you will get more guidance about it from one of the core developers.
>>>
>>> Best regards,
>>> Eliezer
>>>
>>> On 1/7/2013 6:04 PM, Loïc Blot wrote:
>>> > Hello,
>>> > at first time, only 10 squidGuard helpers are used. Next i increase the
>>> > amount because i thought squid doesn't have so many helpers, to this
>>> > limit 150/192.
>>> > But it was a big crash. I have posted the crash datas and my fix on
>>> > bugzilla (now no crash since the fix). Assert is a bad thing :(.
>>> >
>>> > http://bugs.squid-cache.org/show_bug.cgi?id=3732
>>> >
>>>
>>>
>>
>
>
>
> --
> Tianyin XU,
> http://cseweb.ucsd.edu/~tixu/
-- /kinkieReceived on Tue Jan 08 2013 - 10:03:53 MST
This archive was generated by hypermail 2.2.0 : Tue Jan 08 2013 - 12:00:03 MST