Re: [BUG] (13) Permission denied with workers | squid 3.2.3 and 3.3 rev 12500.

2012-12-07 Thread Henrik Nordström
tor 2012-12-06 klockan 21:54 +0200 skrev Eliezer Croitoru:
 On cache log I am getting these:
 2012/12/06 21:34:29.780 kid3| commBind: Cannot bind socket FD 10 to 
 [::]: (13) Permission denied

Odd.. the debug output indicates this is a request for assigning an
ipv6:port.

What do strace say?

 Since there are more users with workers out there, they dont have this 
 issue?

I have some issues with workers, but have not seen this issue.

Regards
Henrik



Re: [PATCH] Re: Helpers parse response bug

2012-12-07 Thread Amos Jeffries

On 5/12/2012 1:59 p.m., Amos Jeffries wrote:


 1a) a layering issue between helperHandleRead() and 
helperReturnBuffer(). helperReturnBuffer is only dealing with the 
message sub-string, but has been made to memmove() the buffer contents 
which means it has to become aware of these problematic terminal \0 
octet(s). However helperHandleRead() is where the termination is being 
done and the buffer information is all being handled.

 - need to do the memmove() in helperHandleRead()

 1b) helpers which return \r\n are still passed the location of the \n 
as endpoint to workaround (1a) even though the \r is also replaced 
with \0 and shortens the msg portion by one octet. This affects the 
HelperReply parser length checks on responses without kv-pair.
  - need to pass the first of the termination \0 octets not the last 
to helperReturnBuffer(). This is made possible after fixing (1a). 


In absence of any objections and with successful test results by two of 
us I have applied this.


Amos


Build failed in Jenkins: 3.HEAD-amd64-CentOS-5.3 #2175

2012-12-07 Thread noc
See http://build.squid-cache.org/job/3.HEAD-amd64-CentOS-5.3/2175/changes

Changes:

[Amos Jeffries] Fix helper buffer management

Identified by Tsantilas Christos.

One byte remains in helpers io buffer after parsing the response. This is
will cause problems when the next response from helper will enter squid.

After the  srv-rbuf parsed, the srv-rbuf still contains on byte (a '\0'
char) and the srv-roffset is 1.


Perform memmove() in helperHandleRead() instead of helperReturnBuffer()

* helperReturnBuffer is only dealing with the message sub-string, but has
been made to memmove() the buffer contents which means it has to become
aware of these problematic terminal \0 octet(s). However
helperHandleRead() is where the termination is being done and the
buffer information is all being handled.


Pass the first of the termination \0 octets to helperReturnBuffer() not
the last \0. This is made possible after fixing (1a).

* helpers which return \r\n were still passing the location of the \n as
endpoint to workaround (1a) even though the \r is also replaced with
\0 and shortens the msg portion by one octet. This affects the
HelperReply parser length checks on responses without kv-pair.


Also, clear out an obsolete TODO.

Also, document a remaining design issue in stateful helpers assuming each
read() operation is on response and ignoring any octets in the buffer
after parsing one reply.

--
[...truncated 52819 lines...]
make[4]: Entering directory 
`http://build.squid-cache.org/job/3.HEAD-amd64-CentOS-5.3/ws/btlayer-05-nodeps-esi/squid-3.HEAD-BZR/_build/helpers/external_acl/file_userip'
if g++ -DHAVE_CONFIG_H  -I../../../.. -I../../../../include -I../../../../lib 
-I../../../../src -I../../../include  -Wall -Wpointer-arith -Wwrite-strings 
-Wcomments -Werror -pipe -D_REENTRANT -g -O2 -MT ext_file_userip_acl.o -MD -MP 
-MF .deps/ext_file_userip_acl.Tpo -c -o ext_file_userip_acl.o 
../../../../helpers/external_acl/file_userip/ext_file_userip_acl.cc; \
then mv -f .deps/ext_file_userip_acl.Tpo 
.deps/ext_file_userip_acl.Po; else rm -f .deps/ext_file_userip_acl.Tpo; 
exit 1; fi
/bin/sh ../../../libtool --tag=CXX --mode=link g++ -Wall -Wpointer-arith 
-Wwrite-strings -Wcomments -Werror -pipe -D_REENTRANT -g -O2  -g -o 
ext_file_userip_acl  ext_file_userip_acl.o ../../../lib/libmiscencoding.la 
-L../../../compat -lcompat-squid  -lm -lnsl -lresolv -lrt -ldl -ldl 
libtool: link: g++ -Wall -Wpointer-arith -Wwrite-strings -Wcomments -Werror 
-pipe -D_REENTRANT -g -O2 -g -o ext_file_userip_acl ext_file_userip_acl.o  
../../../lib/.libs/libmiscencoding.a 
-Lhttp://build.squid-cache.org/job/3.HEAD-amd64-CentOS-5.3/ws/btlayer-05-nodeps-esi/squid-3.HEAD-BZR/_build/compat
 -lcompat-squid -lm -lnsl -lresolv -lrt -ldl
make[4]: Leaving directory 
`http://build.squid-cache.org/job/3.HEAD-amd64-CentOS-5.3/ws/btlayer-05-nodeps-esi/squid-3.HEAD-BZR/_build/helpers/external_acl/file_userip'
Making all in kerberos_ldap_group
make[4]: Entering directory 
`http://build.squid-cache.org/job/3.HEAD-amd64-CentOS-5.3/ws/btlayer-05-nodeps-esi/squid-3.HEAD-BZR/_build/helpers/external_acl/kerberos_ldap_group'
make[5]: Entering directory 
`http://build.squid-cache.org/job/3.HEAD-amd64-CentOS-5.3/ws/btlayer-05-nodeps-esi/squid-3.HEAD-BZR/_build/helpers/external_acl/kerberos_ldap_group'
if g++ -DHAVE_CONFIG_H  -I../../../.. -I../../../../include -I../../../../lib 
-I../../../../src -I../../../include-I../../../.. -I../../../../include 
-I../../../../lib -I../../../../src -I../../../include
-I../../../../helpers/external_acl/kerberos_ldap_group  -Wall -Wpointer-arith 
-Wwrite-strings -Wcomments -Werror -pipe -D_REENTRANT -g -O2 -MT 
kerberos_ldap_group.o -MD -MP -MF .deps/kerberos_ldap_group.Tpo -c -o 
kerberos_ldap_group.o 
../../../../helpers/external_acl/kerberos_ldap_group/kerberos_ldap_group.cc; \
then mv -f .deps/kerberos_ldap_group.Tpo 
.deps/kerberos_ldap_group.Po; else rm -f .deps/kerberos_ldap_group.Tpo; 
exit 1; fi
if g++ -DHAVE_CONFIG_H  -I../../../.. -I../../../../include -I../../../../lib 
-I../../../../src -I../../../include-I../../../.. -I../../../../include 
-I../../../../lib -I../../../../src -I../../../include
-I../../../../helpers/external_acl/kerberos_ldap_group  -Wall -Wpointer-arith 
-Wwrite-strings -Wcomments -Werror -pipe -D_REENTRANT -g -O2 -MT 
support_group.o -MD -MP -MF .deps/support_group.Tpo -c -o support_group.o 
../../../../helpers/external_acl/kerberos_ldap_group/support_group.cc; \
then mv -f .deps/support_group.Tpo .deps/support_group.Po; else rm 
-f .deps/support_group.Tpo; exit 1; fi
if g++ -DHAVE_CONFIG_H  -I../../../.. -I../../../../include -I../../../../lib 
-I../../../../src -I../../../include-I../../../.. -I../../../../include 
-I../../../../lib -I../../../../src -I../../../include
-I../../../../helpers/external_acl/kerberos_ldap_group  -Wall -Wpointer-arith 
-Wwrite-strings -Wcomments -Werror -pipe -D_REENTRANT -g