Process corruption on CentOS 5.6

On CentOS 5.6, nginx 1.1.4 configured to work with php-fpm using fastcgi
port. nginx was compiled with: configure --prefix=/usr/local/nginx
–with-http_ssl_module --with-http_realip_module
–with-http_geoip_module --with-http_flv_module
–with-http_gzip_static_module --with-http_stub_status_module
–with-http_addition_module --with-http_image_filter_module
–with-http_sub_module --with-http_degradation_module
–add-module=addons/ngx_upstream_fair --with-cc-opt="-D
NGX_UPSTREAM_KEEPALIVE_PATCHED"

every few seconds, i get:

*** glibc detected *** nginx: worker process: double free or corruption
(!prev): 0x000000001d069800 ***

======= Backtrace: =========
/lib64/libc.so.6[0x3cd4c7245f]
/lib64/libc.so.6(cfree+0x4b)[0x3cd4c728bb]
nginx: worker process[0x407628]
nginx: worker process[0x43c6e1]
nginx: worker process[0x43ec4a]
nginx: worker process[0x43e691]
nginx: worker process[0x43eca3]
nginx: worker process[0x43ed2e]
nginx: worker process[0x43d26d]
nginx: worker process[0x421a96]
nginx: worker process[0x41ab68]
nginx: worker process[0x420720]
nginx: worker process[0x41f057]
nginx: worker process[0x420f09]
nginx: worker process[0x406a7a]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x3cd4c1d994]
nginx: worker process[0x405249]
======= Memory map: ========
00400000-00482000 r-xp 00000000 68:05 6882046
/usr/local/nginx/sbin/nginx
00681000-00693000 rw-p 00081000 68:05 6882046
/usr/local/nginx/sbin/nginx
00693000-006a1000 rw-p 00693000 00:00 0
1d041000-1d22b000 rw-p 1d041000 00:00 0
[heap]
3cd4800000-3cd481c000 r-xp 00000000 68:05 6389762
/lib64/ld-2.5.so
3cd4a1c000-3cd4a1d000 r–p 0001c000 68:05 6389762
/lib64/ld-2.5.so
3cd4a1d000-3cd4a1e000 rw-p 0001d000 68:05 6389762
/lib64/ld-2.5.so
3cd4c00000-3cd4d4e000 r-xp 00000000 68:05 6389764
/lib64/libc-2.5.so
3cd4d4e000-3cd4f4e000 —p 0014e000 68:05 6389764
/lib64/libc-2.5.so
3cd4f4e000-3cd4f52000 r–p 0014e000 68:05 6389764
/lib64/libc-2.5.so
3cd4f52000-3cd4f53000 rw-p 00152000 68:05 6389764
/lib64/libc-2.5.so
3cd4f53000-3cd4f58000 rw-p 3cd4f53000 00:00 0
3cd5000000-3cd501e000 r-xp 00000000 68:05 6391224
/lib64/libpcre.so.0.0.1
3cd501e000-3cd521e000 —p 0001e000 68:05 6391224
/lib64/libpcre.so.0.0.1
3cd521e000-3cd521f000 rw-p 0001e000 68:05 6391224
/lib64/libpcre.so.0.0.1
3cd5400000-3cd5416000 r-xp 00000000 68:05 6389787
/lib64/libpthread-2.5.so
3cd5416000-3cd5615000 —p 00016000 68:05 6389787
/lib64/libpthread-2.5.so
3cd5615000-3cd5616000 r–p 00015000 68:05 6389787
/lib64/libpthread-2.5.so
3cd5616000-3cd5617000 rw-p 00016000 68:05 6389787
/lib64/libpthread-2.5.so
3cd5617000-3cd561b000 rw-p 3cd5617000 00:00 0
3cd5800000-3cd5882000 r-xp 00000000 68:05 6389811
/lib64/libm-2.5.so
3cd5882000-3cd5a81000 —p 00082000 68:05 6389811
/lib64/libm-2.5.so
3cd5a81000-3cd5a82000 r–p 00081000 68:05 6389811
/lib64/libm-2.5.so
3cd5a82000-3cd5a83000 rw-p 00082000 68:05 6389811
/lib64/libm-2.5.so
3cd5c00000-3cd5c14000 r-xp 00000000 68:05 6260001
/usr/lib64/libz.so.1.2.3
3cd5c14000-3cd5e13000 —p 00014000 68:05 6260001
/usr/lib64/libz.so.1.2.3
3cd5e13000-3cd5e14000 rw-p 00013000 68:05 6260001
/usr/lib64/libz.so.1.2.3
3cd6000000-3cd6020000 r-xp 00000000 68:05 6272360
/usr/lib64/libgd.so.2.0.0
3cd6020000-3cd621f000 —p 00020000 68:05 6272360
/usr/lib64/libgd.so.2.0.0
3cd621f000-3cd6240000 rw-p 0001f000 68:05 6272360
/usr/lib64/libgd.so.2.0.0
3cd6240000-3cd6254000 rw-p 3cd6240000 00:00 0
3cd6400000-3cd6415000 r-xp 00000000 68:05 6391132
/lib64/libselinux.so.1
3cd6415000-3cd6615000 —p 00015000 68:05 6391132
/lib64/libselinux.so.1
3cd6615000-3cd6617000 rw-p 00015000 68:05 6391132
/lib64/libselinux.so.1
3cd6617000-3cd6618000 rw-p 3cd6617000 00:00 0
3cd6c00000-3cd6c0d000 r-xp 00000000 68:05 6391157
/lib64/libgcc_s-4.1.2-20080825.so.1
3cd6c0d000-3cd6e0d000 —p 0000d000 68:05 6391157
/lib64/libgcc_s-4.1.2-20080825.so.1
3cd6e0d000-3cd6e0e000 rw-p 0000d000 68:05 6391157
/lib64/libgcc_s-4.1.2-20080825.so.1
3cd7400000-3cd7409000 r-xp 00000000 68:05 6391136
/lib64/libcrypt-2.5.so
3cd7409000-3cd7608000 —p 00009000 68:05 6391136
/lib64/libcrypt-2.5.so
3cd7608000-3cd7609000 r–p 00008000 68:05 6391136
/lib64/libcrypt-2.5.so
3cd7609000-3cd760a000 rw-p 00009000 68:05 6391136
/lib64/libcrypt-2.5.so
3cd760a000-3cd7638000 rw-p 3cd760a000 00:00 0
3cd7800000-3cd787f000 r-xp 00000000 68:05 6260010
/usr/lib64/libfreetype.so.6.3.10
3cd787f000-3cd7a7f000 —p 0007f000 68:05 6260010
/usr/lib64/libfreetype.so.6.3.10
3cd7a7f000-3cd7a84000 rw-p 0007f000 68:05 6260010
/usr/lib64/libfreetype.so.6.3.10
3cd8000000-3cd8021000 r-xp 00000000 68:05 6260000
/usr/lib64/libjpeg.so.62.0.0
3cd8021000-3cd8220000 —p 00021000 68:05 6260000
/usr/lib64/libjpeg.so.62.0.0
3cd8220000-3cd8221000 rw-p 00020000 68:05 6260000
/usr/lib64/libjpeg.so.62.0.0
3cd8400000-3cd8429000 r-xp 00000000 68:05 6260011
/usr/lib64/libfontconfig.so.1.1.0
3cd8429000-3cd8629000 —p 00029000 68:05 6260011
/usr/lib64/libfontconfig.so.1.1.0
3cd8629000-3cd8633000 rw-p 00029000 68:05 6260011
/usr/lib64/libfontconfig.so.1.1.0
3cd8633000-3cd8634000 rw-p 3cd8633000 00:00 0
3cd8800000-3cd8905000 r-xp 00000000 68:05 6260015
/usr/lib64/libX11.so.6.2.0
3cd8905000-3cd8b05000 —p 00105000 68:05 6260015
/usr/lib64/libX11.so.6.2.0
3cd8b05000-3cd8b0c000 rw-p 00105000 68:05 6260015
/usr/lib64/libX11.so.6.2.0
3cd8c00000-3cd8c02000 r-xp 00000000 68:05 6260013
/usr/lib64/libXau.so.6.0.0
3cd8c02000-3cd8e01000 —p 00002000 68:05 6260013
/usr/lib64/libXau.so.6.0.0
3cd8e01000-3cd8e02000 rw-p 00001000 68:05 6260013
/usr/lib64/libXau.so.6.0.0
3cd9400000-3cd9420000 r-xp 00000000 68:05 6391150
/lib64/libexpat.so.0.5.0
3cd9420000-3cd961f000 —p 00020000 68:05 6391150
/lib64/libexpat.so.0.5.0
3cd961f000-3cd9622000 rw-p 0001f000 68:05 6391150
/lib64/libexpat.so.0.5.0
3cd9c00000-3cd9c05000 r-xp 00000000 68:05 6260014
/usr/lib64/libXdmcp.so.6.0.0
3cd9c05000-3cd9e04000 —p 00005000 68:05 6260014
/usr/lib64/libXdmcp.so.6.0.0
3cd9e04000-3cd9e05000 rw-p 00004000 68:05 6260014
/usr/lib64/libXdmcp.so.6.0.0
3cda400000-3cda402000 r-xp 00000000 68:05 6391216
/lib64/libkeyutils-1.2.so
3cda402000-3cda601000 —p 00002000 68:05 6391216
/lib64/libkeyutils-1.2.so
3cda601000-3cda602000 rw-p 00001000 68:05 6391216
/lib64/libkeyutils-1.2.so
3cda800000-3cda811000 r-xp 00000000 68:05 6391217
/lib64/libresolv-2.5.so
3cda811000-3cdaa11000 —p 00011000 68:05 6391217
/lib64/libresolv-2.5.so
3cdaa11000-3cdaa12000 r–p 00011000 68:05 6391217
/lib64/libresolv-2.5.so
3cdaa12000-3cdaa13000 rw-p 00012000 68:05 6391217
/lib64/libresolv-2.5.so
3cdaa13000-3cdaa15000 rw-p 3cdaa13000 00:00 0
3cdb000000-3cdb002000 r-xp 00000000 68:05 6391218
/lib64/libcom_err.so.2.1
3cdb002000-3cdb201000 —p 00002000 68:05 6391218
/lib64/libcom_err.so.2.1
3cdb201000-3cdb202000 rw-p 00001000 68:05 6391218
/lib64/libcom_err.so.2.1
3cdc000000-3cdc023000 r-xp 00000000 68:05 6260012
/usr/lib64/libpng12.so.0.10.0
3cdc023000-3cdc223000 —p 00023000 68:05 6260012
/usr/lib64/libpng12.so.0.10.0
3cdc223000-3cdc224000 rw-p 00023000 68:05 6260012
/usr/lib64/libpng12.so.0.10.0
3cdc400000-3cdc52d000 r-xp 00000000 68:05 6391146
/lib64/libcrypto.so.0.9.8e
3cdc52d000-3cdc72c000 —p 0012d000 68:05 6391146
/lib64/libcrypto.so.0.9.8e
3cdc72c000-3cdc74d000 rw-p 0012c000 68:05 6391146
/lib64/libcrypto.so.0.9.8e
3cdc74d000-3cdc751000 rw-p 3cdc74d000 00:00 0
3cdc800000-3cdc892000 r-xp 00000000 68:05 6270008
/usr/lib64/libkrb5.so.3.3
3cdc892000-3cdca91000 —p 00092000 68:05 6270008
/usr/lib64/libkrb5.so.3.3
3cdca91000-3cdca95000 rw-p 00091000 68:05 6270008
/usr/lib64/libkrb5.so.3.3
3cdcc00000-3cdcc24000 r-xp 00000000 68:05 6270001
/usr/lib64/libk5crypto.so.3.1
3cdcc24000-3cdce23000 —p 00024000 68:05 6270001
/usr/lib64/libk5crypto.so.3.1
3cdce23000-3cdce25000 rw-p 00023000 68:05 6270001
/usr/lib64/libk5crypto.so.3.1
3cdd000000-3cdd008000 r-xp 00000000 68:05 6269995
/usr/lib64/libkrb5support.so.0.1
3cdd008000-3cdd207000 —p 00008000 68:05 6269995
/usr/lib64/libkrb5support.so.0.1
3cdd207000-3cdd208000 rw-p 00007000 68:05 6269995
/usr/lib64/libkrb5support.so.0.1
3cdd400000-3cdd42c000 r-xp 00000000 68:05 6270239
/usr/lib64/libgssapi_krb5.so.2.2
3cdd42c000-3cdd62c000 —p 0002c000 68:05 6270239
/usr/lib64/libgssapi_krb5.so.2.2
3cdd62c000-3cdd62e000 rw-p 0002c000 68:05 6270239
/usr/lib64/libgssapi_krb5.so.2.2
3cddc00000-3cddc46000 r-xp 00000000 68:05 6391219
/lib64/libssl.so.0.9.8e
3cddc46000-3cdde46000 —p 00046000 68:05 6391219
/lib64/libssl.so.0.9.8e
3cdde46000-3cdde4c000 rw-p 00046000 68:05 6391219
/lib64/libssl.so.0.9.8e
3fee800000-3fee832000 r-xp 00000000 68:05 6276884
/usr/lib64/libGeoIP.so.1.4.6
3fee832000-3feea32000 —p 00032000 68:05 6276884
/usr/lib64/libGeoIP.so.1.4.6
3feea32000-3feea33000 rw-p 00032000 68:05 6276884
/usr/lib64/libGeoIP.so.1.4.6
2b71700eb000-2b71700ed000 rw-p 2b71700eb000 00:00 0
2b71700ed000-2b71700f5000 rw-s 00000000 00:09 3585823051
/dev/zero (deleted)
2b71700f5000-2b71700f6000 rw-s 00000000 00:09 3585823054
/dev/zero (deleted)
2b71700fc000-2b71700fd000 rw-p 2b71700fc000 00:00 0
2b71700fd000-2b71700ff000 r-xp 00000000 68:05 6389771
/lib64/libdl-2.5.so
2b71700ff000-2b71702ff000 —p 00002000 68:05 6389771
/lib64/libdl-2.5.so
2b71702ff000-2b7170300000 r–p 00002000 68:05 6389771
/lib64/libdl-2.5.so
2b7170300000-2b7170301000 rw-p 00003000 68:05 6389771
/lib64/libdl-2.5.so
2b7170301000-2b7170304000 rw-p 2b7170301000 00:00 0
2b7170304000-2b7170314000 r-xp 00000000 68:05 6269359
/usr/lib64/libXpm.so.4.11.0
2b7170314000-2b7170514000 —p 00010000 68:05 6269359
/usr/lib64/libXpm.so.4.11.0
2b7170514000-2b7170515000 rw-p 00010000 68:05 6269359
/usr/lib64/libXpm.so.4.11.0
2b7170515000-2b717051a000 rw-p 2b7170515000 00:00 0
2b717051a000-2b7170555000 r-xp 00000000 68:05 6389821
/lib64/libsepol.so.1
2b7170555000-2b7170755000 —p 0003b000 68:05 6389821
/lib64/libsepol.so.1
2b7170755000-2b7170756000 rw-p 0003b000 68:05 6389821
/lib64/libsepol.so.1
2b7170756000-2b7170763000 rw-p 2b7170756000 00:00 0
2b7170763000-2b717076d000 r-xp 00000000 68:05 6389786
/lib64/libnss_files-2.5.so
2b717076d000-2b717096c000 —p 0000a000 68:05 6389786
/lib64/libnss_files-2.5.so
2b717096c000-2b717096d000 r–p 00009000 68:05 6389786
/lib64/libnss_files-2.5.so
2b717096d000-2b717096e000 rw-p 0000a000 68:05 6389786
/lib64/libnss_files-2.5.so
2b717096e000-2b7170c91000 rw-p 2b717096e000 00:00 0
7fffa9293000-7fffa92a8000 rw-p 7ffffffe9000 00:00 0
[stack]
7fffa92a9000-7fffa92ad000 r-xp 7fffa92a9000 00:00 0
[vdso]
ffffffffff600000-ffffffffffe00000 —p 00000000 00:00 0
[vsyscall]
2011/09/21 22:00:01 [alert] 29216#0: worker process 29786 exited on
signal 6

Thanks! this patch seems to have fixed it.

Regards,
Avishai

Hello!

On Wed, Sep 21, 2011 at 11:03:31PM +0300, Avishai Ish-Shalom wrote:

On CentOS 5.6, nginx 1.1.4 configured to work with php-fpm using fastcgi
port. nginx was compiled with: configure --prefix=/usr/local/nginx
–with-http_ssl_module --with-http_realip_module
–with-http_geoip_module --with-http_flv_module
–with-http_gzip_static_module --with-http_stub_status_module
–with-http_addition_module --with-http_image_filter_module
–with-http_sub_module --with-http_degradation_module
–add-module=addons/ngx_upstream_fair --with-cc-opt="-D
NGX_UPSTREAM_KEEPALIVE_PATCHED"

Just a side note: you don’t need --with-cc-opt="-D
NGX_UPSTREAM_KEEPALIVE_PATCHED"’.

every few seconds, i get:

*** glibc detected *** nginx: worker process: double free or corruption
(!prev): 0x000000001d069800 ***

Could you please provide backtrace? See here for details:
http://wiki.nginx.org/Debugging

Alternatively, please try the patch from here:
http://mailman.nginx.org/pipermail/nginx-devel/2011-September/001233.html

(And provide backtrace if it doesn’t help.)

Maxim D.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs