nginx 0.8.41 segfaults in ngx_list_push

Roman Vasilyev roman at anchorfree.com
Sat Jun 19 05:26:51 MSD 2010


Hi,

I've found few coredumps in /tmp/ from nginx.
#0  0x00000000004055b8 in ngx_list_push (l=0xdf18e98) at 
src/core/ngx_list.c:45
45        if (last->nelts == l->nalloc) {
(gdb) bt
#0  0x00000000004055b8 in ngx_list_push (l=0xdf18e98) at 
src/core/ngx_list.c:45
#1  0x0000000000459643 in ngx_http_header_add (r=0xdf18e30, key=0x4686b1 
"X-AF-Serial", value=...)
     at /usr/src/redhat/SOURCES/af-headers/ngx_af_headers_module.c:370
#2  0x0000000000459789 in ngx_http_af_header_filter (r=0xdf18e30)
     at /usr/src/redhat/SOURCES/af-headers/ngx_af_headers_module.c:422
#3  0x000000000042536c in ngx_http_core_generic_phase (r=0xdf18e98, 
ph=0x4686b1)
     at src/http/ngx_http_core_module.c:874
......
......
......
......
(gdb) print last
$2 = (ngx_list_part_t *) 0x0
(gdb) list
40        void             *elt;
41        ngx_list_part_t  *last;
42
43        last = l->last;
44
45        if (last->nelts == l->nalloc) {
46
47            /* the last part is full, allocate a new list part */
48
49            last = ngx_palloc(l->pool, sizeof(ngx_list_part_t));
seems like in this function sometimes l->last could be NULL.
Is it will help if I'll send patch to fix this problem?



More information about the nginx mailing list