[nginx] SSL: fixed $ssl_session_id variable.

2014-01-22 Thread Maxim Dounin
details:   http://hg.nginx.org/nginx/rev/97e3769637a7
branches:  
changeset: 5531:97e3769637a7
user:  Maxim Dounin mdou...@mdounin.ru
date:  Wed Jan 22 16:05:06 2014 +0400
description:
SSL: fixed $ssl_session_id variable.

Previously, it used to contain full session serialized instead of just
a session id, making it almost impossible to use the variable in a safe
way.

Thanks to Ivan Risti?.

diffstat:

 src/event/ngx_event_openssl.c |  16 +++-
 1 files changed, 3 insertions(+), 13 deletions(-)

diffs (39 lines):

diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c
--- a/src/event/ngx_event_openssl.c
+++ b/src/event/ngx_event_openssl.c
@@ -2504,32 +2504,22 @@ ngx_int_t
 ngx_ssl_get_session_id(ngx_connection_t *c, ngx_pool_t *pool, ngx_str_t *s)
 {
 int   len;
-u_char   *p, *buf;
+u_char   *buf;
 SSL_SESSION  *sess;
 
 sess = SSL_get0_session(c-ssl-connection);
 
-len = i2d_SSL_SESSION(sess, NULL);
-
-buf = ngx_alloc(len, c-log);
-if (buf == NULL) {
-return NGX_ERROR;
-}
+buf = sess-session_id;
+len = sess-session_id_length;
 
 s-len = 2 * len;
 s-data = ngx_pnalloc(pool, 2 * len);
 if (s-data == NULL) {
-ngx_free(buf);
 return NGX_ERROR;
 }
 
-p = buf;
-i2d_SSL_SESSION(sess, p);
-
 ngx_hex_dump(s-data, buf, len);
 
-ngx_free(buf);
-
 return NGX_OK;
 }
 

___
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel


[nginx] Updated OpenSSL used for win32 builds.

2014-01-22 Thread Maxim Dounin
details:   http://hg.nginx.org/nginx/rev/24afe114adeb
branches:  
changeset: 5533:24afe114adeb
user:  Maxim Dounin mdou...@mdounin.ru
date:  Wed Jan 22 16:10:13 2014 +0400
description:
Updated OpenSSL used for win32 builds.

diffstat:

 misc/GNUmakefile |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff --git a/misc/GNUmakefile b/misc/GNUmakefile
--- a/misc/GNUmakefile
+++ b/misc/GNUmakefile
@@ -5,7 +5,7 @@ NGINX = nginx-$(VER)
 TEMP = tmp
 
 OBJS = objs.msvc8
-OPENSSL =  openssl-1.0.1e
+OPENSSL =  openssl-1.0.1f
 ZLIB = zlib-1.2.8
 PCRE = pcre-8.33
 

___
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel


[nginx] release-1.5.9 tag

2014-01-22 Thread Maxim Dounin
details:   http://hg.nginx.org/nginx/rev/fff0f73673c3
branches:  
changeset: 5535:fff0f73673c3
user:  Maxim Dounin mdou...@mdounin.ru
date:  Wed Jan 22 17:42:59 2014 +0400
description:
release-1.5.9 tag

diffstat:

 .hgtags |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (8 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -364,3 +364,4 @@ 60e0409b9ec7ee194c6d8102f0656598cc4a6cfe
 70c5cd3a61cb476c2afb3a61826e59c7cda0b7a7 release-1.5.6
 9ba2542d75bf62a3972278c63561fc2ef5ec573a release-1.5.7
 eaa76f24975948b0ce8be01838d949122d44ed67 release-1.5.8
+5a1759f33b7fa6270e1617c08d7e655b7b127f26 release-1.5.9

___
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel


[nginx] nginx-1.5.9-RELEASE

2014-01-22 Thread Maxim Dounin
details:   http://hg.nginx.org/nginx/rev/5a1759f33b7f
branches:  
changeset: 5534:5a1759f33b7f
user:  Maxim Dounin mdou...@mdounin.ru
date:  Wed Jan 22 17:42:59 2014 +0400
description:
nginx-1.5.9-RELEASE

diffstat:

 docs/xml/nginx/changes.xml |  142 +
 1 files changed, 142 insertions(+), 0 deletions(-)

diffs (152 lines):

diff --git a/docs/xml/nginx/changes.xml b/docs/xml/nginx/changes.xml
--- a/docs/xml/nginx/changes.xml
+++ b/docs/xml/nginx/changes.xml
@@ -5,6 +5,148 @@
 change_log title=nginx
 
 
+changes ver=1.5.9 date=22.01.2014
+
+change type=change
+para lang=ru
+теперь в заголовке X-Accel-Redirect nginx ожидает закодированный URI.
+/para
+para lang=en
+now nginx expects escaped URIs in X-Accel-Redirect headers.
+/para
+/change
+
+change type=feature
+para lang=ru
+директива ssl_buffer_size.
+/para
+para lang=en
+the ssl_buffer_size directive.
+/para
+/change
+
+change type=feature
+para lang=ru
+директиву limit_rate теперь можно использовать для
+ограничения скорости передачи ответов клиенту в SPDY-соединениях.
+/para
+para lang=en
+the limit_rate directive can now be used to
+rate limit responses sent in SPDY connections.
+/para
+/change
+
+change type=feature
+para lang=ru
+директива spdy_chunk_size.
+/para
+para lang=en
+the spdy_chunk_size directive.
+/para
+/change
+
+change type=feature
+para lang=ru
+директива ssl_session_tickets.br/
+Спасибо Dirkjan Bussink.
+/para
+para lang=en
+the ssl_session_tickets directive.br/
+Thanks to Dirkjan Bussink.
+/para
+/change
+
+change type=bugfix
+para lang=ru
+переменная $ssl_session_id содержала всю сессию в сериализованном виде
+вместо её идентификатора.br/
+Спасибо Ivan Ristić.
+/para
+para lang=en
+the $ssl_session_id variable contained full session serialized
+instead of just a session id.br/
+Thanks to Ivan Ristić.
+/para
+/change
+
+change type=bugfix
+para lang=ru
+nginx неправильно обрабатывал закодированный символ ? в команде SSI include.
+/para
+para lang=en
+nginx incorrectly handled escaped ? character in the include SSI command.
+/para
+/change
+
+change type=bugfix
+para lang=ru
+модуль ngx_http_dav_module не раскодировал целевой URI при 
+обработке методов COPY и MOVE.
+/para
+para lang=en
+the ngx_http_dav_module did not unescape destination URI
+of the COPY and MOVE methods.
+/para
+/change
+
+change type=bugfix
+para lang=ru
+resolver не понимал доменные имена с точкой в конце.
+Спасибо Yichun Zhang.
+/para
+para lang=en
+resolver did not understand domain names with a trailing dot.
+Thanks to Yichun Zhang.
+/para
+/change
+
+change type=bugfix
+para lang=ru
+при проксировании в логах могли появляться сообщения zero size buf in output;
+ошибка появилась в 1.3.9.
+/para
+para lang=en
+alerts zero size buf in output might appear in logs while proxying;
+the bug had appeared in 1.3.9.
+/para
+/change
+
+change type=bugfix
+para lang=ru
+в рабочем процессе мог произойти segmentation fault,
+если использовался модуль ngx_http_spdy_module.
+/para
+para lang=en
+a segmentation fault might occur in a worker process
+if the ngx_http_spdy_module was used.
+/para
+/change
+
+change type=bugfix
+para lang=ru
+при использовании методов обработки соединений select, poll и /dev/poll
+проксируемые WebSocket-соединения могли зависать сразу после открытия.
+/para
+para lang=en
+proxied WebSocket connections might hang right after handshake
+if the select, poll, or /dev/poll methods were used.
+/para
+/change
+
+change type=bugfix
+para lang=ru
+директива xclient почтового прокси-сервера
+некорректно передавала IPv6-адреса.
+/para
+para lang=en
+the xclient directive of the mail proxy module
+incorrectly handled IPv6 client addresses.
+/para
+/change
+
+/changes
+
+
 changes ver=1.5.8 date=17.12.2013
 
 change type=feature
___
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel

Re: Help with shared memory usage

2014-01-22 Thread Maxim Dounin
Hello!

On Wed, Jan 22, 2014 at 01:39:54AM -0200, Wandenberg Peixoto wrote:

 Hello Maxim,
 
 did you have opportunity to take a look on this last patch?

It looks more or less correct, though I don't happy with the 
checks done, and there are various style issues.  I'm planning to 
look into it and build a better version as time permits.

 
 
 Regards,
 Wandenberg
 
 
 On Thu, Dec 26, 2013 at 10:12 PM, Wandenberg Peixoto
 wandenb...@gmail.comwrote:
 
  Hello Maxim,
 
  I changed the patch to check only the p-next pointer.
  And checking if the page is in an address less than the (pool-pages +
  pages).
 
  +ngx_slab_page_t *prev, *p;
  +ngx_uint_tpages;
  +size_tsize;
  +
  +size = pool-end - (u_char *) pool - sizeof(ngx_slab_pool_t);
  +pages = (ngx_uint_t) (size / (ngx_pagesize +
  sizeof(ngx_slab_page_t)));
   +
  +p = page[page-slab];
  +
  +if ((p  pool-pages + pages) 
  +(p-next != NULL) 
  +((p-prev  NGX_SLAB_PAGE_MASK) == NGX_SLAB_PAGE)) {
 
 
  I hope that now I did the right checks.
 
  Regards,
  Wandenberg
 
 
  On Fri, Dec 20, 2013 at 2:49 PM, Maxim Dounin mdou...@mdounin.ru wrote:
 
  Hello!
 
  On Tue, Dec 17, 2013 at 09:05:16PM -0200, Wandenberg Peixoto wrote:
 
   Hi Maxim,
  
   sorry for the long delay. I hope you remember my issue.
   In attach is the new patch with the changes you suggest.
   Can you check it again? I hope it can be applied to nginx code now.
  
   About this point 2. There is probably no need to check both prev and
   next.,
   I check both pointers to avoid a segmentation fault, since in some
   situations the next can be NULL and the prev may point to pool-free.
   As far as I could follow the code seems to me that could happen one of
  this
   pointers, next or prev, point to a NULL.
   I just made a double check to protect.
 
  As far as I see, all pages in the pool-free list are expected to
  have both p-prev and p-next set.  And all pages with type
  NGX_SLAB_PAGE will be either on the pool-free list, or will have
  p-next set to NULL.
 
  [...]
 
 +{
 +ngx_slab_page_t *neighbour = page[page-slab];
   
Here neighbour may point outside of the allocated page
structures if we are freeing the last page in the pool.
 
  It looks like you've tried to address this problem with the
  following check:
 
   +static ngx_int_t
   +ngx_slab_merge_pages(ngx_slab_pool_t *pool, ngx_slab_page_t *page)
   +{
   +ngx_slab_page_t *prev, *p;
   +
   +p = page[page-slab];
   +if ((u_char *) p = pool-end) {
   +return NGX_DECLINED;
   +}
 
  This looks wrong, as pool-end points to the end of the pool, not
  the end of allocated page structures.
 
  --
  Maxim Dounin
  http://nginx.org/
 
  ___
  nginx-devel mailing list
  nginx-devel@nginx.org
  http://mailman.nginx.org/mailman/listinfo/nginx-devel
 
 
 

 ___
 nginx-devel mailing list
 nginx-devel@nginx.org
 http://mailman.nginx.org/mailman/listinfo/nginx-devel


-- 
Maxim Dounin
http://nginx.org/

___
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel


Re: [PATCH 1 of 3] Mail: add IMAP ID command support (RFC2971)

2014-01-22 Thread Maxim Dounin
Hello!

On Sun, Jan 19, 2014 at 12:10:55PM +0100, Filipe da Silva wrote:

 # HG changeset patch
 # User Filipe da Silva fdasilv...@gmail.com
 # Date 1390129333 -3600
 #  Sun Jan 19 12:02:13 2014 +0100
 # Node ID 3ad4498760c6fcd2ba24ae84f6d924b3a1a35a31
 # Parent  bb3dc21c89efa8cfd1b9f661fcfd2f155687b99a
 Mail: add IMAP ID command support (RFC2971).
 
 Parse the ID command and its arguments.
 Handle the server response to ID command.
 
 diff -r bb3dc21c89ef -r 3ad4498760c6 src/mail/ngx_mail.h
 --- a/src/mail/ngx_mail.h Fri Jan 17 22:06:04 2014 +0400
 +++ b/src/mail/ngx_mail.h Sun Jan 19 12:02:13 2014 +0100
 @@ -215,6 +215,7 @@ typedef struct {
  unsignedquoted:1;
  unsignedbackslash:1;
  unsignedno_sync_literal:1;
 +unsignedparams_list:1;
  unsignedstarttls:1;
  unsignedesmtp:1;
  unsignedauth_method:3;
 @@ -233,6 +234,7 @@ typedef struct {
  ngx_str_t   smtp_helo;
  ngx_str_t   smtp_from;
  ngx_str_t   smtp_to;
 +ngx_str_t   imap_id;
  
  ngx_str_t   cmd;
  
 @@ -279,10 +281,10 @@ typedef struct {
  #define NGX_IMAP_CAPABILITY3
  #define NGX_IMAP_NOOP  4
  #define NGX_IMAP_STARTTLS  5
 +#define NGX_IMAP_AUTHENTICATE  6
 +#define NGX_IMAP_ID7
  
 -#define NGX_IMAP_NEXT  6
 -
 -#define NGX_IMAP_AUTHENTICATE  7
 +#define NGX_IMAP_NEXT  8
  
  
  #define NGX_SMTP_HELO  1
 diff -r bb3dc21c89ef -r 3ad4498760c6 src/mail/ngx_mail_imap_handler.c
 --- a/src/mail/ngx_mail_imap_handler.cFri Jan 17 22:06:04 2014 +0400
 +++ b/src/mail/ngx_mail_imap_handler.cSun Jan 19 12:02:13 2014 +0100
 @@ -18,6 +18,8 @@ static ngx_int_t ngx_mail_imap_authentic
  ngx_connection_t *c);
  static ngx_int_t ngx_mail_imap_capability(ngx_mail_session_t *s,
  ngx_connection_t *c);
 +static ngx_int_t ngx_mail_imap_id(ngx_mail_session_t *s,
 +ngx_connection_t *c);
  static ngx_int_t ngx_mail_imap_starttls(ngx_mail_session_t *s,
  ngx_connection_t *c);
  
 @@ -31,6 +33,7 @@ static u_char  imap_username[] = + VXNl
  static u_char  imap_password[] = + UGFzc3dvcmQ6 CRLF;
  static u_char  imap_bye[] = * BYE CRLF;
  static u_char  imap_invalid_command[] = BAD invalid command CRLF;
 +static u_char  imap_server_id_nil[] = * ID NIL CRLF;
  
  
  void
 @@ -183,6 +186,10 @@ ngx_mail_imap_auth_state(ngx_event_t *re
  rc = ngx_mail_imap_capability(s, c);
  break;
  
 +case NGX_IMAP_ID:
 +rc = ngx_mail_imap_id(s, c);
 +break;
 +
  case NGX_IMAP_LOGOUT:
  s-quit = 1;
  ngx_str_set(s-text, imap_bye);
 @@ -438,6 +445,86 @@ ngx_mail_imap_capability(ngx_mail_sessio
  
  
  static ngx_int_t
 +ngx_mail_imap_id(ngx_mail_session_t *s, ngx_connection_t *c)
 +{
 +ngx_uint_t   i;
 +ngx_str_t   *arg, cmd;
 +
 +if (s-args.nelts == 0) {
 +return NGX_MAIL_PARSE_INVALID_COMMAND;
 +}
 +
 +arg = s-args.elts;
 +cmd.data = s-tag.data + s-tag.len;
 +cmd.len = s-arg_end - cmd.data;
 +
 +/* Client may send ID NIL or ID ( key value ... ) */

Comment style looks inconsistent (either don't use capitalization, 
or properly use trailing dots).  And the comment itself is 
misleading as syntax provided is contradicts one from RFC.

 +if (s-args.nelts == 1) {
 +if (cmd.len != 6
 +|| ngx_strncasecmp(cmd.data, (u_char *) ID NIL, 6) != 0) {

Style: the { should be on it's own line.

 +ngx_log_debug1(NGX_LOG_DEBUG_MAIL, c-log, 0,
 +   ID invalid argument:\%V\,
 +   cmd);

The message looks not very in-line with other debug messages, and 
it probably only needs two lines.

 +return NGX_MAIL_PARSE_INVALID_COMMAND;
 +}
 +
 +goto valid;
 +}
 +
 +/* more than one and not an even item count */
 +if (s-args.nelts % 2 != 0) {
 +return NGX_MAIL_PARSE_INVALID_COMMAND;
 +}

The comment seems to be obvious enough to be confusing.

 +
 +for (i = 0; i  s-args.nelts; i += 2) {
 +
 +switch (arg[i].len) {
 +
 +case 0:
 +ngx_log_debug1(NGX_LOG_DEBUG_MAIL, c-log, 0,
 +   ID empty key #%ui name : \\, i );
 +return NGX_MAIL_PARSE_INVALID_COMMAND;
 +
 +case 3:
 +if (ngx_strncasecmp(arg[i].data, (u_char *) NIL, 3) == 0) {
 +ngx_log_debug2(NGX_LOG_DEBUG_MAIL, c-log, 0,
 +   ID NIL Key #%ui name \%V\, i,
 +   arg[i]);
 +return NGX_MAIL_PARSE_INVALID_COMMAND;
 +}
 +break;
 +
 +default:
 +if (arg[i].len  30) {
 +ngx_log_debug2(NGX_LOG_DEBUG_MAIL, c-log, 0,
 + 

Re: Help with shared memory usage

2014-01-22 Thread Yichun Zhang (agentzh)
Hello Maxim!

On Wed, Jan 22, 2014 at 8:51 AM, Maxim Dounin wrote:

 It looks more or less correct, though I don't happy with the
 checks done, and there are various style issues.  I'm planning to
 look into it and build a better version as time permits.


We're also having this issue. Hopefully this patch can get updated and
merged soon :)

Thanks for your time!

Best regards,
-agentzh

___
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel


v1.5.9 compiled size is 8x larger than v1.5.8

2014-01-22 Thread Jim Popovitch
Hello,

I'm seeing a strange problem with v1.5.9, the compiled binary is 8
times larger than it was on v1.5.8.   My build environment (debian) is
the same that I've used for v1.5.8.

Production:
~$ nginx -V
nginx version: nginx/1.5.8
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx
--conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log
--http-client-body-temp-path=/var/lib/nginx/body
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi
--http-log-path=/var/log/nginx/access.log
--http-proxy-temp-path=/var/lib/nginx/proxy
--lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid
--with-pcre-jit --with-http_gzip_static_module --with-http_ssl_module
--with-http_spdy_module --with-ipv6 --without-http_browser_module
--without-http_geo_module --without-http_limit_req_module
--without-http_limit_zone_module --without-http_memcached_module
--without-http_referer_module --without-http_scgi_module
--without-http_split_clients_module --with-http_stub_status_module
--without-http_ssi_module --without-http_userid_module
--without-http_uwsgi_module
~$ ls -al /usr/sbin/nginx
-rwxr-xr-x 1 root root 613080 Dec 30 19:15 /usr/sbin/nginx


Testbed:
~$ nginx -V
nginx version: nginx/1.5.9
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx
--conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log
--http-client-body-temp-path=/var/lib/nginx/body
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi
--http-log-path=/var/log/nginx/access.log
--http-proxy-temp-path=/var/lib/nginx/proxy
--lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid
--with-pcre-jit --with-http_gzip_static_module --with-http_ssl_module
--with-http_spdy_module --with-ipv6 --without-http_browser_module
--without-http_geo_module --without-http_limit_req_module
--without-http_limit_zone_module --without-http_memcached_module
--without-http_referer_module --without-http_scgi_module
--without-http_split_clients_module --with-http_stub_status_module
--without-http_ssi_module --without-http_userid_module
--without-http_uwsgi_module
~$ ls -al /usr/sbin/nginx
-rwxr-xr-x 1 root root 5226396 Jan 22 16:11 /usr/sbin/nginx


What could be causing the increased binary size?

Thank you,

-Jim P.

___
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel


Re: v1.5.9 compiled size is 8x larger than v1.5.8

2014-01-22 Thread Ruslan Ermilov
On Wed, Jan 22, 2014 at 02:56:38PM -0500, Jim Popovitch wrote:
 I'm seeing a strange problem with v1.5.9, the compiled binary is 8
 times larger than it was on v1.5.8.   My build environment (debian) is
 the same that I've used for v1.5.8.
 
 Production:
 ~$ nginx -V
 nginx version: nginx/1.5.8
 TLS SNI support enabled
 configure arguments: --prefix=/etc/nginx
 --conf-path=/etc/nginx/nginx.conf
 --error-log-path=/var/log/nginx/error.log
 --http-client-body-temp-path=/var/lib/nginx/body
 --http-fastcgi-temp-path=/var/lib/nginx/fastcgi
 --http-log-path=/var/log/nginx/access.log
 --http-proxy-temp-path=/var/lib/nginx/proxy
 --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid
 --with-pcre-jit --with-http_gzip_static_module --with-http_ssl_module
 --with-http_spdy_module --with-ipv6 --without-http_browser_module
 --without-http_geo_module --without-http_limit_req_module
 --without-http_limit_zone_module --without-http_memcached_module
 --without-http_referer_module --without-http_scgi_module
 --without-http_split_clients_module --with-http_stub_status_module
 --without-http_ssi_module --without-http_userid_module
 --without-http_uwsgi_module
 ~$ ls -al /usr/sbin/nginx
 -rwxr-xr-x 1 root root 613080 Dec 30 19:15 /usr/sbin/nginx
 
 
 Testbed:
 ~$ nginx -V
 nginx version: nginx/1.5.9
 TLS SNI support enabled
 configure arguments: --prefix=/etc/nginx
 --conf-path=/etc/nginx/nginx.conf
 --error-log-path=/var/log/nginx/error.log
 --http-client-body-temp-path=/var/lib/nginx/body
 --http-fastcgi-temp-path=/var/lib/nginx/fastcgi
 --http-log-path=/var/log/nginx/access.log
 --http-proxy-temp-path=/var/lib/nginx/proxy
 --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid
 --with-pcre-jit --with-http_gzip_static_module --with-http_ssl_module
 --with-http_spdy_module --with-ipv6 --without-http_browser_module
 --without-http_geo_module --without-http_limit_req_module
 --without-http_limit_zone_module --without-http_memcached_module
 --without-http_referer_module --without-http_scgi_module
 --without-http_split_clients_module --with-http_stub_status_module
 --without-http_ssi_module --without-http_userid_module
 --without-http_uwsgi_module
 ~$ ls -al /usr/sbin/nginx
 -rwxr-xr-x 1 root root 5226396 Jan 22 16:11 /usr/sbin/nginx
 
 
 What could be causing the increased binary size?
 
 Thank you,

Could it be that you lost some shared library that nginx uses?

For the starters, compare the outputs of file /usr/sbin/nginx
(are both binaries are stripped) and ldd /usr/sbin/nginx (do
they show the same shared libs)?

___
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel


Re: v1.5.9 compiled size is 8x larger than v1.5.8

2014-01-22 Thread Jim Popovitch
On Wed, Jan 22, 2014 at 3:23 PM, Ruslan Ermilov r...@nginx.com wrote:
 Could it be that you lost some shared library that nginx uses?

 For the starters, compare the outputs of file /usr/sbin/nginx
 (are both binaries are stripped) and ldd /usr/sbin/nginx (do
 they show the same shared libs)?

Hmmm, the 2 environments (Production and Testbed) are identical,
Debian 7.3 x86_64.

Production (v1.5.8):
~$ file /usr/sbin/nginx
/usr/sbin/nginx: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.26,
BuildID[sha1]=0xe63406c0f961166e7b17abd320290fb2c8e976ee, stripped
~$ ldd /usr/sbin/nginx
linux-vdso.so.1 =  (0x7fffc67ff000)
libpthread.so.0 = /lib/x86_64-linux-gnu/libpthread.so.0 (0x7f9e6d744000)
libcrypt.so.1 = /lib/x86_64-linux-gnu/libcrypt.so.1 (0x7f9e6d50d000)
libpcre.so.3 = /lib/x86_64-linux-gnu/libpcre.so.3 (0x7f9e6d2cf000)
libssl.so.1.0.0 = /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
(0x7f9e6d06f000)
libcrypto.so.1.0.0 = /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
(0x7f9e6cc8b000)
libdl.so.2 = /lib/x86_64-linux-gnu/libdl.so.2 (0x7f9e6ca86000)
libz.so.1 = /lib/x86_64-linux-gnu/libz.so.1 (0x7f9e6c86f000)
libc.so.6 = /lib/x86_64-linux-gnu/libc.so.6 (0x7f9e6c4e5000)
/lib64/ld-linux-x86-64.so.2 (0x7f9e6d965000)


Testbed (v1.5.9)
~$ file /usr/sbin/nginx
/usr/sbin/nginx: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.26,
BuildID[sha1]=0x38b6c11381d456bce11faaa5c5178f68886816a5, not stripped
~$ ldd /usr/sbin/nginx
linux-vdso.so.1 =  (0x7fff24d4a000)
libpthread.so.0 = /lib/x86_64-linux-gnu/libpthread.so.0 (0x7fb3a7424000)
libcrypt.so.1 = /lib/x86_64-linux-gnu/libcrypt.so.1 (0x7fb3a71ed000)
libpcre.so.3 = /lib/x86_64-linux-gnu/libpcre.so.3 (0x7fb3a6faf000)
libssl.so.1.0.0 = /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
(0x7fb3a6d4f000)
libcrypto.so.1.0.0 = /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
(0x7fb3a696b000)
libdl.so.2 = /lib/x86_64-linux-gnu/libdl.so.2 (0x7fb3a6766000)
libz.so.1 = /lib/x86_64-linux-gnu/libz.so.1 (0x7fb3a654f000)
libc.so.6 = /lib/x86_64-linux-gnu/libc.so.6 (0x7fb3a61c5000)
/lib64/ld-linux-x86-64.so.2 (0x7fb3a7645000)

-Jim P.

___
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel