Re: Segfault using fastcgi application

Janis Volbergs <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
Vishal Singh wrote:

>Hello,
>
>I am using fastcgi and it starts my application when the server is started.
>
>The problem I am facing is :
>
>When I run the application standalone it works perfectly all right.
>When the application is started by fastcgi, it gets killed returning
>Internal server error to the browser.
>
>I tried to do gdb for the launched process, which gives the following.
>
>  
>

show the code, where you have this getenv.. maybe you pass pointer that 
points to bad address? uninitialized or smtn.

>Program received signal SIGSEGV, Segmentation fault.
>[Switching to Thread 24423344 (LWP 9587)]
>0x004ffcca in getenv () from /lib/tls/libc.so.6
>(gdb) bt
>#0  0x004ffcca in getenv () from /lib/tls/libc.so.6
>#1  0x005abcaa in __res_vinit () from /lib/tls/libc.so.6
>#2  0x005ade56 in __res_maybe_init () from /lib/tls/libc.so.6
>#3  0x00974c8b in res_search () from /lib/libresolv.so.2
>#4  0x081061f2 in server_hosts (domain=0x9ff78b0 "seoul.clic.cs.columbia.edu",
>    service=0x8131fd9 "sip", type=0, port=-5060, entries=0x174a178)
>    at ../libcine/servers.c:303
>#5  0x08106841 in servers (domain=0x9ff78b0 "seoul.clic.cs.columbia.edu",
>    service=0x8131fd9 "sip", type=0, port=-5060) at ../libcine/servers.c:414
>#6  0x080b4ba4 in ClientGetLocations (uri=0x174a350, type=0)
>    at ../libsip/client.c:2657
>#7  0x080b1a5f in DoLocationLookup (info=0x9ff7b3c) at ../libsip/client.c:1096
>#8  0x080b0fd6 in InitialClientStart (rs=0x9ff47d8) at ../libsip/client.c:799
>#9  0x0810f2b2 in reactive_system_event (rs=0x9ff47d8)
>    at ../libcine/reactivesystem.c:732
>#10 0x0810c262 in pool_routine (arg=0x9feafe8) at ../libcine/thread_pool.c:526
>#11 0x008a9371 in start_thread () from /lib/tls/libpthread.so.0
>#12 0x0059d9be in clone () from /lib/tls/libc.so.6
>  
>

also, using threads with fastcgi is somewhat dangerous (pthread).
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.