[squid-users] Survey on assertions: When the impossible happens
Yuri Voinov
yvoinov at gmail.com
Mon Feb 29 17:28:39 UTC 2016
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
29.02.16 23:22, Marcus Kool пишет:
>
>> * Choices.
>>
>> Overall, there are three options for handling an impossible situation:
>>
>> 1. Quit Squid process. This is what Squid does today in most cases.
>> When the impossible happens, you get a crash. Very predictable.
>> No malformed/corrupted/misleading HTTP messages (some are truncated).
>> No memory leaks.
>>
>> 2. Quit the current processing sequence but keep Squid process running,
>> assuming that [most] other processing sequences are not affected.
>> [If you are familiar with programming, this is done by throwing
>> exceptions instead of asserting and catching those exceptions at
>> "processing sequence" boundaries].
>>
>> 3. Keep executing the current processing sequence, assuming that the
>> assertion was wrong or unimportant. This is what you might be
>> suggesting above. When the impossible happens, you may get a crash,
>> memory leaks, malformed/corrupted/misleading HTTP messages, or normal
>> behavior, depending on the assertion and traffic.
>>
>> IMO, we should make #2 the default, but make the choice between all
>> three options configurable by the admin (without recompiling Squid).
>
> Let me suggest #4 :
>
> immediately execute an external program that calls gdb or any other
debugger
> which produces a stack trace of all squid processes and then do #1 or #2.
>
> The stack dumps will be save in an assertion failure log file which admins
> can send to Squid developers.
>
> This will speedup the debugging and fixing procedure.
>
> Finally, there must be a mechanism that warns admins that an assertion
failure
> happened. This is not trivial since an admin does not look every day
> in the squid log file.
Hmmmmmmm...... some shell scripting+cron+sendmail can't save the giants
of thought? ;)
>
> Marcus
> _______________________________________________
> squid-users mailing list
> squid-users at lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-users
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQEcBAEBCAAGBQJW1H/HAAoJENNXIZxhPexGBFoIAJ18PCwyDrYsR0UPuVGSP5xA
4rNBiZfjA0WFU2Ug7FFDBkL2XkuLjktt7ftPPLuTIVhCQujk0e99ZaWX2FBGTMts
hNtIGIS0rysU0oWvXGl5f9w7WJqKYpiRmEThRGGIinsoqouOmKgv9q7AoFnKsSUi
dKD2ISdtX+Gm13m3dZz+MANltChnN37ZXONbO3Vf/YG1l/9g4S6S1xfyiMJiLLTU
NOvXFYGCbTTRIH13D9QATVeGpP9fSSLDAUtTd+z5yEDsGpfcXdi+6+1tCvheiLtA
0hqCmWqU0sKKLHumD70bGkMTLMx+F6CPSaXGxOONPAjZaLwCXk4PyHxUp/m+ofo=
=OlJi
-----END PGP SIGNATURE-----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20160229/f4d436ab/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x613DEC46.asc
Type: application/pgp-keys
Size: 2437 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20160229/f4d436ab/attachment.key>
More information about the squid-users
mailing list