<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p>kamailio 4.4 is no longer maintained. Upgrade to latest kamailio
      5.2.x and try again. The backtrace indicates the race in tm wait
      handler that was fixed a while ago, but likely after 4.4 series.</p>
    <p>If you still get the issue with 5.2.x, then send the new
      backtrace you get with that version.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 18.06.19 16:29, Efelin Novak wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CABKTgArWMKLbY65HjXo--uHcdmXXvXBB1qgN1kfvS_sg+uOjhQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>
          <div>Hi folks,<br>
            <br>
            I am doing some experiments with Kamailio and Cgrates. To be
            precise I am testing evapi module. When in testing
            environment I do not have any problem. After redirecting
            some production traffic to this kamailio, It crashes in at
            random times (few minutes to 20). I didn't find any pattern
            here.<br>
            <br>
            CGRateS doesn't write anything in logs.<br>
            <br>
            I'm on the last 4.4 Kamailio (compiled recently). CGRateS is
            on the last version.</div>
          <div><br>
          </div>
          <div>Can you please point to how to continue with debugging?</div>
          <div><br>
          </div>
          <div>Thanks</div>
          <div><br>
          </div>
          <div>Efelin<br>
            <br>
            Here is the problem in syslog:<br>
            <br>
            kamailio[9594]: : <core> [mem/f_malloc.c:599]:
            fm_free(): BUG: fm_free: bad pointer 0x97894818 (out of
            memory block!), called from tm: h_table.c:
            free_cell_helper(185) - abortingkamailio[9608]: CRITICAL:
            <core> [pass_fd.c:277]: receive_fd(): EOF on 16<br>
            kamailio[9588]: ALERT: <core> [main.c:743]:
            handle_sigs(): child process 9594 exited by a signal 6<br>
            kamailio[9588]: ALERT: <core> [main.c:746]:
            handle_sigs(): core was not generated<br>
            kamailio[9588]: INFO: <core> [main.c:768]:
            handle_sigs(): terminating due to SIGCHLD<br>
            kamailio[9604]: INFO: <core> [main.c:823]: sig_usr():
            signal 15 received<br>
            kamailio[9606]: INFO: <core> [main.c:823]: sig_usr():
            signal 15 received<br>
            kamailio[9603]: INFO: <core> [main.c:823]: sig_usr():
            signal 15 received<br>
            <br>
            <br>
            <br>
            bt full<br>
            <br>
            #0  0xb77d1424 in __kernel_vsyscall ()<br>
            No symbol table info available.<br>
            #1  0xb7673661 in raise () from
            /lib/i386-linux-gnu/i686/cmov/libc.so.6<br>
            No symbol table info available.<br>
            #2  0xb7676a92 in abort () from
            /lib/i386-linux-gnu/i686/cmov/libc.so.6<br>
            No symbol table info available.<br>
            #3  0x082611a3 in fm_free (qmp=0x56779000, p=0x2d4e4f49,
            file=0x970932ee "tm: h_table.c", <br>
                func=0x970935b7 "free_cell_helper", line=185,
            mname=0x97092d20 "tm") at mem/f_malloc.c:601<br>
                    qm = 0x56779000<br>
                    f = 0x56df046c<br>
                    __FUNCTION__ = "fm_free" <br>
            #4  0x96fd0559 in free_cell_helper (dead_cell=0x56d935c4,
            silent=0, fname=0x970b90ca "timer.c", <br>
                fline=648) at h_table.c:185<br>
                    b = 0x56df0490 "CANCEL <a
              href="http://sip:00444123456@192.168.1.3:5060"
              moz-do-not-send="true">sip:00444123456@192.168.1.3:5060</a>
            SIP/2.0\r\nVia: SIP/2.0/UDP
192.168.1.2;branch=z9hG4bKb6ae.5d03d7e94e5ec25f34930629f434a006.1\r\nMax-Forwards:
            66\r\nFrom: \"0044454321\" <<a class="moz-txt-link-freetext" href="sip:0044454321@i">sip:0044454321@i</a>"...<br>
                    i = 1<br>
                    rpl = 0x9797e818<br>
                    tt = 0xbfe44c68<br>
                    foo = 0x970ccb14<br>
                    cbs = 0x0<br>
                    cbs_tmp = 0x56d12b68<br>
                    __FUNCTION__ = "free_cell_helper" <br>
            #5  0x9706884f in wait_handler (ti=31715179,
            wait_tl=0x56d9360c, data=0x56d935c4) at timer.c:648<br>
                    p_cell = 0x56d935c4<br>
                    ret = 0<br>
            #6  0x08241e20 in timer_list_expire (t=31715179,
            h=0x567a3b68, slow_l=0x567a5394, slow_mark=1772)<br>
                at timer.c:873<br>
                    tl = 0x56d9360c<br>
                    ret = 0<br>
            #7  0x08242211 in timer_handler () at timer.c:938<br>
                    saved_ticks = 31715179<br>
                    run_slow_timer = 0<br>
                    i = 748<br>
                    __FUNCTION__ = "timer_handler" <br>
            #8  0x0824266b in timer_main () at timer.c:977<br>
            No locals.<br>
            #9  0x080f0005 in main_loop () at main.c:1699<br>
                    i = 3<br>
                    pid = 0<br>
                    si = 0x0<br>
                    si_desc = "udp receiver child=2 sock=<a
              href="http://192.168.1.2:5060" moz-do-not-send="true">192.168.1.2:5060</a>\000\270\301\310V\270\301\310V\000\000\000\000\000\000\000\020c\000\000\000\001\000\000\000\000\000\000\000\374Q\344\277HO\344\277\341`&\b\230\071\220\227\004\000\000\000٧5\b$\271\065\bn\000\000\000\324\247\065\b\n\000\000\000\363\320\372\060",
            '\000' <repeats 11 times><br>
                    nrprocs = 3<br>
                    woneinit = 1<br>
                    __FUNCTION__ = "main_loop" <br>
            #10 0x080f6b3a in main (argc=13, argv=0xbfe45374) at
            main.c:2644<br>
                    cfg_stream = 0x8491008<br>
                    c = -1<br>
                    r = 0<br>
                    tmp = 0xbfe4577c "" <br>
                    tmp_len = 1<br>
                    port = 0<br>
                    proto = 0<br>
                    options = 0x8350e74
            ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:"
            <br>
                    ret = -1<br>
                    seed = 1759582648<br>
                    rfd = 4<br>
                    debug_save = 0<br>
                    debug_flag = 0<br>
                    dont_fork_cnt = 0<br>
                    n_lst = 0xbfe452a0<br>
                    p = 0x805cc8c "[\201Ä4;" <br>
                    st = {st_dev = 14, __pad1 = 0, st_ino = 6161,
            st_mode = 16877, st_nlink = 2, st_uid = 109, <br>
                      st_gid = 111, st_rdev = 0, __pad2 = 0, st_size =
            60, st_blksize = 4096, st_blocks = 0, <br>
                      st_atim = {tv_sec = 1560160293, tv_nsec =
            983219454}, st_mtim = {tv_sec = 1560165082, <br>
                        tv_nsec = 861178334}, st_ctim = {tv_sec =
            1560165082, tv_nsec = 861178334}, <br>
                      __unused4 = 0, __unused5 = 0}<br>
                    __FUNCTION__ = "main" <br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a></pre>
  </body>
</html>