Nginx core dump after FreeBSD version upgrade

I’m not sure if this is a big issue or not, but here goes:

Yesterday I upgraded from FreeBSD 8.0 to 8.1. At the final reboot nginx
did not start and gave a core dump. I had built nginx using gcc 4.5.1.
Rebuilding from source cleared the problem. Logs show nothing as nginx
never started.

nginx -V

nginx version: nginx/0.8.48
TLS SNI support enabled
configure arguments: --prefix=/usr/local/etc/nginx --with-cc-opt=’-I
/usr/local/include’ --with-ld-opt=’-L /usr/local/lib’
–conf-path=/usr/local/etc/nginx/nginx.conf
–sbin-path=/usr/local/sbin/nginx --pid-path=/var/run/nginx.pid
–error-log-path=/var/log/nginx-error.log --user=www --group=www
–with-file-aio --with-ipv6
–http-client-body-temp-path=/var/tmp/nginx/client_body_temp
–http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp
–http-proxy-temp-path=/var/tmp/nginx/proxy_temp
–http-scgi-temp-path=/var/tmp/nginx/scgi_temp
–http-uwsgi-temp-path=/var/tmp/nginx/uwsgi_temp
–http-log-path=/var/log/nginx-access.log --with-http_ssl_module
–with-http_stub_status_module --with-pcre

uname -vp

FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010
[email protected]:/usr/obj/usr/src/sys/GENERIC amd64

I did a similar FreeBSD upgrade on a an i386 system where nginx was
built using gcc 4.3.6 and nginx started as expected.

I can email the core privately if desired or post to the list.


Jim O.

On Thu, Aug 05, 2010 at 12:54:39PM -0400, Jim O. wrote:

configure arguments: --prefix=/usr/local/etc/nginx --with-cc-opt='-I
–http-log-path=/var/log/nginx-access.log --with-http_ssl_module
I can email the core privately if desired or post to the list.
It’s interesting to see core dump backtrace, if you still have old
binary and its sources.


Igor S.
http://sysoev.ru/en/

On 8/5/10 12:56 PM, Igor S. wrote:

It’s interesting to see core dump backtrace, if you still have old
binary and its sources.

I rebuilt the binary using ports and the old one was over written. All I
have is the core dump.

I’ll send it to you privately as it’s a big file and doesn’t need to be
sent to everyone.


Jim O.

On Thu, Aug 05, 2010 at 01:00:29PM -0400, Jim O. wrote:

On 8/5/10 12:56 PM, Igor S. wrote:

It’s interesting to see core dump backtrace, if you still have old
binary and its sources.

I rebuilt the binary using ports and the old one was over written. All I
have is the core dump.

I’m afraid it’s almost useless without the old binary.


Igor S.
http://sysoev.ru/en/

On Thu, Aug 05, 2010 at 12:54:39PM -0400, Jim O. wrote:

configure arguments: --prefix=/usr/local/etc/nginx --with-cc-opt=’-I
–http-log-path=/var/log/nginx-access.log --with-http_ssl_module
–with-http_stub_status_module --with-pcre

uname -vp

FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010
[email protected]:/usr/obj/usr/src/sys/GENERIC amd64

I did a similar FreeBSD upgrade on a an i386 system where nginx was
built using gcc 4.3.6 and nginx started as expected.
I can email the core privately if desired or post to the list.

Using system compiler (aka gcc 4.2.1) should helps you using
nginx without recompilation after OS upgrade.


Sergey A. Osokin,
[email protected]
[email protected]

On 8/5/10 2:13 PM, Sergey A. Osokin wrote:

TLS SNI support enabled
–http-uwsgi-temp-path=/var/tmp/nginx/uwsgi_temp

Using system compiler (aka gcc 4.2.1) should helps you using
nginx without recompilation after OS upgrade.

Understood. And perhaps this is neither the time nor the place, but
there are more than theoretical advantages to using a more modern
compiler for FreeBSD ports. See
http://www.freebsd.org/doc/en/articles/custom-gcc/article.html. A
potential 10-20% performance increase is significant. While some
binaries do not build properly, for those that do, it’s worth using a
later gcc version. This wasn’t a huge issue. In fact as far as I can
tell, nginx was the only binary affected by this and the fix was simple
and took only a couple of minutes if that.


Jim O.