Re: [squid-dev] [PATCH] splicing resumed sessions

2015-04-08 Thread Alex Rousskov
On 04/08/2015 07:13 PM, Amos Jeffries wrote:
> On 4/04/2015 9:17 a.m., Alex Rousskov wrote:
>> On 03/27/2015 05:58 AM, Amos Jeffries wrote:
>>> Indeed. Its the hostname vs SNI case we can check and SHOULD do so. The
>>> raw-IP ones we can skip the check. Some nasties will still get passed,
>>> but less than without any checks.
>>
>>
>> This is all outside this patch scope though, right?! Whether or not
>> Squid should compare peeked SNI with CONNECT hostname seems totally
>> unrelated to splicing of resumed sessions. If so, let's get this fix in
>> and [continue to] discuss what kind of additional checks to add to
>> SslBump separately.

> While I disagree that adding the security related checks after the fact
> is a good approach, I can live with it.

Great. If it is any comfort, this is not really "after the fact". The
two issues are orthogonal. One could add more checks before, after, or
even instead the fix proposed on this thread.


> The config directive does need to go though.

No objections.


> Christos said on IRC there were some issues after updating the patch. So
> I'm unsure if it will need another review before merge. If you want to
> make that call, I'll go with it.

Christos is in a better position to make that call than I am. Either way
is OK with me. Just do not want to delay this much further without a
good reason because there are several pending patches and fixes that
start to conflict with each other.


Thank you,

Alex.

___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


Re: [squid-dev] [PATCH] splicing resumed sessions

2015-04-08 Thread Amos Jeffries
On 4/04/2015 9:17 a.m., Alex Rousskov wrote:
> On 03/27/2015 05:58 AM, Amos Jeffries wrote:
>> Indeed. Its the hostname vs SNI case we can check and SHOULD do so. The
>> raw-IP ones we can skip the check. Some nasties will still get passed,
>> but less than without any checks.
> 
> 
> This is all outside this patch scope though, right?! Whether or not
> Squid should compare peeked SNI with CONNECT hostname seems totally
> unrelated to splicing of resumed sessions. If so, let's get this fix in
> and [continue to] discuss what kind of additional checks to add to
> SslBump separately.

While I disagree that adding the security related checks after the fact
is a good approach, I can live with it. The config directive does need
to go though.

Christos said on IRC there were some issues after updating the patch. So
I'm unsure if it will need another review before merge. If you want to
make that call, I'll go with it.

Amos

___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


Re: [squid-dev] [PATCH] Fix HttpStateData::readReply to retry reads from server

2015-04-08 Thread Amos Jeffries
On 9/04/2015 3:12 a.m., Tsantilas Christos wrote:
> Hi all,
> 
> This patch fixes HttpStateData::readReply to retry read from server in
> the case of EINPROGRESS, EAGAIN or similar errors
> 
> This bug mostly affects SSL bumped connections. The
> HttpStateData::readReply will not retry read from server in the case of
> an EINPROGRESS or similar comm errors and the connection will hang,
> until the timeout handler called.
> 
> The Comm::ReadNow method, used inside  HttpStateData::readReply, call
> ignoreErrno function to test if the comm error should be ignored and in
> this case return Comm::INPROGRESS value.
> In this case we need to set flags.do_next_read to true to force
> HttpStateData::maybeReadVirginBody() method retry read.
> 
> This is a Measurement Factory project

+1. Please apply ASAP.

Amos

___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


[squid-dev] Build failed in Jenkins: trunk-matrix » gcc,j-fbsd-93 #159

2015-04-08 Thread noc
See 


--
[...truncated 4360 lines...]
/usr/local/lib/gcc49/include/c++/bits/stl_vector.h:803: undefined reference to 
`std::__throw_out_of_range_fmt(char const*, ...)'
/usr/local/lib/gcc49/include/c++/bits/stl_vector.h:803: undefined reference to 
`std::__throw_out_of_range_fmt(char const*, ...)'
/usr/local/lib/gcc49/include/c++/bits/stl_vector.h:803: undefined reference to 
`std::__throw_out_of_range_fmt(char const*, ...)'
/usr/local/lib/gcc49/include/c++/bits/stl_vector.h:803: undefined reference to 
`std::__throw_out_of_range_fmt(char const*, ...)'
wordlist.o: In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
auth/.libs/libacls.a(AclMaxUserIp.o): In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(IntRange.o): In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(IntRange.o): In function `_M_insert&>':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(RegexData.o):/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689:
 more undefined references to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)' 
follow
acl/.libs/libacls.a(StringData.o): In function `std::list >::_M_transfer(std::_List_iterator, 
std::_List_iterator, std::_List_iterator)':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1673: undefined reference to 
`std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*, 
std::__detail::_List_node_base*)'
acl/.libs/libacls.a(TimeData.o): In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(Asn.o): In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(DomainData.o): In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(DomainData.o): In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(HierCodeData.o): In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(HttpHeaderData.o):/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689:
 more undefined references to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)' 
follow
acl/.libs/libacls.a(HttpHeaderData.o): In function `std::list >::_M_transfer(std::_List_iterator, 
std::_List_iterator, std::_List_iterator)':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1673: undefined reference to 
`std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*, 
std::__detail::_List_node_base*)'
acl/.libs/libacls.a(HttpStatus.o): In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(HttpStatus.o): In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(Ip.o): In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(Ip.o): In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(MaxConnection.o): In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(MethodData.o):/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689:
 more undefined references to 
`std::__detail::

[squid-dev] Build failed in Jenkins: trunk-matrix » clang,j-fbsd-93 #159

2015-04-08 Thread noc
See 


--
[...truncated 2982 lines...]
ccache clang++ -DHAVE_CONFIG_H-I../../../../.. -I../../../../../include  
-I../../../../../lib -I../../../../../src  -I../../../include 
-I/usr/local/include -I/usr/include  -I/usr/include  -I../../../../../libltdl  
-Werror -Qunused-arguments -Wno-deprecated-register  -D_REENTRANT -g -O2 
-std=c++11 -I/usr/local/include -MT basic_pam_auth.o -MD -MP -MF 
.deps/basic_pam_auth.Tpo -c -o basic_pam_auth.o 
../../../../../helpers/basic_auth/PAM/basic_pam_auth.cc
mv -f .deps/basic_pam_auth.Tpo .deps/basic_pam_auth.Po
/bin/sh ../../../libtool  --tag=CXX--mode=link ccache clang++ -Werror 
-Qunused-arguments -Wno-deprecated-register  -D_REENTRANT  -g -O2 -std=c++11 
-I/usr/local/include  -g -L/usr/local/lib -Wl,-R/usr/local/lib -pthread -o 
basic_pam_auth basic_pam_auth.o ../../../lib/libmiscencoding.la  
../../../compat/libcompat-squid.la   -lpam  -lm 
libtool: link: ccache clang++ -Werror -Qunused-arguments 
-Wno-deprecated-register -D_REENTRANT -g -O2 -std=c++11 -I/usr/local/include -g 
-Wl,-R/usr/local/lib -pthread -o basic_pam_auth basic_pam_auth.o  
-L/usr/local/lib ../../../lib/.libs/libmiscencoding.a 
../../../compat/.libs/libcompat-squid.a -lpam -lm -pthread
Making all in POP3
sed -e 's,[@]PERL[@],/usr/bin/perl,g' 
<../../../../../helpers/basic_auth/POP3/basic_pop3_auth.pl.in >basic_pop3_auth 
|| (/bin/rm -f -f basic_pop3_auth ; exit 1)
pod2man basic_pop3_auth basic_pop3_auth.8
Making all in RADIUS
ccache clang++ -DHAVE_CONFIG_H-I../../../../.. -I../../../../../include  
-I../../../../../lib -I../../../../../src  -I../../../include 
-I/usr/local/include -I/usr/include  -I/usr/include  -I../../../../../libltdl 
-I../../../../../helpers/basic_auth/RADIUS  -Werror -Qunused-arguments 
-Wno-deprecated-register  -D_REENTRANT -g -O2 -std=c++11 -I/usr/local/include 
-MT basic_radius_auth.o -MD -MP -MF .deps/basic_radius_auth.Tpo -c -o 
basic_radius_auth.o 
../../../../../helpers/basic_auth/RADIUS/basic_radius_auth.cc
ccache clang++ -DHAVE_CONFIG_H-I../../../../.. -I../../../../../include  
-I../../../../../lib -I../../../../../src  -I../../../include 
-I/usr/local/include -I/usr/include  -I/usr/include  -I../../../../../libltdl 
-I../../../../../helpers/basic_auth/RADIUS  -Werror -Qunused-arguments 
-Wno-deprecated-register  -D_REENTRANT -g -O2 -std=c++11 -I/usr/local/include 
-MT radius-util.o -MD -MP -MF .deps/radius-util.Tpo -c -o radius-util.o 
../../../../../helpers/basic_auth/RADIUS/radius-util.cc
mv -f .deps/radius-util.Tpo .deps/radius-util.Po
mv -f .deps/basic_radius_auth.Tpo .deps/basic_radius_auth.Po
/bin/sh ../../../libtool  --tag=CXX--mode=link ccache clang++ -Werror 
-Qunused-arguments -Wno-deprecated-register  -D_REENTRANT  -g -O2 -std=c++11 
-I/usr/local/include  -g -L/usr/local/lib -Wl,-R/usr/local/lib -pthread -o 
basic_radius_auth basic_radius_auth.o  radius-util.o 
../../../lib/libmiscencoding.la  ../../../compat/libcompat-squid.la   -lnettle  
  -lm 
libtool: link: ccache clang++ -Werror -Qunused-arguments 
-Wno-deprecated-register -D_REENTRANT -g -O2 -std=c++11 -I/usr/local/include -g 
-Wl,-R/usr/local/lib -pthread -o basic_radius_auth basic_radius_auth.o 
radius-util.o  -L/usr/local/lib ../../../lib/.libs/libmiscencoding.a 
../../../compat/.libs/libcompat-squid.a -lnettle -lm -pthread
Making all in SMB
ccache clang++ -DHAVE_CONFIG_H   -I../../../../.. -I../../../../../include  
-I../../../../../lib -I../../../../../src  -I../../../include 
-I/usr/local/include -I/usr/include  -I/usr/include  -I../../../../../libltdl  
-DHELPERSCRIPT=\"/usr
 -g -O2 -std=c++11 -I/usr/local/include -MT basic_smb_auth-basic_smb_auth.o -MD 
-MP -MF .deps/basic_smb_auth-basic_smb_auth.Tpo -c -o 
basic_smb_auth-basic_smb_auth.o `test -f 'basic_smb_auth.cc' || echo 
'../../../../../helpers/basic_auth/SMB/'`basic_smb_auth.cc
mv -f .deps/basic_smb_auth-basic_smb_auth.Tpo 
.deps/basic_smb_auth-basic_smb_auth.Po
/bin/sh ../../../libtool  --tag=CXX--mode=link ccache clang++  
-DHELPERSCRIPT=\"/usr
 -g -O2 -std=c++11 -I/usr/local/include   -g -L/usr/local/lib 
-Wl,-R/usr/local/lib -pthread -o basic_smb_auth basic_smb_auth-basic_smb_auth.o 
../../../lib/libmiscencoding.la  ../../../compat/libcompat-squid.la   -lm 
libtool: link: ccache clang++ 
-DHELPERSCRIPT=\"/usr
 -g -O2 -std=c++11 -I/usr/local/include -g -Wl,-R/usr/local/lib -pthread -o 
basic_smb_auth basic_smb_auth-basic_smb_auth.o  -L/usr/

[squid-dev] Build failed in Jenkins: trunk-matrix » gcc,j-fbsd-93 #158

2015-04-08 Thread noc
See 


--
[...truncated 4360 lines...]
/usr/local/lib/gcc49/include/c++/bits/stl_vector.h:803: undefined reference to 
`std::__throw_out_of_range_fmt(char const*, ...)'
/usr/local/lib/gcc49/include/c++/bits/stl_vector.h:803: undefined reference to 
`std::__throw_out_of_range_fmt(char const*, ...)'
/usr/local/lib/gcc49/include/c++/bits/stl_vector.h:803: undefined reference to 
`std::__throw_out_of_range_fmt(char const*, ...)'
/usr/local/lib/gcc49/include/c++/bits/stl_vector.h:803: undefined reference to 
`std::__throw_out_of_range_fmt(char const*, ...)'
wordlist.o: In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
auth/.libs/libacls.a(AclMaxUserIp.o): In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(IntRange.o): In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(IntRange.o): In function `_M_insert&>':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(RegexData.o):/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689:
 more undefined references to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)' 
follow
acl/.libs/libacls.a(StringData.o): In function `std::list >::_M_transfer(std::_List_iterator, 
std::_List_iterator, std::_List_iterator)':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1673: undefined reference to 
`std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*, 
std::__detail::_List_node_base*)'
acl/.libs/libacls.a(TimeData.o): In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(Asn.o): In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(DomainData.o): In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(DomainData.o): In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(HierCodeData.o): In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(HttpHeaderData.o):/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689:
 more undefined references to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)' 
follow
acl/.libs/libacls.a(HttpHeaderData.o): In function `std::list >::_M_transfer(std::_List_iterator, 
std::_List_iterator, std::_List_iterator)':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1673: undefined reference to 
`std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*, 
std::__detail::_List_node_base*)'
acl/.libs/libacls.a(HttpStatus.o): In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(HttpStatus.o): In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(Ip.o): In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(Ip.o): In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(MaxConnection.o): In function `_M_insert':
/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689: undefined reference to 
`std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
acl/.libs/libacls.a(MethodData.o):/usr/local/lib/gcc49/include/c++/bits/stl_list.h:1689:
 more undefined references to 
`std::__detail::

[squid-dev] Build failed in Jenkins: trunk-matrix » clang,j-fbsd-93 #158

2015-04-08 Thread noc
See 


--
[...truncated 2982 lines...]
ccache clang++ -DHAVE_CONFIG_H-I../../../../.. -I../../../../../include  
-I../../../../../lib -I../../../../../src  -I../../../include 
-I/usr/local/include -I/usr/include  -I/usr/include  -I../../../../../libltdl  
-Werror -Qunused-arguments -Wno-deprecated-register  -D_REENTRANT -g -O2 
-std=c++11 -I/usr/local/include -MT basic_pam_auth.o -MD -MP -MF 
.deps/basic_pam_auth.Tpo -c -o basic_pam_auth.o 
../../../../../helpers/basic_auth/PAM/basic_pam_auth.cc
mv -f .deps/basic_pam_auth.Tpo .deps/basic_pam_auth.Po
/bin/sh ../../../libtool  --tag=CXX--mode=link ccache clang++ -Werror 
-Qunused-arguments -Wno-deprecated-register  -D_REENTRANT  -g -O2 -std=c++11 
-I/usr/local/include  -g -L/usr/local/lib -Wl,-R/usr/local/lib -pthread -o 
basic_pam_auth basic_pam_auth.o ../../../lib/libmiscencoding.la  
../../../compat/libcompat-squid.la   -lpam  -lm 
libtool: link: ccache clang++ -Werror -Qunused-arguments 
-Wno-deprecated-register -D_REENTRANT -g -O2 -std=c++11 -I/usr/local/include -g 
-Wl,-R/usr/local/lib -pthread -o basic_pam_auth basic_pam_auth.o  
-L/usr/local/lib ../../../lib/.libs/libmiscencoding.a 
../../../compat/.libs/libcompat-squid.a -lpam -lm -pthread
Making all in POP3
sed -e 's,[@]PERL[@],/usr/bin/perl,g' 
<../../../../../helpers/basic_auth/POP3/basic_pop3_auth.pl.in >basic_pop3_auth 
|| (/bin/rm -f -f basic_pop3_auth ; exit 1)
pod2man basic_pop3_auth basic_pop3_auth.8
Making all in RADIUS
ccache clang++ -DHAVE_CONFIG_H-I../../../../.. -I../../../../../include  
-I../../../../../lib -I../../../../../src  -I../../../include 
-I/usr/local/include -I/usr/include  -I/usr/include  -I../../../../../libltdl 
-I../../../../../helpers/basic_auth/RADIUS  -Werror -Qunused-arguments 
-Wno-deprecated-register  -D_REENTRANT -g -O2 -std=c++11 -I/usr/local/include 
-MT basic_radius_auth.o -MD -MP -MF .deps/basic_radius_auth.Tpo -c -o 
basic_radius_auth.o 
../../../../../helpers/basic_auth/RADIUS/basic_radius_auth.cc
ccache clang++ -DHAVE_CONFIG_H-I../../../../.. -I../../../../../include  
-I../../../../../lib -I../../../../../src  -I../../../include 
-I/usr/local/include -I/usr/include  -I/usr/include  -I../../../../../libltdl 
-I../../../../../helpers/basic_auth/RADIUS  -Werror -Qunused-arguments 
-Wno-deprecated-register  -D_REENTRANT -g -O2 -std=c++11 -I/usr/local/include 
-MT radius-util.o -MD -MP -MF .deps/radius-util.Tpo -c -o radius-util.o 
../../../../../helpers/basic_auth/RADIUS/radius-util.cc
mv -f .deps/radius-util.Tpo .deps/radius-util.Po
mv -f .deps/basic_radius_auth.Tpo .deps/basic_radius_auth.Po
/bin/sh ../../../libtool  --tag=CXX--mode=link ccache clang++ -Werror 
-Qunused-arguments -Wno-deprecated-register  -D_REENTRANT  -g -O2 -std=c++11 
-I/usr/local/include  -g -L/usr/local/lib -Wl,-R/usr/local/lib -pthread -o 
basic_radius_auth basic_radius_auth.o  radius-util.o 
../../../lib/libmiscencoding.la  ../../../compat/libcompat-squid.la   -lnettle  
  -lm 
libtool: link: ccache clang++ -Werror -Qunused-arguments 
-Wno-deprecated-register -D_REENTRANT -g -O2 -std=c++11 -I/usr/local/include -g 
-Wl,-R/usr/local/lib -pthread -o basic_radius_auth basic_radius_auth.o 
radius-util.o  -L/usr/local/lib ../../../lib/.libs/libmiscencoding.a 
../../../compat/.libs/libcompat-squid.a -lnettle -lm -pthread
Making all in SMB
ccache clang++ -DHAVE_CONFIG_H   -I../../../../.. -I../../../../../include  
-I../../../../../lib -I../../../../../src  -I../../../include 
-I/usr/local/include -I/usr/include  -I/usr/include  -I../../../../../libltdl  
-DHELPERSCRIPT=\"/usr
 -g -O2 -std=c++11 -I/usr/local/include -MT basic_smb_auth-basic_smb_auth.o -MD 
-MP -MF .deps/basic_smb_auth-basic_smb_auth.Tpo -c -o 
basic_smb_auth-basic_smb_auth.o `test -f 'basic_smb_auth.cc' || echo 
'../../../../../helpers/basic_auth/SMB/'`basic_smb_auth.cc
mv -f .deps/basic_smb_auth-basic_smb_auth.Tpo 
.deps/basic_smb_auth-basic_smb_auth.Po
/bin/sh ../../../libtool  --tag=CXX--mode=link ccache clang++  
-DHELPERSCRIPT=\"/usr
 -g -O2 -std=c++11 -I/usr/local/include   -g -L/usr/local/lib 
-Wl,-R/usr/local/lib -pthread -o basic_smb_auth basic_smb_auth-basic_smb_auth.o 
../../../lib/libmiscencoding.la  ../../../compat/libcompat-squid.la   -lm 
libtool: link: ccache clang++ 
-DHELPERSCRIPT=\"/usr
 -g -O2 -std=c++11 -I/usr/local/include -g -Wl,-R/usr/local/lib -pthread -o 
basic_smb_auth basic_smb_auth-basic_smb_auth.o  -L/usr/

[squid-dev] [PATCH] Fix HttpStateData::readReply to retry reads from server

2015-04-08 Thread Tsantilas Christos

Hi all,

This patch fixes HttpStateData::readReply to retry read from server in 
the case of EINPROGRESS, EAGAIN or similar errors


This bug mostly affects SSL bumped connections. The 
HttpStateData::readReply will not retry read from server in the case of 
an EINPROGRESS or similar comm errors and the connection will hang, 
until the timeout handler called.


The Comm::ReadNow method, used inside  HttpStateData::readReply, call 
ignoreErrno function to test if the comm error should be ignored and in 
this case return Comm::INPROGRESS value.
In this case we need to set flags.do_next_read to true to force 
HttpStateData::maybeReadVirginBody() method retry read.


This is a Measurement Factory project
Fix HttpStateData::readReply to retry read from server in the case of EINPROGRESS, EAGAIN or similar errors

This bug mostly affects SSL bumped connections.
The HttpStateData::readReply will not retry read from server in the case of an
EINPROGRESS or similar comm errors and the connection will hang, until the
timeout handler called.

The Comm::ReadNow method calls ignoreErrno function to test if the comm error
should be ignored and in this case return Comm::INPROGRESS value.
In this case we need to set flags.do_next_read to true to force
HttpStateData::maybeReadVirginBody() method retry read.


This is a Measurement Factory project

=== modified file 'src/http.cc'
--- src/http.cc	2015-03-28 13:20:21 +
+++ src/http.cc	2015-04-06 14:26:11 +
@@ -1175,40 +1175,41 @@
 assert(entry->mem_obj);
 
 /* read ahead limit */
 /* Perhaps these two calls should both live in MemObject */
 AsyncCall::Pointer nilCall;
 if (!entry->mem_obj->readAheadPolicyCanRead()) {
 entry->mem_obj->delayRead(DeferredRead(readDelayed, this, CommRead(io.conn, NULL, 0, nilCall)));
 return;
 }
 
 /* delay id limit */
 entry->mem_obj->mostBytesAllowed().delayRead(DeferredRead(readDelayed, this, CommRead(io.conn, NULL, 0, nilCall)));
 return;
 }
 #endif
 
 switch (Comm::ReadNow(rd, inBuf)) {
 case Comm::INPROGRESS:
 if (inBuf.isEmpty())
 debugs(33, 2, io.conn << ": no data to process, " << xstrerr(rd.xerrno));
+flags.do_next_read = true;
 maybeReadVirginBody();
 return;
 
 case Comm::OK:
 {
 payloadSeen += rd.size;
 #if USE_DELAY_POOLS
 DelayId delayId = entry->mem_obj->mostBytesAllowed();
 delayId.bytesIn(rd.size);
 #endif
 
 kb_incr(&(statCounter.server.all.kbytes_in), rd.size);
 kb_incr(&(statCounter.server.http.kbytes_in), rd.size);
 ++ IOStats.Http.reads;
 
 int bin = 0;
 for (int clen = rd.size - 1; clen; ++bin)
 clen >>= 1;
 
 ++ IOStats.Http.read_hist[bin];
@@ -1217,50 +1218,45 @@
 const timeval &sent = request->hier.peer_http_request_sent;
 if (sent.tv_sec)
 tvSub(request->hier.peer_response_time, sent, current_time);
 else
 request->hier.peer_response_time.tv_sec = -1;
 }
 
 /* Continue to process previously read data */
 break;
 
 case Comm::ENDFILE: // close detected by 0-byte read
 eof = 1;
 flags.do_next_read = false;
 
 /* Continue to process previously read data */
 break;
 
 // case Comm::COMM_ERROR:
 default: // no other flags should ever occur
 debugs(11, 2, io.conn << ": read failure: " << xstrerr(rd.xerrno));
-
-if (ignoreErrno(rd.xerrno)) {
-flags.do_next_read = true;
-} else {
-ErrorState *err = new ErrorState(ERR_READ_ERROR, Http::scBadGateway, fwd->request);
-err->xerrno = rd.xerrno;
-fwd->fail(err);
-flags.do_next_read = false;
-io.conn->close();
-}
+ErrorState *err = new ErrorState(ERR_READ_ERROR, Http::scBadGateway, fwd->request);
+err->xerrno = rd.xerrno;
+fwd->fail(err);
+flags.do_next_read = false;
+io.conn->close();
 
 return;
 }
 
 /* Process next response from buffer */
 processReply();
 }
 
 /// processes the already read and buffered response data, possibly after
 /// waiting for asynchronous 1xx control message processing
 void
 HttpStateData::processReply()
 {
 
 if (flags.handling1xx) { // we came back after handling a 1xx response
 debugs(11, 5, HERE << "done with 1xx handling");
 flags.handling1xx = false;
 Must(!flags.headers_parsed);
 }
 

___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev