Segmentation fault with nginx 1.7.8 using ngx_cache_purge-2.1
notr1ch opened this issue · 1 comments
Recent changes to the ngx_http_fastcgi_loc_conf_t structure cause segfaults on newer versions of nginx.
Reference: http://trac.nginx.org/nginx/changeset/f8e80f8c7fc75b6d7caf7812b63a1682c66c5ccb/nginx/
Starting program: /usr/sbin/nginx.debug -t
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x00000000004d258b in ngx_http_fastcgi_init_params (cf=0x7fffffffe7d0, conf=0x9124e0, params=0x9126a8, default_params=0x0) at src/http/modules/ngx_http_fastcgi_module.c:2853
2853 if (src[i].key.len > sizeof("HTTP_") - 1
(gdb) bt
#0 0x00000000004d258b in ngx_http_fastcgi_init_params (cf=0x7fffffffe7d0, conf=0x9124e0, params=0x9126a8, default_params=0x0) at src/http/modules/ngx_http_fastcgi_module.c:2853
#1 0x00000000004d21b5 in ngx_http_fastcgi_merge_loc_conf (cf=0x7fffffffe7d0, parent=0x8f0720, child=0x9124e0) at src/http/modules/ngx_http_fastcgi_module.c:2731
#2 0x000000000044e133 in ngx_http_merge_locations (cf=0x7fffffffe7d0, locations=0x8967b0, loc_conf=0x8efb28, module=0x73c6a0, ctx_index=24) at src/http/ngx_http.c:650
#3 0x000000000044e00a in ngx_http_merge_servers (cf=0x7fffffffe7d0, cmcf=0x7740c0, module=0x73c6a0, ctx_index=24) at src/http/ngx_http.c:607
#4 0x000000000044d4ba in ngx_http_block (cf=0x7fffffffe7d0, cmd=0x72eca0, conf=0x773498) at src/http/ngx_http.c:270
#5 0x00000000004241db in ngx_conf_handler (cf=0x7fffffffe7d0, last=1) at src/core/ngx_conf_file.c:391
#6 0x0000000000423d8a in ngx_conf_parse (cf=0x7fffffffe7d0, filename=0x772750) at src/core/ngx_conf_file.c:247
#7 0x0000000000420932 in ngx_init_cycle (old_cycle=0x7fffffffe910) at src/core/ngx_cycle.c:264
#8 0x00000000004081d8 in main (argc=2, argv=0x7fffffffebf8) at src/core/nginx.c:333
Sorry, I knew about this beforehand, but I didn't get time to fix it before nginx release.
Should be fixed in 68fd78a.