Re: [squid-users] external_acl_type not working

From: Henrik Nordstrom <hno@dont-contact.us>
Date: 12 Mar 2003 15:31:04 +0100

Your Squid is not compiled with debugging so I cant tell what error you
are seeing but I suspect it is
http://www.squid-cache.org/Versions/v2/2.5/bugs/#squid-2.5.STABLE1-ext_acl_exit

And if it is this also explains why you are having intermittent problems
with your helper..

It appears the <STDIN> is sometimes aborted returning NULL in your
script. My guess is that this is caused by the signal handler making
perl confused about the operation of reading <STDIN>.

If

  while (defined ($input = <STDIN>))

fails when Squid has not really closed the connection to the helper then
it is a serious problem for the helper.

The same failure will be seen in

  $input = <STDIN>;

And will in your version of the script cause serious desyncronisation
between Squid and the helper, causing intermittent false responses
(usually rejects which should have been accepted, but the reverse is
also possible depending on timing). This because your script in such
case prints extra ERR responses even if no request really was received
from Squid.

Regards
Henrik

ons 2003-03-12 klockan 13.25 skrev TiloLutz@gmx.de:
> Hi
>
> > Your script still has a few bugs..
> Thank you for your help. It's a long time I've written my last small
> perl-skript.
>
> > 1. It never terminates when Squid tells it to.. the while loop should
> > read
> >
> > while ( defined ($input = <STDIN>)) {
> > }
> This will cause squid to crash:
> (squid)[0x80ad24e]
> /lib/libpthread.so.0[0x4016012b]
> /lib/libc.so.6[0x401e0d68]
> (squid)[0x8070dfb]
> (squid)[0x807da3e]
> (squid)[0x8067e6a]
> (squid)[0x8067fab]
> (squid)[0x8069b03]
> (squid)[0x808eff7]
> /lib/libc.so.6(__libc_start_main+0xa2)[0x401cf4a2]
> (squid)(SSL_write+0x65)[0x804b981]
> FATAL: Received Segment Violation...dying.
>
> It think I'll try something like:
>
> sig{HUP} = /&kill_sub;
> sub kill_sub;
> $kill =1;
> while ( 1 == $kill )
> {
> ...
> }
>
> sub kill_sub
> {
> $kill = 0;
> }
>
>
> Regards Tilo

-- 
Henrik Nordstrom <hno@squid-cache.org>
MARA Systems AB, Sweden
Received on Wed Mar 12 2003 - 07:31:10 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:14:02 MST