[OpenSIPS-Users] b2bua core dump & db truncate

thrillerbee thrillerbee at gmail.com
Tue Nov 9 17:40:10 CET 2010


Anca,

I am seeing a crash about every 13-14 days.  I've attached the backtrace
from this morning.
The other problem is that OpenSIPS immediately crashes when monit tries to
restart it. I have to manually truncate the b2b_entities & b2b_logic tables
to get it to start w/o crashing.  I'm attaching this backtrace as well
(called *restart*).

Thanks.

On Mon, Nov 1, 2010 at 10:56 AM, thrillerbee <thrillerbee at gmail.com> wrote:

> Anca,
>
> I had not altered the code.  It core dumped pretty quickly so I was force
> to revert to revision 7317.
> I will try to schedule some time to retest the newest revision and see if
> it core dumps again.
>
> Thanks again.
>
> On Mon, Nov 1, 2010 at 10:44 AM, Anca Vamanu <anca at opensips.org> wrote:
>
>>  Hi,
>>
>> The lines in your gdb backtrace don't match at all. Have you altered the
>> code or is the core corrupted?
>>
>>
>> Regards,
>>
>> --
>> Anca Vamanuwww.voice-system.ro
>>
>>
>>
>> On 11/01/2010 04:35 PM, thrillerbee wrote:
>>
>> Anca,
>>
>>  I am still seeing core dumps.  bt attached.
>>
>>  Thanks .
>>
>> On Tue, Oct 26, 2010 at 8:44 AM, thrillerbee <thrillerbee at gmail.com>wrote:
>>
>>> Anca,
>>>
>>>  Thanks for the info.  I'll let you know if I have issues after the
>>> upgrade.
>>>
>>>  Thanks.
>>>
>>>
>>> On Tue, Oct 26, 2010 at 3:42 AM, Anca Vamanu <anca at opensips.org> wrote:
>>>
>>>> Hi,
>>>>
>>>> At startup, the b2b_tables are copied into memory and are truncated,
>>>> then the data is updated in the database at an interval controlled by
>>>> the update_period parameter ( by default 100 seconds).
>>>>
>>>> As for the core dump, if you are using trunk, can you please update your
>>>> code? I just committed a lot of changes in those modules.
>>>>
>>>> Regards,
>>>>
>>>> --
>>>> Anca Vamanu
>>>> www.voice-system.ro
>>>>
>>>>
>>>>
>>>>
>>>> On 10/26/2010 06:58 AM, thrillerbee wrote:
>>>> > I'm waiting for my b2bua box to core dump again so I can get the
>>>> > backtrace, but is it expected behavior that OpenSIPS cannot restart
>>>> > w/o first truncating the b2b_entities & b2b_logic tables?  That makes
>>>> > for a messy recovery...
>>>> >
>>>> > Thanks.
>>>>
>>>>  _______________________________________________
>>>> Users mailing list
>>>> Users at lists.opensips.org
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>
>>>
>>
>> _______________________________________________
>> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20101109/f9f5d045/attachment-0001.htm>
-------------- next part --------------
Core was generated by `/usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 2048 -u root -g r'.
Program terminated with signal 11, Segmentation fault.
[New process 12409]
#0  t_unref_cell (c=0x0) at t_lookup.c:1169
1169            UNREF(c);
(gdb) bt full
#0  t_unref_cell (c=0x0) at t_lookup.c:1169
        __FUNCTION__ = "t_unref_cell"
#1  0x00007fe9774ec9e1 in b2b_prescript_f (msg=0x799e88, uparam=<value optimized out>) at dlg.c:488
        reason = {s = 0x7fe9774f58c0 "OK", len = 2}
        b2b_key = {s = 0x799e88 "s#### len = 1}
        dlg = <value optimized out>
        hash_index = <value optimized out>
        local_index = <value optimized out>
        b2b_cback = <value optimized out>
        param = {s = 0x0, len = 0}
        table = <value optimized out>
        method_value = <value optimized out>
        TO = {error = 7741452, body = {s = 0xa <Address 0xa out of bounds>, len = 0}, uri = {s = 0x7fe900000006 "", len = 0}, display = {
    s = 0x762066 "38794657 at 68.68.124.33>;tag=gK0b7076d4\r\nTo: <sip:2482000000 at 24.121.80.36>;tag=B2B.2482.3343\r\nCall-ID: 772517652_72287821 at 68.68.124.33\r\nCSeq: 12225 PRACK\r\nMax-Forwards: 68\r\nRAck: 113 12224 INVITE\r\nConte"..., len = 70}, tag_value = {s = 0x56b00497f81 <Address 0x56b00497f81 out of bounds>, len = 0}, parsed_uri = {user = {
      s = 0x761fac "121.80.39;branch=z9hG4bKaeec.ed9119a4.0\r\nVia: SIP/2.0/UDP 24.121.80.36;branch=z9hG4bKaeec.5a7bedb.0\r\nVia: SIP/2.0/UDP 68.68.124.33:5060;branch=z9hG4bK0bB84d6261f073b06b6\r\nFrom: <sip:+13138794657 at 68.68"..., len = 510}, passwd = {
      s = 0x761fb6 "branch=z9hG4bKaeec.ed9119a4.0\r\nVia: SIP/2.0/UDP 24.121.80.36;branch=z9hG4bKaeec.5a7bedb.0\r\nVia: SIP/2.0/UDP 68.68.124.33:5060;branch=z9hG4bK0bB84d6261f073b06b6\r\nFrom: <sip:+13138794657 at 68.68.124.33>;t"..., len = 98}, host = {s = 0x4d5ba9 "H\211D$XH\205##\017#T$0D\213\\$(\017\204###", len = 59}, port = {
      s = 0x4cc929 "H\211D$@H\205##\213T$\030L\213\\$\020\017\204###", len = 7741335}, params = {s = 0x7fffc7331f78 "###", len = 7741337}, headers = {s = 0x0, 
      len = 1963685894}, port_no = 27160, proto = 124, type = ERROR_URI_T, transport = {s = 0x76213e "", len = 7741341}, ttl = {
      s = 0x761fb6 "branch=z9hG4bKaeec.ed9119a4.0\r\nVia: SIP/2.0/UDP 24.121.80.36;branch=z9hG4bKaeec.5a7bedb.0\r\nVia: SIP/2.0/UDP 68.68.124.33:5060;branch=z9hG4bK0bB84d6261f073b06b6\r\nFrom: <sip:+13138794657 at 68.68.124.33>;t"..., len = 8005424}, user_param = {
      s = 0x761fc1 "4bKaeec.ed9119a4.0\r\nVia: SIP/2.0/UDP 24.121.80.36;branch=z9hG4bKaeec.5a7bedb.0\r\nVia: SIP/2.0/UDP 68.68.124.33:5060;branch=z9hG4bK0bB84d6261f073b06b6\r\nFrom: <sip:+13138794657 at 68.68.124.33>;tag=gK0b7076"..., len = 7741724}, maddr = {s = 0x3 <Address 0x3 out of bounds>, len = 4957221}, method = {s = 0x799e88 "s#### len = 510}, 
    lr = {s = 0x7cb518 "\001", len = 7741341}, r2 = {s = 0x7c6a18 "\001", len = 7741758}, transport_val = {
      s = 0x761f9d "SIP/2.0/UDP 24.121.80.39;branch=z9hG4bKaeec.ed9119a4.0\r\nVia: SIP/2.0/UDP 24.121.80.36;branch=z9hG4bKaeec.5a7bedb.0\r\nVia: SIP/2.0/UDP 68.68.124.33:5060;branch=z9hG4bK0bB84d6261f073b06b6\r\nFrom: <sip:+13"..., len = 4942246}, ttl_val = {s = 0x7fe9750b7800 "", len = 1024}, user_param_val = {s = 0x0, len = 1}, maddr_val = {s = 0x0, 
      len = 2022765855}, method_val = {s = 0xc7331f00 <Address 0xc7331f00 out of bounds>, len = 7973984}, lr_val = {s = 0x490000003d <Address 0x490000003d out of bounds>, 
      len = 4}, r2_val = {s = 0x799e88 "s#### len = 510}}, param_lst = 0x7cb518, last_param = 0xa}
        from_tag = {s = 0x0, len = 5028078}
        to_tag = {
  s = 0x761fe5 " 24.121.80.36;branch=z9hG4bKaeec.5a7bedb.0\r\nVia: SIP/2.0/UDP 68.68.124.33:5060;branch=z9hG4bK0bB84d6261f073b06b6\r\nFrom: <sip:+13138794657 at 68.68.124.33>;tag=gK0b7076d4\r\nTo: <sip:2482000000 at 24.121.80.36"..., len = 7741758}
        callid = {
  s = 0x761f40 "PRACK sip:sa at 24.121.80.37 SIP/2.0\r\nRecord-Route: <sip:24.121.80.39;lr;ftag=gK0b7076d4>\r\nVia: SIP/2.0/UDP 24.121.80.39;branch=z9hG4bKaeec.ed9119a4.0\r\nVia: SIP/2.0/UDP 24.121.80.36;branch=z9hG4bKaeec.5a"..., len = 33}
        tm_tran = <value optimized out>
        ret = <value optimized out>
        reason = {s = 0x7fe9774f5920 "Trying", len = 6}
        __FUNCTION__ = "b2b_prescript_f"
#2  0x000000000047d9da in exec_pre_req_cb (msg=0x799e88) at script_cb.c:155
No locals.
#3  0x0000000000466436 in receive_msg (
    buf=0x761f40 "PRACK sip:sa at 24.121.80.37 SIP/2.0\r\nRecord-Route: <sip:24.121.80.39;lr;ftag=gK0b7076d4>\r\nVia: SIP/2.0/UDP 24.121.80.39;branch=z9hG4bKaeec.ed9119a4.0\r\nVia: SIP/2.0/UDP 24.121.80.36;branch=z9hG4bKaeec.5a"..., len=510, rcv_info=0x7fffc7332070) at receive.c:156
        msg = (struct sip_msg *) 0x799e88
        __FUNCTION__ = "receive_msg"
---Type <return> to continue, or q <return> to quit---
#4  0x00000000004ac48a in udp_rcv_loop () at udp_server.c:492
        len = 510
        tmp = <value optimized out>
        from = (union sockaddr_union *) 0x797738
        fromlen = 16
        ri = {src_ip = {af = 2, len = 4, u = {addrl = {659585354, 16}, addr32 = {659585354, 0, 16, 0}, addr16 = {31050, 10064, 0, 0, 16, 0, 0, 0}, 
      addr = "JyP'\000\000\000\000\020\000\000\000\000\000\000"}}, dst_ip = {af = 2, len = 4, u = {addrl = {626030922, 0}, addr32 = {626030922, 0, 0, 0}, addr16 = {31050, 9552, 
        0, 0, 0, 0, 0, 0}, addr = "JyP%", '\0' <repeats 11 times>}}, src_port = 5060, dst_port = 5060, proto = 1, proto_reserved1 = 0, proto_reserved2 = 0, src_su = {s = {
      sa_family = 2, sa_data = "\023##yP'\000\000\000\000\000\000\000"}, sin = {sin_family = 2, sin_port = 50195, sin_addr = {s_addr = 659585354}, 
      sin_zero = "\000\000\000\000\000\000\000"}, sin6 = {sin6_family = 2, sin6_port = 50195, sin6_flowinfo = 659585354, sin6_addr = {in6_u = {
          u6_addr8 = '\0' <repeats 15 times>, u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, u6_addr32 = {0, 0, 0, 0}}}, sin6_scope_id = 0}}, bind_address = 0x794b70}
        p = (callback_list *) 0x7fffc7332078
        buf = "PRACK sip:sa at 24.121.80.37 SIP/2.0\r\nRecord-Route: <sip:24.121.80.39;lr;ftag=gK0b7076d4>\r\nVia: SIP/2.0/UDP 24.121.80.39;branch=z9hG4bKaeec.ed9119a4.0\r\nVia: SIP/2.0/UDP 24.121.80.36;branch=z9hG4bKaeec.5a"...
        __FUNCTION__ = "udp_rcv_loop"
#5  0x000000000042c1a7 in main (argc=<value optimized out>, argv=0x7fffc7332258) at main.c:818
        cfg_log_stderr = <value optimized out>
        cfg_stream = <value optimized out>
        c = <value optimized out>
        r = <value optimized out>
        tmp = 0x7fffc7333ea0 ""
        tmp_len = <value optimized out>
        port = <value optimized out>
        proto = <value optimized out>
        ret = <value optimized out>
        seed = 997148592
        rfd = <value optimized out>
        __FUNCTION__ = "main"
(gdb) 
-------------- next part --------------
Core was generated by `/usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -m 2048 -u root -g r'.
Program terminated with signal 11, Segmentation fault.
[New process 11874]
#0  0x00007fe2d1360f8a in b2b_search_htable (table=0x0, hash_index=33200, local_index=552) at dlg.c:141
141             dlg= table[hash_index].first;
(gdb) bt full
#0  0x00007fe2d1360f8a in b2b_search_htable (table=0x0, hash_index=33200, local_index=552) at dlg.c:141
        dlg = <value optimized out>
        __FUNCTION__ = "b2b_search_htable"
#1  0x00007fe2d1350ba5 in b2b_restore_logic_info (type=<value optimized out>, key=0x7fff7eebf580, cback=0x7fe2d18dd7ce <b2b_server_notify>) at b2b_entities.c:356
        dlg = <value optimized out>
        table = (b2b_table) 0x0
        hash_index = 2075
        local_index = 552
        __FUNCTION__ = "b2b_restore_logic_info"
#2  0x00007fe2d18d0791 in b2b_logic_restore () at b2b_logic.c:1213
        i = 0
        nr_rows = 128
        result = (db_res_t *) 0x78d2c0
        rows = (db_row_t *) 0x797978
        row_vals = <value optimized out>
        tuple = {id = 0, key = 0x7fff7eebf7d0, scenario = 0x0, scenario_params = {{s = 0x212a4c5 "", len = 0}, {s = 0x212a4c6 "", len = 0}, {s = 0x212a4c7 "", len = 0}, {
      s = 0x212a4c8 "", len = 0}, {s = 0x212a4c9 "", len = 0}}, scenario_state = -3, next_scenario_state = 0, server = 0x0, clients = 0x0, bridge_entities = {0x7fff7eebf570, 
    0x7fff7eebf5d8, 0x7fff7eebf640}, to_del = 0, extra_headers = 0x0, next = 0x0, prev = 0x0, insert_time = 0, lifetime = 0, sdp = {s = 0x212a4ca "", len = 0}, db_flag = 0}
        b2bl_key = {s = 0x212a4b8 "3977.0", len = 6}
        scenario_id = {s = 0x212a4bf "", len = 0}
        bridge_entities = {{scenario_id = {s = 0x212a4cd "", len = 0}, key = {s = 0x212a51e "B2B.2075.552", len = 12}, to_uri = {
      s = 0x212a4ce "sip:243314144468530 at 208.80.42.137", len = 33}, from_uri = {s = 0x212a4f0 "sip:8667184777 at 64.194.137.101:5060;user=phone", len = 45}, dlginfo = 0x0, 
    disconnected = 0, state = 0, type = B2B_SERVER, next = 0x0, peer = 0x0}, {scenario_id = {s = 0x212a52d "", len = 0}, key = {s = 0x212a57e "B2B.3977.5093926", len = 16}, 
    to_uri = {s = 0x212a52e "sip:243314144468530 at 208.80.42.137", len = 33}, from_uri = {s = 0x212a550 "sip:8667184777 at 64.194.137.101:5060;user=phone", len = 45}, dlginfo = 0x0, 
    disconnected = 0, state = 0, type = B2B_CLIENT, next = 0x0, peer = 0x0}, {scenario_id = {s = 0x212a58f "", len = 0}, key = {s = 0x212a592 "", len = 0}, to_uri = {
      s = 0x212a590 "", len = 0}, from_uri = {s = 0x212a591 "", len = 0}, dlginfo = 0x0, disconnected = 0, state = 0, type = 3553396889, next = 0x0, peer = 0x0}}
        params = {0x7fff7eebf6c8, 0x7fff7eebf6d8, 0x7fff7eebf6e8, 0x7fff7eebf6f8, 0x7fff7eebf708}
        result_cols = {0x7fe2d1ae5ee0, 0x7fe2d1ae5ef0, 0x7fe2d1ae5f60, 0x7fe2d1ae5f70, 0x7fe2d1ae5f00, 0x7fe2d1ae5f10, 0x7fe2d1ae5f20, 0x7fe2d1ae5f30, 0x7fe2d1ae5f40, 
  0x7fe2d1ae5f50, 0x7fe2d1ae5f80, 0x7fe2d1ae5f90, 0x7fe2d1ae5fa0, 0x7fe2d1ae5fb0, 0x7fe2d1ae5fc0, 0x7fe2d1ae5fd0, 0x7fe2d1ae5fe0, 0x7fe2d1ae5ff0, 0x7fe2d1ae6000, 
  0x7fe2d1ae6010, 0x7fe2d1ae6020, 0x7fe2d1ae6030, 0x7fe2d1ae6040, 0x7fe2d1ae6050, 0x7fe2d1ae6060}
        __FUNCTION__ = "b2b_logic_restore"
#3  0x00007fe2d18d1897 in mod_init () at b2b_logic.c:252
        p = <value optimized out>
        i = <value optimized out>
        j = <value optimized out>
        __FUNCTION__ = "mod_init"
#4  0x0000000000488e94 in init_mod (m=0x78e2b8) at sr_module.c:457
        __FUNCTION__ = "init_mod"
#5  0x0000000000488e2a in init_mod (m=0x78e388) at sr_module.c:452
        __FUNCTION__ = "init_mod"
#6  0x000000000042b8db in main (argc=<value optimized out>, argv=0x7fff7eebfa18) at main.c:1351
        cfg_log_stderr = <value optimized out>
        cfg_stream = (FILE *) 0x2105010
        c = <value optimized out>
        r = <value optimized out>
        tmp = 0x7fff7eec0ea4 ""
        tmp_len = <value optimized out>
        port = <value optimized out>
---Type <return> to continue, or q <return> to quit---
        proto = <value optimized out>
        ret = <value optimized out>
        seed = 3539915651
        rfd = 4
        __FUNCTION__ = "main"
(gdb) 


More information about the Users mailing list