Opensips can't start anymore

2010-11-02
2013-05-09
  • Thomas Baumann

    Thomas Baumann - 2010-11-02

    Hello,

    I am using Opensips 1.6.3. After adding the needed data dr_gateways for "drouting", it does not start anymore and exit:

    /var/log/messages

    Nov  2 10:01:22 node3 kernel: opensips: segfault at 0000000000000000 rip 000000000045b564 rsp 00007fff23f8b1d0 error 6

    The problem is caused by a gateway in the dr_gateways table:

    mysql> select * from dr_gateways;
    +----+----+------------------+-----+--------+-----+--------+---------+
    | gwid | type | address                   | strip | pri_prefix | attrs | probe_mode | description |
    +----+----+------------------+-----+--------+-----+--------+---------+
    |    1 |    3 | m-lab-ca802-sig.test.de |     0 | NULL       | NULL  |          0 | CA802       |
    +----+----+------------------+-----+--------+-----+--------+---------+
    1 row in set (0.00 sec)

    If the gateway is deleted opensips starts without problems. But I can't use "drouting" anymore :(

     
  • Thomas Baumann

    Thomas Baumann - 2010-11-02

    How I can troubleshoot this problem ?

     
  • Anca Vamanu

    Anca Vamanu - 2010-11-02

    Hi,

    If it dumps a core file, investigate it with gdb - 'gdb executable core_file' , then run 'bt' and send the output.

    Regards,
    Anca

     
  • Thomas Baumann

    Thomas Baumann - 2010-11-04

    Hello Anca, I will try to get these outputs.

    regards,

    Thomas

     
  • Thomas Baumann

    Thomas Baumann - 2010-11-04

    Hello, I have got this out of gdb and bt:

    Core was generated by `/sbin/opensips -P /var/run/opensips.pid -m 128 -u opensips -g opensips'.
    Program terminated with signal 11, Segmentation fault.
    #0  0x000000000045b564 in sip_resolvehost (name=0x7fff7f4992c0, port=0x0, proto=0x7fff7f499302, is_sips=<value optimized out>, dn=0x0) at resolve.c:1328
    1328            *port = (is_sips||((*proto)==PROTO_TLS))?SIPS_PORT:SIP_PORT;
    (gdb)
    (gdb) bt
    #0  0x000000000045b564 in sip_resolvehost (name=0x7fff7f4992c0, port=0x0, proto=0x7fff7f499302, is_sips=<value optimized out>, dn=0x0) at resolve.c:1328
    #1  0x00002b3133ec9422 in add_dst (r=0x2b3134780420, id=1, ip=0xdcb4e7a "m-lab-ca802-sig.kd-lab.de", strip=0, pri=<value optimized out>, type=3, attrs=0x2b31327caacd "", probing=0) at routing.c:378
    #2  0x00002b3133eb68b6 in dr_load_routing_info (dr_dbf=0x2b31340d0800, db_hdl=0x794480, drd_table=<value optimized out>, drl_table=0x2b31340cff20, drr_table=0x2b31340cff00) at dr_load.c:404
    #3  0x00002b3133ec04f3 in dr_reload_data (rank=1) at drouting.c:387
    #4  dr_child_init (rank=1) at drouting.c:630
    #5  0x0000000000476de7 in init_mod_child (m=0x7847a8, rank=1, type=0x50e326 "CHILD") at sr_module.c:394
    #6  0x000000000042a40b in main_loop (argc=5940, argv=<value optimized out>) at main.c:805
    #7  main (argc=5940, argv=<value optimized out>) at main.c:1388

    Hopefully this helps.

     
  • Bogdan-Andrei Iancu

    I remember this bug was fixed some time ago - could you update from SVN branch 1.6 and see if ok ?

    Regards,
    Bogdan

     
  • Thomas Baumann

    Thomas Baumann - 2010-11-10

    Hello,

    I have tried this version from svn:

    svn co https://opensips.svn.sourceforge.net/svnroot/opensips/branches/1.6 opensips_1_6

    It shows a different behavior, he doe not like a new column in the gateways:

    Nov 10 19:14:14  ERROR:db_mysql:db_mysql_submit_query: driver error: Unknown column 'attrs' in 'field list'
    Nov 10 19:14:14  ERROR:core:db_do_query: error while submitting query
    Nov 10 19:14:14  ERROR:drouting:dr_load_routing_info: DB query failed

    Did I use the right version ?

    regards,

    Thomas