nginx-0.8.53 segfault

Maxim Dounin mdounin at mdounin.ru
Fri Jan 14 21:55:35 MSK 2011


Hello!

On Fri, Jan 14, 2011 at 06:15:50PM +0100, Maxim C. wrote:

> Maxim, thanks for your help. I saved fresh core :) to anothe directory 
> and ran gdb, output of the commands that you provided is:
> 
> (gdb) fr 0
> #0  0x080aaca8 in ngx_http_file_cache_update (r=0x8200528, tf=0x8201570) 
> at src/http/ngx_http_file_cache.c:790
> 790      if (c->updated) {
> (gdb) p c
> $1 = (ngx_http_cache_t *) 0x0
> (gdb) p *r
> $2 = {signature = 1347703880, connection = 0x8133e88, ctx = 0x82009d8, 

[...]

>   http_version = 1001, request_line = {len = 30, data = 0x81fbfa8 "GET 
> /preview/x045.jpg HTTP/1.1\r\nHost"}, uri = {len = 6, data = 0x8113d6c 
> "/empty"},

[...]

> filter_finalize = 1, post_action = 0, request_complete = 0, 

Ah, understood, it's image filter which triggers the problem.  I'm 
able to reproduce the problem here with the following config:

    server {
        listen 127.0.0.1:8080;

        location / {
            proxy_pass http://127.0.0.1:8080/bad/;
            proxy_cache one;
            proxy_cache_valid any 1h;

            image_filter   resize  150 100;
            error_page     415   = /empty;
        }

        location /empty {
            return 204;
        }

        location /bad/ {
            return 404;
        }
    }

Right now I think correct solution would be to move r->cache into 
upstream's private data (r->upstream).  Igor?

Maxim Dounin



More information about the nginx mailing list