# Nginx core dump after FreeBSD version upgrade

**URL:** <https://www.ruby-forum.com/t/nginx-core-dump-after-freebsd-version-upgrade/192801>\
**Category:** NGINX\
**Created:** [August 5, 2010, 6:55pm UTC](https://www.ruby-forum.com/t/nginx-core-dump-after-freebsd-version-upgrade/192801 "2010-08-05T18:55:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![joviyach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7bcc69/32.png) [@joviyach](https://www.ruby-forum.com/u/joviyach)\
**Post date:** [August 5, 2010, 6:55pm UTC](https://www.ruby-forum.com/t/nginx-core-dump-after-freebsd-version-upgrade/192801/1 "2010-08-05T18:55:15Z")

</div>

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  
removed\_email\_address@domain.invalid:/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.

---

<div class="post-metadata">

**Author:** ![joviyach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7bcc69/32.png) [@joviyach](https://www.ruby-forum.com/u/joviyach)\
**Post date:** [August 5, 2010, 6:57pm UTC](https://www.ruby-forum.com/t/nginx-core-dump-after-freebsd-version-upgrade/192801/2 "2010-08-05T18:57:36Z")

</div>

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.

> **[Igor Sysoev](http://sysoev.ru/en/)**

---

<div class="post-metadata">

**Author:** ![joviyach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7bcc69/32.png) [@joviyach](https://www.ruby-forum.com/u/joviyach)\
**Post date:** [August 5, 2010, 7:01pm UTC](https://www.ruby-forum.com/t/nginx-core-dump-after-freebsd-version-upgrade/192801/3 "2010-08-05T19:01:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![joviyach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7bcc69/32.png) [@joviyach](https://www.ruby-forum.com/u/joviyach)\
**Post date:** [August 5, 2010, 7:10pm UTC](https://www.ruby-forum.com/t/nginx-core-dump-after-freebsd-version-upgrade/192801/4 "2010-08-05T19:10:29Z")

</div>

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.

> **[Igor Sysoev](http://sysoev.ru/en/)**

---

<div class="post-metadata">

**Author:** ![joviyach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7bcc69/32.png) [@joviyach](https://www.ruby-forum.com/u/joviyach)\
**Post date:** [August 5, 2010, 8:15pm UTC](https://www.ruby-forum.com/t/nginx-core-dump-after-freebsd-version-upgrade/192801/5 "2010-08-05T20:15:29Z")

</div>

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  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):/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,  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![joviyach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7bcc69/32.png) [@joviyach](https://www.ruby-forum.com/u/joviyach)\
**Post date:** [August 5, 2010, 10:00pm UTC](https://www.ruby-forum.com/t/nginx-core-dump-after-freebsd-version-upgrade/192801/6 "2010-08-05T22:00:52Z")

</div>

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](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.
