# Kernel: nginx\[18233\]: segfault at 0000000000000008 rip 000000000043edf8 rsp 00007fff34a21fa0 error 4

**URL:** <https://www.ruby-forum.com/t/kernel-nginx-18233-segfault-at-0000000000000008-rip-000000000043edf8-rsp-00007fff34a21fa0-error-4/206931>\
**Category:** NGINX\
**Created:** [May 13, 2011, 3:02pm UTC](https://www.ruby-forum.com/t/kernel-nginx-18233-segfault-at-0000000000000008-rip-000000000043edf8-rsp-00007fff34a21fa0-error-4/206931 "2011-05-13T15:02:28Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [May 13, 2011, 3:02pm UTC](https://www.ruby-forum.com/t/kernel-nginx-18233-segfault-at-0000000000000008-rip-000000000043edf8-rsp-00007fff34a21fa0-error-4/206931/1 "2011-05-13T15:02:28Z")

</div>

I having this message which i posted in subject repeating a lot in  
/var/log/messages,is this some kind of bug?Nginx ver 1.0.1

---

<div class="post-metadata">

**Author:** ![johnt519](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cab0a1/32.png) [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Post date:** [May 13, 2011, 3:19pm UTC](https://www.ruby-forum.com/t/kernel-nginx-18233-segfault-at-0000000000000008-rip-000000000043edf8-rsp-00007fff34a21fa0-error-4/206931/2 "2011-05-13T15:19:22Z")

</div>

Hello!

On Fri, May 13, 2011 at 03:02:28PM +0200, John T. wrote:

> I having this message which i posted in subject repeating a lot in  
> /var/log/messages,is this some kind of bug?Nginx ver 1.0.1

Segmentation fault is always some kind of bug (though not always  
in the programm which actually segfaults).

Please provide at least nginx -V output, config and backtrace.  
See here for more details:

> **[GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki...](https://github.com/nginxinc/nginx-wiki)**
>
> ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com

Maxim D.

---

<div class="post-metadata">

**Author:** ![johnt519](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cab0a1/32.png) [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Post date:** [May 13, 2011, 3:23pm UTC](https://www.ruby-forum.com/t/kernel-nginx-18233-segfault-at-0000000000000008-rip-000000000043edf8-rsp-00007fff34a21fa0-error-4/206931/3 "2011-05-13T15:23:04Z")

</div>

Here is output of V along with full conf options,not sure how to do  
backtrace.  
nginx: nginx version: nginx/1.0.1  
nginx: built by gcc 4.1.2 20080704 (Red Hat 4.1.2-48)  
nginx: TLS SNI support disabled  
nginx: configure arguments: --sbin-path=/usr/local/sbin  
–with-http\_ssl\_module --with-http\_geoip\_module  
–without-http\_autoindex\_module --without-mail\_pop3\_module  
–without-mail\_imap\_module --without-mail\_smtp\_module  
–with-http\_stub\_st  
atus\_module

---

<div class="post-metadata">

**Author:** ![johnt519](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cab0a1/32.png) [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Post date:** [May 13, 2011, 3:31pm UTC](https://www.ruby-forum.com/t/kernel-nginx-18233-segfault-at-0000000000000008-rip-000000000043edf8-rsp-00007fff34a21fa0-error-4/206931/4 "2011-05-13T15:31:44Z")

</div>

He gave you a hint: [Debugging | NGINX](http://wiki.nginx.org/Debugging)

---

<div class="post-metadata">

**Author:** ![johnt519](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cab0a1/32.png) [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Post date:** [May 26, 2011, 5:59pm UTC](https://www.ruby-forum.com/t/kernel-nginx-18233-segfault-at-0000000000000008-rip-000000000043edf8-rsp-00007fff34a21fa0-error-4/206931/5 "2011-05-26T17:59:38Z")

</div>

It’s a bit different segfault now: segfault at 0000000000000008 rip  
000000000043a5ab rsp 00007fff43146db0 error 4  
Probably because i upgraded to version 1.3.I didn’t do debugging,but i  
found out what exactly module causing segfault-it’s geoip module.I  
noticed by reverting to ver seven first,and segfault occurred  
again,including when i changed conf to configure without SSI and  
SSL.Before this segfault error i didn’t used geoip module.Perhaps is  
nginx overloaded due to a lot of request from redirected countries.Any  
idea how to fix it?

---

<div class="post-metadata">

**Author:** ![johnt519](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cab0a1/32.png) [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Post date:** [May 26, 2011, 6:10pm UTC](https://www.ruby-forum.com/t/kernel-nginx-18233-segfault-at-0000000000000008-rip-000000000043edf8-rsp-00007fff34a21fa0-error-4/206931/6 "2011-05-26T18:10:08Z")

</div>

Hello!

On Thu, May 26, 2011 at 05:59:38PM +0200, John T. wrote:

> It’s a bit different segfault now: segfault at 0000000000000008 rip  
> 000000000043a5ab rsp 00007fff43146db0 error 4  
> Probably because i upgraded to version 1.3.I didn’t do debugging,but i  
> found out what exactly module causing segfault-it’s geoip module.I  
> noticed by reverting to ver seven first,and segfault occurred  
> again,including when i changed conf to configure without SSI and  
> SSL.Before this segfault error i didn’t used geoip module.Perhaps is  
> nginx overloaded due to a lot of request from redirected countries.Any  
> idea how to fix it?

You may want to debug it further (see [GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com · GitHub](http://wiki.nginx.org/Debugging)),  
but please note that MaxMind’s GeoIP library (the one which geoip  
module uses) segfaults on incorrect/corrupted database[1].  
Checking if your MaxMind’s database isn’t corrupted is a good idea.

[1] And this is one of the reasons I recommend using geo module  
instead and always wonder if people use geoip.

Maxim D.

---

<div class="post-metadata">

**Author:** ![johnt519](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cab0a1/32.png) [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Post date:** [June 1, 2011, 4:34am UTC](https://www.ruby-forum.com/t/kernel-nginx-18233-segfault-at-0000000000000008-rip-000000000043edf8-rsp-00007fff34a21fa0-error-4/206931/7 "2011-06-01T04:34:28Z")

</div>

Hello everyone I new member ^^"

Posted at Nginx Forum:

> **[Nginx Forum :: Nginx Mailing List - English](https://forum.nginx.org/read.php?2,197782,202837#msg-202837)**
>
> A portal to and from the mailing list.

---

<div class="post-metadata">

**Author:** ![johnt519](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cab0a1/32.png) [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Post date:** [June 15, 2011, 12:49pm UTC](https://www.ruby-forum.com/t/kernel-nginx-18233-segfault-at-0000000000000008-rip-000000000043edf8-rsp-00007fff34a21fa0-error-4/206931/8 "2011-06-15T12:49:39Z")

</div>

Ok finally managed to do debugging after screwing around and also trying  
geomodule with maxmind(same segfault like on geoip module)and here is  
result of debugging:  
Reading symbols from /usr/local/sbin/nginx…done.  
Reading symbols from /lib64/libpthread.so.0…(no debugging symbols  
found)…done.  
Loaded symbols for /lib64/libpthread.so.0  
Reading symbols from /lib64/libcrypt.so.1…(no debugging symbols  
found)…done.  
Loaded symbols for /lib64/libcrypt.so.1  
Reading symbols from /lib64/libpcre.so.0…(no debugging symbols  
found)…done.  
Loaded symbols for /lib64/libpcre.so.0  
Reading symbols from /lib64/libcrypto.so.6…(no debugging symbols  
found)…done.  
Loaded symbols for /lib64/libcrypto.so.6  
Reading symbols from /usr/lib64/libz.so.1…(no debugging symbols  
found)…done.  
Loaded symbols for /usr/lib64/libz.so.1  
Reading symbols from /lib64/libc.so.6…(no debugging symbols  
found)…done.  
Loaded symbols for /lib64/libc.so.6  
Reading symbols from /lib64/ld-linux-x86-64.so.2…(no debugging symbols  
found)…done.  
Loaded symbols for /lib64/ld-linux-x86-64.so.2  
Reading symbols from /lib64/libdl.so.2…(no debugging symbols  
found)…done.  
Loaded symbols for /lib64/libdl.so.2  
Reading symbols from /lib64/libnss\_files.so.2…(no debugging symbols  
found)…done.  
Loaded symbols for /lib64/libnss\_files.so.2  
Reading symbols from /lib64/libnss\_dns.so.2…(no debugging symbols  
found)…done.  
Loaded symbols for /lib64/libnss\_dns.so.2  
Reading symbols from /lib64/libresolv.so.2…(no debugging symbols  
found)…done.  
Loaded symbols for /lib64/libresolv.so.2  
Core was generated by `nginx: worker process’.  
Program terminated with signal 11, Segmentation fault.  
#0 0x000000000043a55b in ngx\_http\_upstream\_init\_request (r=0x6341530)  
at src/http/ngx\_http\_upstream.c:622  
622 if (uscf-\>peer.init(r, uscf) != NGX\_OK) {

---

<div class="post-metadata">

**Author:** ![johnt519](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cab0a1/32.png) [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Post date:** [June 29, 2011, 3:17pm UTC](https://www.ruby-forum.com/t/kernel-nginx-18233-segfault-at-0000000000000008-rip-000000000043edf8-rsp-00007fff34a21fa0-error-4/206931/9 "2011-06-29T15:17:20Z")

</div>

Bump…

---

<div class="post-metadata">

**Author:** ![johnt519](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cab0a1/32.png) [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Post date:** [June 20, 2011, 2:09am UTC](https://www.ruby-forum.com/t/kernel-nginx-18233-segfault-at-0000000000000008-rip-000000000043edf8-rsp-00007fff34a21fa0-error-4/206931/10 "2011-06-20T02:09:49Z")

</div>

Anything ?

---

<div class="post-metadata">

**Author:** ![johnt519](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cab0a1/32.png) [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Post date:** [July 7, 2011, 11:55pm UTC](https://www.ruby-forum.com/t/kernel-nginx-18233-segfault-at-0000000000000008-rip-000000000043edf8-rsp-00007fff34a21fa0-error-4/206931/11 "2011-07-07T23:55:48Z")

</div>

I managed to find out how this was caused by single domain,but that  
domain is important too.So also what i found,it seems any kind of ip  
manipulation causes segmentation fault,including access control.So if i  
put a single deny ip into conf of that domain,seg fault will occur.Tried  
to find pattern or anything but nothing so far i was able to  
find.Weirdest bug ever.

---

<div class="post-metadata">

**Author:** ![johnt519](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cab0a1/32.png) [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Post date:** [November 20, 2011, 4:37pm UTC](https://www.ruby-forum.com/t/kernel-nginx-18233-segfault-at-0000000000000008-rip-000000000043edf8-rsp-00007fff34a21fa0-error-4/206931/12 "2011-11-20T16:37:23Z")

</div>

This bug still occur even after upgrading to latest version.I really  
dont understood why this domain causing seg fault…And i really need  
geo ip there because it’s domain where i receiving more traffic then any  
other domain.

---

<div class="post-metadata">

**Author:** ![johnt519](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cab0a1/32.png) [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Post date:** [November 20, 2011, 9:44pm UTC](https://www.ruby-forum.com/t/kernel-nginx-18233-segfault-at-0000000000000008-rip-000000000043edf8-rsp-00007fff34a21fa0-error-4/206931/13 "2011-11-20T21:44:19Z")

</div>

Hello!

On Sun, Nov 20, 2011 at 04:37:23PM +0100, John T. wrote:

> This bug still occur even after upgrading to latest version.I really  
> dont understood why this domain causing seg fault…And i really need  
> geo ip there because it’s domain where i receiving more traffic then any  
> other domain.

You’ve been already pointed to this link:

> **[GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki...](https://github.com/nginxinc/nginx-wiki)**
>
> ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com

Do you have backtrace?

Maxim D.
