Worker dies with a segfault error

Maxim Dounin mdounin at
Tue Mar 4 16:10:08 UTC 2014


On Tue, Mar 04, 2014 at 10:07:28AM -0500, greekduke wrote:

> Hello
> Below is the backtrace. I have seen the behaviour without eval and Postgres
> and I will try to take a trace tomorrow. In the debug log actually there is
> no error. Since I have only one worker the PID just changes to the new
> worker without any info. Since I am using nginx as proxy only I am
> suspecting that the error has to do with the proxy functionality.

Your config uses eval{} block in "location /", and postgres module 
is used inside of the eval{}.  That is, two 3rd party modules are 
used for each request, and bugs in these modules can easily cause 


> #0  ngx_pnalloc (pool=0x0, size=950) at src/core/ngx_palloc.c:155
> #1  0x0000000000437b20 in ngx_http_log_handler (r=0x1bfb540) at
> #2  0x000000000042d9dd in ngx_http_log_request (r=0x1bfb540) at
> #3  0x000000000042e04e in ngx_http_free_request (r=0x1bfb540, rc=0) at
> #4  0x000000000042fe5b in ngx_http_set_keepalive (r=0x1bfb540) at
> #5  ngx_http_finalize_connection (r=0x1bfb540) at
> #6  0x0000000000430724 in ngx_http_finalize_request (r=0x1bfb540, rc=-4) at
> #7  0x000000000042be5d in ngx_http_core_content_phase (r=0x1bfb540,
> #8  0x0000000000426873 in ngx_http_core_run_phases (r=0x1bfb540) at
> #9  0x000000000042db58 in ngx_http_run_posted_requests (c=0x7fc3cd0a74d0) at
> #10 0x0000000000440cfb in ngx_http_upstream_handler (ev=0x7fc3cce9e438) at
> #11 0x0000000000423257 in ngx_epoll_process_events (cycle=0x19bdde0,


Trace suggests most likely there is a problem with r->count 
reference counting somewhere.  As a next step, I would recommend 
you to try to reproduce the problem without 3rd party modules.

Maxim Dounin

More information about the nginx mailing list