[OpenSIPS-Users] help, server crashes every hour

Yaniv Vaknin yaniv at shahar-tech.com
Wed Jul 28 12:58:47 CEST 2010


Hi,
I'm using opensips 1.6.2, the server handle only subscribe and notify
requests.
I use the mi datagram to publish new status (which I receive via external
XML process).
Every thing works as fine but the server keeps crashing about every hour.
I tested the configuration using two different servers , one clean redhat
5.3 install and the other is gentoo. This happen on both servers.
I've tested different configuration, but no matter what the server keeps
crashing. 
   
this is bt form gdb :

#0  0x00002b659d21c836 in mi_publ_rpl_cback (hentity=<value optimized out>,
reply=0x0) at mi_func.c:316
#1  0x00002b659d00ba53 in publ_cback_func (t=<value optimized out>,
type=<value optimized out>, ps=0x2b659c330420) at pua_callback.h:72
#2  0x00002b659c10534b in run_trans_callbacks (type=512,
trans=0x2b659e37af60, req=0x0, rpl=0x7885f8, code=<value optimized out>) at
t_hooks.c:208
#3  0x00002b659c11da69 in local_reply (t=0x2b659e37af60,
p_msg=0x2b659c341d38, branch=<value optimized out>, msg_status=<value
optimized out>,
    cancel_bitmap=0x2b659e2fe6d8) at t_reply.c:1339
#4  0x00002b659c120389 in reply_received (p_msg=0x7885f8) at t_reply.c:1484
#5  0x0000000000421448 in forward_reply (msg=0x7885f8) at forward.c:559
#6  0x0000000000456182 in receive_msg (
    buf=0x754de0 "SIP/2.0 200 OK\r\nVia: SIP/2.0/UDP
192.168.167.62;branch=z9hG4bKd94.311a3611.0\r\nTo:
sip:972529984099 at 192.168.167.62:5060;tag=595f1ec520b32ef8798f023cc8e6d5bc-be8e\r\nFrom:
<sip:972529984099 at 192.168.167.62"..., len=431, rcv_info=0x7fff0f218e20) at
receive.c:200
#7  0x000000000049a354 in udp_rcv_loop () at udp_server.c:492
#8  0x0000000000429c0d in main (argc=3, argv=<value optimized out>) at
main.c:818

and this is the config file :

loadmodule "db_mysql.so"
loadmodule "sl.so"
loadmodule "maxfwd.so"
loadmodule "textops.so"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "dialog.so"
loadmodule "presence.so"
loadmodule "presence_dialoginfo.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "pua.so"
loadmodule "pua_mi.so"
loadmodule "signaling.so"
#loadmodule "presence_xml.so"
loadmodule "mi_fifo.so"
#loadmodule "pua_usrloc.so"
loadmodule "mi_datagram.so"
loadmodule "pua_dialoginfo.so"
loadmodule "exec.so"

modparam("db_mysql", "ping_interval", 300)
modparam("mi_datagram", "socket_name", "udp:127.0.0.1:8808")
# -- presence params --
#modparam("presence_xml", "db_url",
"mysql://opensips:opensipsrw@127.0.0.1/opensips")
#modparam("presence_xml", "force_active", 1)
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
# ----------------- setting module-specific parameters ---------------
# -- usrloc params --
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "db_url",
"mysql://opensips:opensipsrw@localhost/opensips")
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
# -- presence and presence_xml params --
modparam("presence", "db_url",
"mysql://opensips:opensipsrw@localhost/opensips")
#modparam("presence", "server_address", "sip:192.168.167.62:5060")
modparam("presence", "db_update_period", 0)
modparam("presence", "clean_period", 600)
modparam("presence", "expires_offset", 15)
#modparam("presence", "fallback2db", 1)

# -- pua params --
modparam("pua", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")
modparam("pua", "update_period", 60)
modparam("pua", "default_expires", 3600)
#modparam("pua", "max_expires", 600)
modparam("pua_mi", "presence_server", "sip:192.168.167.62:5060")
#modparam("pua_mi", "presence_server", "sip:172.30.48.99:5060")
modparam("pua_dialoginfo", "presence_server", "sip:192.168.167.62:5060")
#modparam("pua_dialoginfo", "presence_server", "sip:172.30.48.99:5060")
# -- dialog params --
modparam("dialog", "db_url",
"mysql://opensips:opensipsrw@localhost/opensips")
modparam("dialog", "dlg_flag", 4)

# -------------------------  request routing logic -------------------

# main routing logic


route{

        if (!mf_process_maxfwd_header("10")) {
                sl_send_reply("483","Too Many Hops");
                exit;
        };

        if (msg:len >=  2048 ) {
                sl_send_reply("513", "Message too big");
                exit;
        };

        # path determined by record-routing
        if (loose_route()) {
                # mark routing logic in request
                append_hf("P-hint: rr-enforced\r\n");
                route(1);
        };


        if (uri==myself) {
                if( is_method("PUBLISH|SUBSCRIBE|NOTIFY"))
        if(method=="NOTIFY")
        pua_update_contact();
                        route(2);
}
}


route[1] {
        if (!t_relay()) {
                sl_reply_error();
        };
        exit;
}

route[2]
{
        if ( !t_newtran() ){
                sl_reply_error();
                exit;
        };

        if(is_method("PUBLISH")){
        ##//if($hdr(Sender)!= NULL)
        ##//            handle_publish("$hdr(Sender)");
        ##//    else
                        handle_publish();

        }
        else
        if( is_method("SUBSCRIBE")){
        exec_msg("echo '$fU $tU' >/dev/tcp/127.0.0.1/50008");
                handle_subscribe();
        }

        exit;
}


Thanks,
Yaniv

-- 
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/help-server-crashes-every-hour-tp5345496p5345496.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.



More information about the Users mailing list