[OpenSIPS-Users] Opensips just stops responding

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Apr 12 14:23:25 CEST 2010


Hi Jayesh,

The trace shows your opensips is blocked in doing a DNS query.

I guess you have some domain name which get a very long timeout in query 
- this long timeout keeps an opensips processes blocked until timeout 
fires or gets an answer

I suggest to set up a local DNS server (as proxy) to force a very low 
timeout on queries (to avoid blocking all opensips processes in DNS).

This majoe problem is to be fixed in new opensips 2.0 version.

Regards,
Bogdan

Jayesh Nambiar wrote:
> Hi Bogdan,
> Tried different things on the script but still the script seems to die 
> after some time. "Some Time" could be few hours or few days. I was not 
> able to do the gdb and get the backtrace as one of my technician would 
> always restart it to get the opensips up and working. I was finally 
> able do the gdb and get the backtrace today. I have pasted the 
> backtrace, Please check and give me some idea on where to check and 
> correct for this?
>
> #0  0x0000003f83ac8fdf in poll () from /lib64/libc.so.6
> #1  0x0000003f88608e00 in __libc_res_nsend () from /lib64/libresolv.so.2
> #2  0x0000003f88607c26 in __libc_res_nquery () from /lib64/libresolv.so.2
> #3  0x0000003f88607e96 in __libc_res_nquerydomain () from 
> /lib64/libresolv.so.2
> #4  0x0000003f886081c0 in __libc_res_nsearch () from /lib64/libresolv.so.2
> #5  0x00002b0de09ca8cf in _nss_dns_gethostbyname3_r () from 
> /lib64/libnss_dns.so.2
> #6  0x00002b0de09caabe in _nss_dns_gethostbyname_r () from 
> /lib64/libnss_dns.so.2
> #7  0x0000003f83ae7e71 in gethostbyname_r@@GLIBC_2.2.5 () from 
> /lib64/libc.so.6
> #8  0x0000003f83ae77a3 in gethostbyname () from /lib64/libc.so.6
> #9  0x0000000000459a29 in sip_resolvehost (name=0x7fff0d2fda80, 
> port=0x800b1a, proto=0x800b1c, is_sips=-1, dn=0x800b40) at resolve.h:349
> #10 0x000000000043fe10 in mk_proxy (name=0x7fff0d2fda80, port=0, 
> proto=0, is_sips=0) at proxy.c:252
> #11 0x00002b0d9de09588 in t_relay_to (p_msg=0x7f8ae0, proxy=0x0, 
> flags=<value optimized out>) at ut.h:111
> #12 0x00002b0d9de1b706 in w_t_relay (p_msg=0x7f8ae0, proxy=0x0, 
> flags=0x0) at tm.c:1079
> #13 0x000000000040ea39 in do_action (a=0x790b70, msg=0x7f8ae0) at 
> action.c:967
> #14 0x000000000041150c in run_action_list (a=<value optimized out>, 
> msg=0x7f8ae0) at action.c:139
> #15 0x0000000000466a34 in eval_expr (e=0x790c48, msg=0x7f8ae0, 
> val=0x0) at route.c:1240
> #16 0x000000000046654d in eval_expr (e=0x790c98, msg=0x7f8ae0, 
> val=0x0) at route.c:1556
> #17 0x00000000004664f5 in eval_expr (e=0x790ce8, msg=0x7f8ae0, 
> val=0x0) at route.c:1561
> #18 0x000000000040da1d in do_action (a=0x7914d8, msg=0x7f8ae0) at 
> action.c:689
> #19 0x000000000041150c in run_action_list (a=<value optimized out>, 
> msg=0x7f8ae0) at action.c:139
> #20 0x000000000040f845 in do_action (a=0x78e480, msg=0x7f8ae0) at 
> action.c:119
> #21 0x000000000041150c in run_action_list (a=<value optimized out>, 
> msg=0x7f8ae0) at action.c:139
> #22 0x000000000040fd13 in do_action (a=0x78fb28, msg=0x7f8ae0) at 
> action.c:706
> #23 0x000000000041150c in run_action_list (a=<value optimized out>, 
> msg=0x7f8ae0) at action.c:139
> #24 0x0000000000410814 in do_action (a=0x78fc00, msg=0x7f8ae0) at 
> action.c:712
> #25 0x000000000041150c in run_action_list (a=<value optimized out>, 
> msg=0x7f8ae0) at action.c:139
> #26 0x0000000000410814 in do_action (a=0x78fcd8, msg=0x7f8ae0) at 
> action.c:712
> #27 0x000000000041150c in run_action_list (a=<value optimized out>, 
> msg=0x7f8ae0) at action.c:139
> #28 0x0000000000411869 in run_top_route (a=0x7880a8, msg=0x7f8ae0) at 
> action.c:119
> #29 0x0000000000455fa5 in receive_msg (
>     buf=0x754e00 "ACK sip:611 at sip.novanetfone.in 
> <mailto:sip%3A611 at sip.novanetfone.in> SIP/2.0\r\nRecord-Route: 
> <sip:203.XXX.53.XXX;lr=on;ftag=100ef178-1c01a8c0-13c4-50029-e41ec-12a04394-e41ec>\r\nRecord-Route: 
> <sip:203.XXX.53.XXX;lr=on;ftag=100ef178-1c01a8c0-"..., len=4183, 
> rcv_info=0x7fff0d2ffac0) at receive.c:162
> #30 0x000000000049a384 in udp_rcv_loop () at udp_server.c:492
> #31 0x0000000000429c3d in main (argc=3, argv=<value optimized out>) at 
> main.c:818
>  
> Thanks for all the help,
>
> --- Jayesh
>
>     Message: 2
>     Date: Fri, 02 Apr 2010 14:09:47 +0300
>     From: Bogdan-Andrei Iancu <bogdan at voice-system.ro
>     <mailto:bogdan at voice-system.ro>>
>     Subject: Re: [OpenSIPS-Users] Opensips just stops responding
>     To: OpenSIPS users mailling list <users at lists.opensips.org
>     <mailto:users at lists.opensips.org>>
>     Message-ID: <4BB5D07B.9060803 at voice-system.ro
>     <mailto:4BB5D07B.9060803 at voice-system.ro>>
>     Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>     I see, let me know if without the Localcache module works ok or not.
>
>     Regards,
>     Bogdan
>
>     Jayesh Nambiar wrote:
>     > Hi Bogdan,
>     > Thanks for your reply. I will try this the next time my config
>     behaves
>     > like this.
>     > By the way the only change that I did in this lastly was, I removed
>     > the "LocalCache  module" support and have had the opensips to query
>     > the DB for Authentication. It's been 18 hours and till now the
>     server
>     > is up and running fine.
>     > I'll keep a watch and follow the steps mentioned by you !!
>     >
>     > Thanks,
>     >
>     > --- Jayesh
>     >
>     >
>     >     Message: 2
>     >     Date: Fri, 02 Apr 2010 11:40:32 +0300
>     >     From: Bogdan-Andrei Iancu <bogdan at voice-system.ro
>     <mailto:bogdan at voice-system.ro>
>     >     <mailto:bogdan at voice-system.ro <mailto:bogdan at voice-system.ro>>>
>     >     Subject: Re: [OpenSIPS-Users] Opensips just stops responding
>     >     To: OpenSIPS users mailling list <users at lists.opensips.org
>     <mailto:users at lists.opensips.org>
>     >     <mailto:users at lists.opensips.org
>     <mailto:users at lists.opensips.org>>>
>     >     Message-ID: <4BB5AD80.80204 at voice-system.ro
>     <mailto:4BB5AD80.80204 at voice-system.ro>
>     >     <mailto:4BB5AD80.80204 at voice-system.ro
>     <mailto:4BB5AD80.80204 at voice-system.ro>>>
>     >     Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>     >
>     >     Hi Jayesh,
>     >
>     >     Could you try to use gdb to attached to the unresponsive
>     processes and
>     >     to see where they are stuck ? Use "gdb /path/opensips PID"
>     and do "bt"
>     >     to get backtrace. Check for processes responsible for the
>     network read
>     >     (do an "opensipsctl fifo ps" to see which are the UDP listener
>     >     processes)
>     >
>     >     Regards,
>     >     Bogdan
>     >
>     >     Jayesh Nambiar wrote:
>     >     > Hi all,
>     >     > I am running Opensips 1.6.2 and am running a strange
>     problem of
>     >     > Opensips not responding to any SIP messages after a day or
>     two. It
>     >     > needs to be restarted for it to get working again.
>     >     > The overview of my setup is as follows:
>     >     > 1) I am using Localcache module to authorize REGISTER and
>     INVITE
>     >     > requests from cache.
>     >     > 2) Using Mediaproxy for Nated clients with Media-Relay on a
>     >     different
>     >     > server
>     >     > 3) Running basic queries based on INVITE before placing
>     the call.
>     >     >
>     >     > After running for a day or two, Opensips just stops responding
>     >     to any
>     >     > SIP message. I check moni, it shows me the server is alive and
>     >     in_use
>     >     > transactions keep on increasing since Opensips is not
>     processing
>     >     > anyone. I checked get_statistics shmem: even that is
>     perfectly ok.
>     >     > I have assigned 1GB to shmem and hardly 30 MB is used. I dont
>     >     even see
>     >     > any error logs etc. The top command shows no over
>     utilization of CPU
>     >     > and memory.
>     >     >
>     >     > Can someone point me on where and how to check for this
>     problem. Has
>     >     > someone had a similar problem before. It looks similar to this
>     >     > post
>     >    
>     http://www.mail-archive.com/users@lists.opensips.org/msg06098.html but
>     >     > I dont see a solution to this either.
>     >     >
>     >     > Thanks for any help.
>     >     >
>     >     > --- Jayesh
>     >     >
>     >     >
>     >    
>     ------------------------------------------------------------------------
>     >     >
>     >     > _______________________________________________
>     >     > Users mailing list
>     >     > Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>     <mailto:Users at lists.opensips.org <mailto:Users at lists.opensips.org>>
>     >     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > Users mailing list
>     > Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >
>
>
>     --
>     Bogdan-Andrei Iancu
>     www.voice-system.ro <http://www.voice-system.ro>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro




More information about the Users mailing list