id summary reporter owner description type status priority milestone component version resolution keywords cc uname nginx_version 788 Segfault with dynamic upstream and many SSI includes joh-m@… "Hello, we are using nginx to combine fragments from some upstream services. We have defined multiple locations which are doing proxy_pass to multiple upstream services. These services can return an html document with lots of SSI includes, which then refer to different other locations also configured in nginx, which again do proxy_pass to some other upstreams (example configuration attached). As we are hosting on AWS and are using elastic loadbalancers as upstreams we need to make use of the resolver (because of changing IP addresses). Currently we experience issues when parsing a document with ~800 SSI includes (all referencing the same location and therefore the same upstream). The worker segfaults with a long stacktrace in ngx_http_finalize_connection (r=0x242b1d0) at src/http/ngx_http_request.c:2545 (stacktrace attached). This doesn't happen when configuring the upstream without a variable. In the debug log we see lots of resolver messages. I assume nginx is starting a resolver action for each of the includes, instead of relying on the cached response (TTL is 60s). We tested with nginx 1.6.x (vanilla Amazon Linux), 1.8.0 (self-compiled with ngx_pagespeed), 1.9.4 (self-compiled with ngx_pagespeed) Regards Johannes Müller" defect closed major nginx-core 1.8.x fixed ssi proxy_pass resolver segfault jmueller@… Linux ip-10-0-154-103 3.14.48-33.39.amzn1.x86_64 #1 SMP Tue Jul 14 23:43:07 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux "nginx version: nginx/1.8.0 built by gcc 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) built with OpenSSL 1.0.1k-fips 8 Jan 2015 TLS SNI support enabled configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --add-module=ngx_pagespeed-1.9.32.4-beta --add-module=srcache-nginx-module-0.30 --with-file-aio --with-ipv6 --with-http_spdy_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'"