Bug 43472

Summary: New version socket_is_connected breaks http keep-alive connections
Product: Apache httpd-2 Reporter: Christian BOITEL <christian_boitel>
Component: mod_proxyAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: RESOLVED FIXED    
Severity: normal CC: asmorgrav
Priority: P2    
Version: 2.2.6   
Target Milestone: ---   
Hardware: Other   
OS: Solaris   
Bug Depends on:    
Bug Blocks: 43513, 43308    
Attachments: Patch proposal against trunk

Description Christian BOITEL 2007-09-25 09:22:41 UTC
I am using a front Apache compiled with worker MPM acting as a reverse proxy 
to access back-end http servers

While upgrading to 2.2.6 (from 2.2.4), back-end HTTP connections are no longer 
kept alive. While investigating, i found that connections were kept in the 
pool but were closed when later being reused.

Found the fix for patch 
(http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/proxy/proxy_ut
il.c?r1=488822&r2=536291&diff_format=h) introduced the wrong behaviour: new 
version of is_socket_connected fails and connection is believed to be no 
longer usable.

When defining USE_ALTERNATE_IS_CONNECTED to 0 (to revert to old mechanism), 
everything is back to normal.

I have using Solaris 2.9 (which defines MSG_PEEK).
Comment 1 Ruediger Pluem 2007-09-25 11:23:11 UTC
Created attachment 20877 [details]
Patch proposal against trunk

Can you please check if the attached patch fixes your problem after you set
USE_ALTERNATE_IS_CONNECTED back to 1? Thanks.
Comment 2 Christian BOITEL 2007-09-25 23:50:02 UTC
(In reply to comment #1)

Applied patch and perform testes: it fixes problem.

I believe patch should also be backported to 2.2.x branch.
Comment 3 Nick Kew 2007-09-28 12:31:06 UTC
Fixed in trunk - r580466
Comment 4 Ruediger Pluem 2007-09-29 12:04:35 UTC
Proposed for backport to  2.2.x as r580625
(http://svn.apache.org/viewcvs.cgi?rev=580466&view=rev).
Comment 5 Nick Kew 2007-10-07 05:36:49 UTC
Fix backported in r582620