sefaults on log

Maxim Dounin mdounin at mdounin.ru
Mon Sep 6 14:20:52 MSD 2010


Hello!

On Mon, Sep 06, 2010 at 02:03:59PM +0400, Franchoze Eric wrote:

> Sometimes I have segfaults nginx thread on trying to write error 
> log.  From this back trace it's  unclear for me why nginx does 
> not fail on thngx_connection_error() with dereferencing 
> c(0x0)->log.  Is it gdb bug?

It looks like you're running nginx compiled with something like 
-O2 (or even -O3).  This optimization level isn't really useful 
for debugging and may produce show many optimization artefacts 
(like the one you've noticed).  You may want to recompile with -O0 
(or at least -O1) to make backtrace usefull.

[...]

> X86/64 (64 bit nginx).
> nginx version: afts/0.8.50
> built by gcc 4.1.2 20080704 (Red Hat 4.1.2-48)
> configure arguments: --prefix=/usr --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --user=www --group=www --with-http_flv_module --with-http_gzip_static_module --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/nginx/client/ --http-proxy-temp-path=/var/nginx/proxy/ --http-fastcgi-temp-path=/var/nginx/fcgi/ --with-http_stub_status_module --add-module=/usr/src/redhat/SOURCES/af-headers --add-module=/usr/src/redhat/SOURCES/echo-module --add-module=/usr/src/redhat/SOURCES/gunzip

Are you able to reproduce the problem without third party 
modules/patches compiled in?  If yes - please provide more 
details (see http://wiki.nginx.org/NginxDebugging).

Maxim Dounin



More information about the nginx-devel mailing list