Welcome! Log In Create A New Profile

Advanced

Re: nginx 0.8.55 && 1.1.0 core dump if switch from http to https with HUP

August 03, 2011 11:48AM
On Wed, Aug 03, 2011 at 01:26:04PM +0800, Delta Yeh wrote:
> Thanks , after apply the patch, crash won't happen again.

Could you test another attached patch ?


--
Igor Sysoev
Index: src/http/modules/ngx_http_ssl_module.c
===================================================================
--- src/http/modules/ngx_http_ssl_module.c (revision 3990)
+++ src/http/modules/ngx_http_ssl_module.c (working copy)
@@ -626,6 +626,8 @@
sscf->builtin_session_cache = NGX_SSL_NO_BUILTIN_SCACHE;
}

+ sscf->shm_zone->init = ngx_ssl_session_cache_init;
+
return NGX_CONF_OK;

invalid:
Index: src/event/ngx_event_openssl.c
===================================================================
--- src/event/ngx_event_openssl.c (revision 3990)
+++ src/event/ngx_event_openssl.c (working copy)
@@ -26,8 +26,7 @@
ngx_err_t err, char *text);
static void ngx_ssl_clear_error(ngx_log_t *log);

-static ngx_int_t ngx_ssl_session_cache_init(ngx_shm_zone_t *shm_zone,
- void *data);
+ngx_int_t ngx_ssl_session_cache_init(ngx_shm_zone_t *shm_zone, void *data);
static int ngx_ssl_new_session(ngx_ssl_conn_t *ssl_conn,
ngx_ssl_session_t *sess);
static ngx_ssl_session_t *ngx_ssl_get_cached_session(ngx_ssl_conn_t *ssl_conn,
@@ -1505,8 +1504,6 @@
SSL_CTX_set_timeout(ssl->ctx, (long) timeout);

if (shm_zone) {
- shm_zone->init = ngx_ssl_session_cache_init;
-
SSL_CTX_sess_set_new_cb(ssl->ctx, ngx_ssl_new_session);
SSL_CTX_sess_set_get_cb(ssl->ctx, ngx_ssl_get_cached_session);
SSL_CTX_sess_set_remove_cb(ssl->ctx, ngx_ssl_remove_session);
@@ -1524,7 +1521,7 @@
}


-static ngx_int_t
+ngx_int_t
ngx_ssl_session_cache_init(ngx_shm_zone_t *shm_zone, void *data)
{
size_t len;
Index: src/event/ngx_event_openssl.h
===================================================================
--- src/event/ngx_event_openssl.h (revision 3990)
+++ src/event/ngx_event_openssl.h (working copy)
@@ -104,6 +104,7 @@
ngx_int_t ngx_ssl_ecdh_curve(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *name);
ngx_int_t ngx_ssl_session_cache(ngx_ssl_t *ssl, ngx_str_t *sess_ctx,
ssize_t builtin_session_cache, ngx_shm_zone_t *shm_zone, time_t timeout);
+ngx_int_t ngx_ssl_session_cache_init(ngx_shm_zone_t *shm_zone, void *data);
ngx_int_t ngx_ssl_create_connection(ngx_ssl_t *ssl, ngx_connection_t *c,
ngx_uint_t flags);

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx 0.8.55 && 1.1.0 core dump if switch from http to https with HUP

deltay August 02, 2011 04:38AM

Re: nginx 0.8.55 && 1.1.0 core dump if switch from http to https with HUP

Maxim Dounin August 02, 2011 08:42AM

Re: nginx 0.8.55 && 1.1.0 core dump if switch from http to https with HUP

deltay August 03, 2011 01:28AM

Re: nginx 0.8.55 && 1.1.0 core dump if switch from http to https with HUP

Igor Sysoev August 03, 2011 11:48AM

Re: nginx 0.8.55 && 1.1.0 core dump if switch from http to https with HUP

deltay August 03, 2011 11:02PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 153
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready