nginx-0.6.25

Igor Sysoev is at rambler-co.ru
Wed Jan 9 11:20:28 MSK 2008


On Wed, Jan 09, 2008 at 12:32:21AM -0500, Ben Maurer wrote:

> Igor Sysoev wrote:
> >On Tue, Jan 08, 2008 at 01:09:55PM -0500, Ben Maurer wrote:
> >
> >>Igor Sysoev wrote:
> >>>Changes with nginx 0.6.25                                        08 Jan 
> >>>2008
> >>>   *) Bugfix: socket leak in HTTPS mode if deferred accept was used.
> >>>      Thanks to Ben Maurer.
> >>I don't think the patch that's in 0.6.25 actually fixes the deferred 
> >>accept issue. That issue caused the MSG_PEEK recv to return an EAGAIN 
> >>which resulted in read and write events not being handled on that 
> >>socket. The patch currently in the tree only fixes the issue where the 
> >>user completes the first half of the handshake but then stops responding.
> >
> >Yes, you are right. The attached patch should fix this case.
> >
> >>Also, is there any reason this isn't merged into 0.5.x?
> >
> >It will be merged after some time (about month).
> 
> If I remember correctly, according to netstat there were FDs that had 
> elements in the receive queue. This would suggest that more needs to be 
> done than to add a timeout (because these sockets had user data on them, 
> and thus should be added to the epoll)

You are right, here is additional patch.


-- 
Igor Sysoev
http://sysoev.ru/en/
-------------- next part --------------
Index: src/http/ngx_http_request.c
===================================================================
--- src/http/ngx_http_request.c	(revision 1177)
+++ src/http/ngx_http_request.c	(working copy)
@@ -484,6 +484,10 @@
             ngx_add_timer(rev, c->listening->post_accept_timeout);
         }
 
+        if (ngx_handle_read_event(rev, 0) == NGX_ERROR) {
+            ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
+        }
+
         return;
     }
 


More information about the nginx mailing list