OpenSIPS core Dump

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

OpenSIPS core Dump

tcb-2-3

My OpenSIPS keep breaking when i upgrade to 1.4, how do i enable core dump ?

--
TC

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: OpenSIPS core Dump

Iñaki Baz Castillo
El Viernes, 28 de Noviembre de 2008, TCB escribió:
> My OpenSIPS keep breaking when i upgrade to 1.4, how do i enable core dump
> ?

If you are using a deb package (or made by "make deb"), and the Debian init
script, then you can set to "yes" the variable DUMP_CORE
in /etc/default/opensips.

Anyway, check the provided init scripts. Note that the related script code in
the Debian init script is:

if test "$DUMP_CORE" = "yes" ; then
    # set proper ulimit
    ulimit -c unlimited

    # directory for the core dump files
    COREDIR=/var/run/opensips/corefiles
    [ -d $COREDIR ] || mkdir $COREDIR
    chmod 777 $COREDIR
    echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
fi


--
Iñaki Baz Castillo

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: OpenSIPS core Dump

tcb-2-3
No luck, i didnt use a deb, compiled on gentoo 2008.0. Are there any compile time
flags i have to set.

TC

On Fri, Nov 28, 2008 at 11:40 AM, Iñaki Baz Castillo <[hidden email]> wrote:
El Viernes, 28 de Noviembre de 2008, TCB escribió:
> My OpenSIPS keep breaking when i upgrade to 1.4, how do i enable core dump
> ?

If you are using a deb package (or made by "make deb"), and the Debian init
script, then you can set to "yes" the variable DUMP_CORE
in /etc/default/opensips.

Anyway, check the provided init scripts. Note that the related script code in
the Debian init script is:

if test "$DUMP_CORE" = "yes" ; then
   # set proper ulimit
   ulimit -c unlimited

   # directory for the core dump files
   COREDIR=/var/run/opensips/corefiles
   [ -d $COREDIR ] || mkdir $COREDIR
   chmod 777 $COREDIR
   echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
fi


--
Iñaki Baz Castillo

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



--
TC

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: OpenSIPS core Dump

Iñaki Baz Castillo
El Viernes, 28 de Noviembre de 2008, TCB escribió:
> No luck, i didnt use a deb, compiled on gentoo 2008.0. Are there any
> compile time flags i have to set.

I already said you:

> > Anyway, check the provided init scripts. Note that the related script
> > code in
> > the Debian init script is:
> >
> > if test "$DUMP_CORE" = "yes" ; then
> >    # set proper ulimit
> >    ulimit -c unlimited
> >
> >    # directory for the core dump files
> >    COREDIR=/var/run/opensips/corefiles
> >    [ -d $COREDIR ] || mkdir $COREDIR
> >    chmod 777 $COREDIR
> >    echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
> > fi


--
Iñaki Baz Castillo

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: OpenSIPS core Dump

tcb-2-3
Ok, got the bt now, looks like something to do with nat handling, whenever
i make a call and nat handling is invoked opensips crashes when after the bye.

core was generated by `opensips -Edddddddddddddddddddddddd'.
Program terminated with signal 11, Segmentation fault.
#0  0xb78e11d4 in extract_body (msg=0x81e0200, body=0xbf9f803c)
    at nhelpr_funcs.c:172
172             body->len = get_content_length(msg);
(gdb) #
(gdb) bt
#0  0xb78e11d4 in extract_body (msg=0x81e0200, body=0xbf9f803c)
    at nhelpr_funcs.c:172
#1  0xb78d9a69 in fix_nated_sdp_f (msg=0x81e0200,
    str1=0x3 <Address 0x3 out of bounds>, str2=0x0) at nathelper.c:1547
#2  0x08056e69 in do_action (a=0x81d1ea0, msg=0x81e0200) at action.c:830
#3  0x080592f0 in run_action_list (a=0x81d1ea0, msg=0x81e0200) at action.c:138
#4  0x08057ed5 in do_action (a=0x81d1f08, msg=0x81e0200) at action.c:702
#5  0x080592f0 in run_action_list (a=0x81d1f08, msg=0x81e0200) at action.c:138
#6  0x08057ed5 in do_action (a=0x81d1f70, msg=0x81e0200) at action.c:702
#7  0x080592f0 in run_action_list (a=0x81d1688, msg=0x81e0200) at action.c:138
#8  0x08059689 in run_top_route (a=0x81d1688, msg=0x81e0200) at action.c:118
#9  0xb793f88f in reply_received (p_msg=0x81e0200) at t_reply.c:1371
#10 0x08067d64 in forward_reply (msg=0x81e0200) at forward.c:507
#11 0x08098bc6 in receive_msg (
    buf=0x8189100 "SIP/2.0 200 OK\r\nVia: SIP/2.0/UDP <PUB_IP>;branch=z9hG4bK31e6.03eccf57.0\r\nVia: SIP/2.0/UDP 172.16.16.226:5070;received=172.16.16.226;rport=5070;branch=z9hG4bKfxczqccr\r\nRecord-Route: <sip:66.8.58.56;l"..., len=426,
    rcv_info=0xbf9f8a98) at receive.c:203
#12 0x080dc067 in udp_rcv_loop () at udp_server.c:449
#13 0x08070edd in main (argc=2, argv=0xbf9f8c84) at main.c:776

here is a piece of cfg

onreply_route[2]
{
    xlog("L_INFO", "NAT-Reply - S=$rs D=$rr F=$fu T=$tu IP=$si ID=$ci\n");
    if(nat_uac_test("1"))
    {
        fix_nated_contact();
    }
    if(isbflagset(6) && status=~"(180)|(183)|2[0-9][0-9]")
    {
        if(!search("^Content-Length:[ ]*0"))
        {
            fix_nated_sdp("3");
        }
    }
    exit;
   
}



On Fri, Nov 28, 2008 at 1:40 PM, Iñaki Baz Castillo <[hidden email]> wrote:
El Viernes, 28 de Noviembre de 2008, TCB escribió:
> No luck, i didnt use a deb, compiled on gentoo 2008.0. Are there any
> compile time flags i have to set.

I already said you:

> > Anyway, check the provided init scripts. Note that the related script
> > code in
> > the Debian init script is:
> >
> > if test "$DUMP_CORE" = "yes" ; then
> >    # set proper ulimit
> >    ulimit -c unlimited
> >
> >    # directory for the core dump files
> >    COREDIR=/var/run/opensips/corefiles
> >    [ -d $COREDIR ] || mkdir $COREDIR
> >    chmod 777 $COREDIR
> >    echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
> > fi


--
Iñaki Baz Castillo

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



--
TC

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: OpenSIPS core Dump

Kobi Eshun
Hi.

Looking at the fixup code for fix_nated_sdp(), it would appear that the parameter is expected to be an integer rather than a string. Can you quickly verify this, TC?
--
kobi


On Nov 28, 2008, at 3:58 AM, TCB wrote:

Ok, got the bt now, looks like something to do with nat handling, whenever
i make a call and nat handling is invoked opensips crashes when after the bye.

core was generated by `opensips -Edddddddddddddddddddddddd'.
Program terminated with signal 11, Segmentation fault.
#0  0xb78e11d4 in extract_body (msg=0x81e0200, body=0xbf9f803c)
    at nhelpr_funcs.c:172
172             body->len = get_content_length(msg);
(gdb) #
(gdb) bt
#0  0xb78e11d4 in extract_body (msg=0x81e0200, body=0xbf9f803c)
    at nhelpr_funcs.c:172
#1  0xb78d9a69 in fix_nated_sdp_f (msg=0x81e0200,
    str1=0x3 <Address 0x3 out of bounds>, str2=0x0) at nathelper.c:1547
#2  0x08056e69 in do_action (a=0x81d1ea0, msg=0x81e0200) at action.c:830
#3  0x080592f0 in run_action_list (a=0x81d1ea0, msg=0x81e0200) at action.c:138
#4  0x08057ed5 in do_action (a=0x81d1f08, msg=0x81e0200) at action.c:702
#5  0x080592f0 in run_action_list (a=0x81d1f08, msg=0x81e0200) at action.c:138
#6  0x08057ed5 in do_action (a=0x81d1f70, msg=0x81e0200) at action.c:702
#7  0x080592f0 in run_action_list (a=0x81d1688, msg=0x81e0200) at action.c:138
#8  0x08059689 in run_top_route (a=0x81d1688, msg=0x81e0200) at action.c:118
#9  0xb793f88f in reply_received (p_msg=0x81e0200) at t_reply.c:1371
#10 0x08067d64 in forward_reply (msg=0x81e0200) at forward.c:507
#11 0x08098bc6 in receive_msg (
    buf=0x8189100 "SIP/2.0 200 OK\r\nVia: SIP/2.0/UDP <PUB_IP>;branch=z9hG4bK31e6.03eccf57.0\r\nVia: SIP/2.0/UDP 172.16.16.226:5070;received=172.16.16.226;rport=5070;branch=z9hG4bKfxczqccr\r\nRecord-Route: <sip:66.8.58.56;l"..., len=426,
    rcv_info=0xbf9f8a98) at receive.c:203
#12 0x080dc067 in udp_rcv_loop () at udp_server.c:449
#13 0x08070edd in main (argc=2, argv=0xbf9f8c84) at main.c:776

here is a piece of cfg

onreply_route[2]
{
    xlog("L_INFO", "NAT-Reply - S=$rs D=$rr F=$fu T=$tu IP=$si ID=$ci\n");
    if(nat_uac_test("1"))
    {
        fix_nated_contact();
    }
    if(isbflagset(6) && status=~"(180)|(183)|2[0-9][0-9]")
    {
        if(!search("^Content-Length:[ ]*0"))
        {
            fix_nated_sdp("3");
        }
    }
    exit;
   
}



On Fri, Nov 28, 2008 at 1:40 PM, Iñaki Baz Castillo <[hidden email]> wrote:
El Viernes, 28 de Noviembre de 2008, TCB escribió:
> No luck, i didnt use a deb, compiled on gentoo 2008.0. Are there any
> compile time flags i have to set.

I already said you:

> > Anyway, check the provided init scripts. Note that the related script
> > code in
> > the Debian init script is:
> >
> > if test "$DUMP_CORE" = "yes" ; then
> >    # set proper ulimit
> >    ulimit -c unlimited
> >
> >    # directory for the core dump files
> >    COREDIR=/var/run/opensips/corefiles
> >    [ -d $COREDIR ] || mkdir $COREDIR
> >    chmod 777 $COREDIR
> >    echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
> > fi


--
Iñaki Baz Castillo

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



--
TC
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: OpenSIPS core Dump

Kobi Eshun
Hey scratch that, TC. There's something else going on.
--
kobi


On Nov 29, 2008, at 10:56 AM, TCB wrote:

> Sure, i'm not sure what wrong, it does have something to do with  
> fix_nated_sdp(). I have taken it out and not more crashes, i will  
> test and see if this has any effect on my NAT services and advise.


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: OpenSIPS core Dump

tcb-2-3
I agree, I will do some further investigation..

On Sat, Nov 29, 2008 at 9:00 PM, Kobi Eshun <[hidden email]> wrote:
Hey scratch that, TC. There's something else going on.
--
kobi



On Nov 29, 2008, at 10:56 AM, TCB wrote:

Sure, i'm not sure what wrong, it does have something to do with fix_nated_sdp(). I have taken it out and not more crashes, i will test and see if this has any effect on my NAT services and advise.




--
TC

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: OpenSIPS core Dump

Bogdan-Andrei Iancu
Hi TC,

can you check if the reply that crashes your opensips has a
Content-Length header or not?

Regards,
Bogdan


TCB wrote:

> I agree, I will do some further investigation..
>
> On Sat, Nov 29, 2008 at 9:00 PM, Kobi Eshun <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hey scratch that, TC. There's something else going on.
>     --
>     kobi
>
>
>
>     On Nov 29, 2008, at 10:56 AM, TCB wrote:
>
>         Sure, i'm not sure what wrong, it does have something to do
>         with fix_nated_sdp(). I have taken it out and not more
>         crashes, i will test and see if this has any effect on my NAT
>         services and advise.
>
>
>
>
>
> --
> TC
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: OpenSIPS core Dump

tcb-2-3
Let me reproduce it.


On Tue, Dec 9, 2008 at 11:30 PM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hi TC,

can you check if the reply that crashes your opensips has a Content-Length header or not?

Regards,
Bogdan


TCB wrote:
I agree, I will do some further investigation..

On Sat, Nov 29, 2008 at 9:00 PM, Kobi Eshun <[hidden email] <mailto:[hidden email]>> wrote:

   Hey scratch that, TC. There's something else going on.
   --
   kobi



   On Nov 29, 2008, at 10:56 AM, TCB wrote:

       Sure, i'm not sure what wrong, it does have something to do
       with fix_nated_sdp(). I have taken it out and not more
       crashes, i will test and see if this has any effect on my NAT
       services and advise.





--
TC
------------------------------------------------------------------------


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 




--
TC

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users