A problem while using nginx1.4.6 and nginx1.8.0 for web service

Hello,

This is Amily.
I meet a problem while using nginx1.4.6 and nginx1.8.0 for web service.

The follow is that the content shows on the /var/log/messages:
May 21 01:55:51 web3 kernel: nginx[16176] general protection
ip:3acd289713 sp:7fff98d6aba8 error:0 in libc-2.12.so[3acd200000+18a000]
May 21 01:56:01 web3 kernel: nginx[20064] general protection
ip:3acd289713 sp:7fff98d6ac08 error:0 in libc-2.12.so[3acd200000+18a000]
May 21 01:56:02 web3 kernel: nginx[16174] general protection
ip:3acd289713 sp:7fff98d6aba8 error:0 in libc-2.12.so[3acd200000+18a000]
May 21 01:56:07 web3 kernel: nginx[16195] general protection
ip:3acd279753 sp:7fff98d6ac20 error:0 in libc-2.12.so[3acd200000+18a000]
May 21 01:56:07 web3 kernel: nginx[5326] general protection
ip:3acd289713 sp:7fff98d6ac08 error:0 in libc-2.12.so[3acd200000+18a000]
May 21 02:49:41 web3 kernel: nginx[16192] general protection ip:4129bc
sp:7fff98d6ada0 error:0 in nginx[400000+9c000]
May 21 02:49:42 web3 kernel: nginx[16188]: segfault at 0 ip
0000003acd27b55c sp 00007fff98d69d88 error 4 in
libc-2.12.so[3acd200000+18a000]
May 21 02:49:48 web3 kernel: nginx[712] general protection ip:3acd289713
sp:7fff98d6ac08 error:0 in libc-2.12.so[3acd200000+18a000]
May 21 02:50:19 web3 kernel: nginx[2847] general protection
ip:3acd289713 sp:7fff98d6ac08 error:0 in libc-2.12.so[3acd200000+18a000]
May 21 02:50:19 web3 kernel: nginx[2872] general protection
ip:3acd279753 sp:7fff98d6ac80 error:0 in libc-2.12.so[3acd200000+18a000]
May 21 02:50:34 web3 kernel: nginx[3494] general protection ip:4129bc
sp:7fff98d6adc0 error:0 in nginx[400000+9c000]
May 21 02:50:34 web3 kernel: nginx[18681] general protection
ip:3acd289713 sp:7fff98d6ac08 error:0 in libc-2.12.so[3acd200000+18a000]
May 21 04:47:25 web3 kernel: nginx[10306] general protection ip:4129bc
sp:7fff98d6ada0 error:0 in nginx[400000+9c000]

And the follow content is the error showing in the nginx.error.log:

*** glibc detected *** nginx: worker process: free(): invalid next size
(normal): 0x0000000000c9e9d0 ***
*** glibc detected *** nginx: worker process: munmap_chunk(): invalid
pointer: 0x0000000001568f80 ***
*** glibc detected *** nginx: worker process: corrupted double-linked
list: 0x000000000173cf80 ***
*** glibc detected *** nginx: worker process: double free or corruption
(!prev): 0x0000000001a66990 ***
======= Backtrace: =========
/lib64/libc.so.6[0x3acd275e66]
/lib64/libc.so.6[0x3acd2789b3]
nginx: worker process(ngx_destroy_pool+0xdb)[0x40dec1]
nginx: worker process(ngx_http_free_request+0x1aa)[0x436934]
nginx: worker process[0x4369df]
nginx: worker process[0x437b92]
nginx: worker process(ngx_event_process_posted+0x87)[0x422de9]
nginx: worker process(ngx_process_events_and_timers+0x166)[0x422c0b]
nginx: worker process[0x4299d0]
nginx: worker process(ngx_spawn_process+0x485)[0x42815c]
nginx: worker process(ngx_master_process_cycle+0x566)[0x42a3e9]
nginx: worker process(main+0xa0b)[0x40d2cd]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x3acd21ed5d]
nginx: worker process[0x40ba99]
======= Memory map: ========
00400000-00491000 r-xp 00000000 08:03 1182281
/opt/nginx/sbin/nginx
00691000-006a0000 rw-p 00091000 08:03 1182281
/opt/nginx/sbin/nginx
006a0000-006af000 rw-p 00000000 00:00 0
01373000-014c4000 rw-p 00000000 00:00 0
014c4000-01ed8000 rw-p 00000000 00:00 0
3acce00000-3acce20000 r-xp 00000000 08:03 204694
/lib64/ld-2.12.so
3acd01f000-3acd020000 r–p 0001f000 08:03 204694
/lib64/ld-2.12.so
3acd020000-3acd021000 rw-p 00020000 08:03 204694
/lib64/ld-2.12.so

The attach file is the details about nginx error log while the website
is running .
Please help me to make sure whether it is something wrong about nginx. I
will be appreciated with your generous help.
Thanks

Best Regards,
Amliy

On Thursday 21 May 2015 20:16:18 谭芬芬 wrote:

Hello,

This is Amily.
I meet a problem while using nginx1.4.6 and nginx1.8.0 for web service.

[…]

Could you reproduce the problem without 3rd-party modules or patches?

wbr, Valentin V. Bartenev

On Friday 22 May 2015 09:45:52 [email protected] wrote:

Could you reproduce the problem without 3rd-party modules or patches?
?

We do not use?3rd-party modules or patches.We use ?configure?arguments of
nginx?like this:configure arguments: --prefix=/opt/nginx
–http-client-body-temp-path=/opt/nginx/client/
–http-proxy-temp-path=/opt/nginx/proxy/ --http-fastcgi-temp-path=/opt/nginx/fcgi/
–with-file-aio --with-http_realip_module --with-http_geoip_module
–with-http_sub_module --with-http_gunzip_module --with-http_gzip_static_module
–with-http_stub_status_module --without-http_uwsgi_module
–without-http_scgi_module --with-http_perl_module --without-mail_pop3_module
–without-mail_imap_module --without-mail_smtp_module --with-pcre
–with-http_ssl_module
And the configure arguments of php5.3.28 like this:Configure Command =>
‘./configure’ ‘–prefix=/opt/php’ ‘–enable-fpm’
‘–with-config-file-path=/opt/php/etc/’ ‘–with-libxml-dir’ ‘–with-openssl=/usr’
‘–with-zlib’ ‘–with-gd’ ‘–with-jpeg-dir’ ‘–with-png-dir’ ‘–with-freetype-dir’
‘–enable-gd-native-ttf’ ‘–enable-gd-jis-conv’ ‘–with-mhash’ ‘–enable-mbstring’
‘–with-mysql=mysqlnd’ ‘–with-mysqli=mysqlnd’ ‘–with-pdo-mysql=mysqlnd’
‘–enable-sockets’ ‘–with-curl’ ‘–enable-sysvmsg’ ‘–enable-sysvsem’
‘–enable-sysvshm’ ‘–with-pear’ ‘–enable-intl’ ‘–enable-soap’ ‘–enable-wddx’

Ok, then please provide a debug log and your configuration to reproduce
the issue.

See instructions here: A debugging log

wbr, Valentin V. Bartenev

On Thursday 21 May 2015 20:16:18 ̷ҷ wrote:

Hello,

This is Amily.
I meet a problem while using nginx1.4.6 and nginx1.8.0 for web service.

[…]
?
Could you reproduce the problem without 3rd-party modules or patches?
?

We do not use?3rd-party modules or patches.We use ?configure?arguments of
nginx?like this:configure arguments: --prefix=/opt/nginx
–http-client-body-temp-path=/opt/nginx/client/
–http-proxy-temp-path=/opt/nginx/proxy/ --http-fastcgi-temp-path=/opt/nginx/fcgi/
–with-file-aio --with-http_realip_module --with-http_geoip_module
–with-http_sub_module --with-http_gunzip_module --with-http_gzip_static_module
–with-http_stub_status_module --without-http_uwsgi_module
–without-http_scgi_module --with-http_perl_module --without-mail_pop3_module
–without-mail_imap_module --without-mail_smtp_module --with-pcre
–with-http_ssl_module
And the configure arguments of php5.3.28 like this:Configure Command =>
‘./configure’ ‘–prefix=/opt/php’ ‘–enable-fpm’
‘–with-config-file-path=/opt/php/etc/’ ‘–with-libxml-dir’
‘–with-openssl=/usr’ ‘–with-zlib’ ‘–with-gd’ ‘–with-jpeg-dir’
‘–with-png-dir’ ‘–with-freetype-dir’ ‘–enable-gd-native-ttf’
‘–enable-gd-jis-conv’ ‘–with-mhash’ ‘–enable-mbstring’
‘–with-mysql=mysqlnd’ ‘–with-mysqli=mysqlnd’
‘–with-pdo-mysql=mysqlnd’ ‘–enable-sockets’ ‘–with-curl’
‘–enable-sysvmsg’ ‘–enable-sysvsem’ ‘–enable-sysvshm’ ‘–with-pear’
‘–enable-intl’ ‘–enable-soap’ ‘–enable-wddx’

Hello!

On Fri, May 22, 2015 at 03:46:13PM +0300, Valentin V. Bartenev wrote:

?
Could you reproduce the problem without 3rd-party modules or patches?
?

We do not use?3rd-party modules or patches.We use ?configure?arguments of
nginx?like this:configure arguments: --prefix=/opt/nginx
–http-client-body-temp-path=/opt/nginx/client/
–http-proxy-temp-path=/opt/nginx/proxy/ --http-fastcgi-temp-path=/opt/nginx/fcgi/
–with-file-aio --with-http_realip_module --with-http_geoip_module
–with-http_sub_module --with-http_gunzip_module --with-http_gzip_static_module
–with-http_stub_status_module --without-http_uwsgi_module
–without-http_scgi_module --with-http_perl_module --without-mail_pop3_module
–without-mail_imap_module --without-mail_smtp_module --with-pcre
–with-http_ssl_module
And the configure arguments of php5.3.28 like this:Configure Command =>
‘./configure’ ‘–prefix=/opt/php’ ‘–enable-fpm’
‘–with-config-file-path=/opt/php/etc/’ ‘–with-libxml-dir’ ‘–with-openssl=/usr’
‘–with-zlib’ ‘–with-gd’ ‘–with-jpeg-dir’ ‘–with-png-dir’ ‘–with-freetype-dir’
‘–enable-gd-native-ttf’ ‘–enable-gd-jis-conv’ ‘–with-mhash’ ‘–enable-mbstring’
‘–with-mysql=mysqlnd’ ‘–with-mysqli=mysqlnd’ ‘–with-pdo-mysql=mysqlnd’
‘–enable-sockets’ ‘–with-curl’ ‘–enable-sysvmsg’ ‘–enable-sysvsem’
‘–enable-sysvshm’ ‘–with-pear’ ‘–enable-intl’ ‘–enable-soap’ ‘–enable-wddx’

Ok, then please provide a debug log and your configuration to reproduce the
issue.

See instructions here: A debugging log

I would also recommend the following (in no particular order):

  • Take a look at Debugging | NGINX for some basic
    hints. In particular, full config will likely be needed to
    analyze the problem.

  • I see there are perl and libgeoip libraries are loaded into
    nginx. Both can produce arbitrary problems - in particular,
    libgeoip is known to do wierd things with corrupted databases;
    and perl modules can do anything. It’s good idea to make
    sure the problem can be reproduced without perl and geoip
    (either without these modules compiled in, or at least without
    them being used in the configuration).


Maxim D.
http://nginx.org/