<div dir="ltr"><div>The Opensips version I am using is 1.9.1 compiled from src tar. The output of opensips -V is below:<br><br>=======================<br>version: opensips 1.9.1-tls (x86_64/linux)
<br>flags: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, DISABLE_NAGLE, USE_MCAST, SHM_MEM, SHM_MMAP, PKG_MALLOC, DBG_QM_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
<br>ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535
<br>poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
<br>svnrevision: unknown
<br>@(#) $Id: main.c 9790 2013-02-15 10:14:34Z bogdan_iancu $
<br>main.c compiled on 03:11:32 Feb  6 2014 with gcc 4.4.5<br>=======================<br><br><br></div>The backtrace from last 3 crashes are:<br><br>===================<br>#0  0x00007fc3d12fe1b5 in raise () from /lib/libc.so.6<br>
(gdb) bt<br>#0  0x00007fc3d12fe1b5 in raise () from /lib/libc.so.6<br>#1  0x00007fc3d1300fc0 in abort () from /lib/libc.so.6<br>#2  0x00000000004e8b19 in qm_free (qm=0x7fc3b8e59000, p=0x7fc3b92d90c0, file=0x596ed9 &quot;parser/sdp/sdp.c&quot;, func=0x596da0 &quot;free_cloned_sdp_stream&quot;, line=874) at mem/q_malloc.c:450<br>
#3  0x000000000051ab2d in free_cloned_sdp_stream (_stream=&lt;value optimized out&gt;) at parser/sdp/sdp.c:874<br>#4  0x000000000051ada3 in free_cloned_sdp_session (_session=&lt;value optimized out&gt;) at parser/sdp/sdp.c:894<br>
#5  0x00007fc3cc380012 in destroy_qos (qos_sdp=0x7fc3b92aaba0) at qos_ctx_helpers.c:73<br>#6  0x00007fc3cc383aeb in remove_sdp (qos_ctx=&lt;value optimized out&gt;, dir=1, _m=0x7fc3d01ba410, role=&lt;value optimized out&gt;, other_role=1) at qos_ctx_helpers.c:539<br>
#7  0x00007fc3cc384220 in qos_dialog_response_CB (did=&lt;value optimized out&gt;, type=&lt;value optimized out&gt;, params=&lt;value optimized out&gt;) at qos_handlers.c:271<br>#8  0x00007fc3cd01a82e in run_dlg_callbacks (type=512, dlg=0x7fc3b9333ec8, msg=&lt;value optimized out&gt;, dir=4294967295, dlg_data=0x0) at dlg_cb.c:253<br>
#9  0x00007fc3cdedc9a5 in run_trans_callbacks (type=8, trans=0x7fc3b9f94c18, req=0x7fc3ba5fa7c0, rpl=&lt;value optimized out&gt;, code=&lt;value optimized out&gt;) at t_hooks.c:212<br>#10 0x00007fc3cdefa966 in relay_reply (t=0x7fc3b9f94c18, p_msg=0x7fc3d01ba410, branch=0, msg_status=491, cancel_bitmap=&lt;value optimized out&gt;) at t_reply.c:1218<br>
#11 0x00007fc3cdefb579 in reply_received (p_msg=0x7fc3d01ba410) at t_reply.c:1549<br>#12 0x000000000042fa45 in forward_reply (msg=0x7fc3d01ba410) at forward.c:575<br>#13 0x000000000047c80d in receive_msg (<br>    buf=0x7e3620 &quot;SIP/2.0 491 Another INVITE transaction in progress\r\nVia: SIP/2.0/UDP XXX.XXX.XXX.XXX:6000;received=77.66.2.136;branch=z9hG4bKc83b.cbf7d513.0\r\nVia: SIP/2.0/UDP XXX.XXX.XXX.XXX:5090;rport=5090;received=77.66.2.&quot;..., len=517, rcv_info=0x7fff1ecac640) at receive.c:207<br>
#14 0x00000000004e03d1 in udp_rcv_loop () at udp_server.c:424<br>#15 0x0000000000438296 in main_loop (argc=&lt;value optimized out&gt;, argv=&lt;value optimized out&gt;) at main.c:884<br>#16 main (argc=&lt;value optimized out&gt;, argv=&lt;value optimized out&gt;) at main.c:1557<br>
===================<br><br>===================<br>#0  0x00007f32f24fd1b5 in raise () from /lib/libc.so.6<br>(gdb) bt<br>#0  0x00007f32f24fd1b5 in raise () from /lib/libc.so.6<br>#1  0x00007f32f24fffc0 in abort () from /lib/libc.so.6<br>
#2  0x00000000004e8b19 in qm_free (qm=0x7f32da058000, p=0x7f32da46f370, file=0x596ed9 &quot;parser/sdp/sdp.c&quot;, func=0x596da0 &quot;free_cloned_sdp_stream&quot;, line=874) at mem/q_malloc.c:450<br>#3  0x000000000051ab2d in free_cloned_sdp_stream (_stream=&lt;value optimized out&gt;) at parser/sdp/sdp.c:874<br>
#4  0x000000000051ada3 in free_cloned_sdp_session (_session=&lt;value optimized out&gt;) at parser/sdp/sdp.c:894<br>#5  0x00007f32ed57f012 in destroy_qos (qos_sdp=0x7f32da48efe0) at qos_ctx_helpers.c:73<br>#6  0x00007f32ed582aeb in remove_sdp (qos_ctx=&lt;value optimized out&gt;, dir=1, _m=0x7f32f13b8de0, role=&lt;value optimized out&gt;, other_role=1) at qos_ctx_helpers.c:539<br>
#7  0x00007f32ed583220 in qos_dialog_response_CB (did=&lt;value optimized out&gt;, type=&lt;value optimized out&gt;, params=&lt;value optimized out&gt;) at qos_handlers.c:271<br>#8  0x00007f32ee21982e in run_dlg_callbacks (type=512, dlg=0x7f32da472ef0, msg=&lt;value optimized out&gt;, dir=4294967295, dlg_data=0x0) at dlg_cb.c:253<br>
#9  0x00007f32ef0db9a5 in run_trans_callbacks (type=8, trans=0x7f32da4ba1f0, req=0x7f32da4d99a8, rpl=&lt;value optimized out&gt;, code=&lt;value optimized out&gt;) at t_hooks.c:212<br>#10 0x00007f32ef0f9966 in relay_reply (t=0x7f32da4ba1f0, p_msg=0x7f32f13b8de0, branch=0, msg_status=491, cancel_bitmap=&lt;value optimized out&gt;) at t_reply.c:1218<br>
#11 0x00007f32ef0fa579 in reply_received (p_msg=0x7f32f13b8de0) at t_reply.c:1549<br>#12 0x000000000042fa45 in forward_reply (msg=0x7f32f13b8de0) at forward.c:575<br>#13 0x000000000047c80d in receive_msg (<br>    buf=0x7e3620 &quot;SIP/2.0 491 Another INVITE transaction in progress\r\nVia: SIP/2.0/UDP XXX.XXX.XXX.XXX:6000;received=77.66.2.136;branch=z9hG4bK4d4d.6b9c34d6.0\r\nVia: SIP/2.0/UDP XXX.XXX.XXX.XXX:5090;rport=5090;received=77.66.2.&quot;..., len=517, rcv_info=0x7fffd3e54750) at receive.c:207<br>
#14 0x00000000004e03d1 in udp_rcv_loop () at udp_server.c:424<br>#15 0x0000000000438296 in main_loop (argc=&lt;value optimized out&gt;, argv=&lt;value optimized out&gt;) at main.c:884<br>#16 main (argc=&lt;value optimized out&gt;, argv=&lt;value optimized out&gt;) at main.c:1557<br>
===================<br><br>===================<br>#0  0x00007fe13b0e31b5 in raise () from /lib/libc.so.6<br>(gdb) bt<br>#0  0x00007fe13b0e31b5 in raise () from /lib/libc.so.6<br>#1  0x00007fe13b0e5fc0 in abort () from /lib/libc.so.6<br>
#2  0x00000000004e8b19 in qm_free (qm=0x7fe122c3e000, p=0x7fe1230a02a0, file=0x596ed9 &quot;parser/sdp/sdp.c&quot;, func=0x596da0 &quot;free_cloned_sdp_stream&quot;, line=874) at mem/q_malloc.c:450<br>#3  0x000000000051ab2d in free_cloned_sdp_stream (_stream=&lt;value optimized out&gt;) at parser/sdp/sdp.c:874<br>
#4  0x000000000051ada3 in free_cloned_sdp_session (_session=&lt;value optimized out&gt;) at parser/sdp/sdp.c:894<br>#5  0x00007fe136165012 in destroy_qos (qos_sdp=0x7fe1230a7ff8) at qos_ctx_helpers.c:73<br>#6  0x00007fe136168aeb in remove_sdp (qos_ctx=&lt;value optimized out&gt;, dir=1, _m=0x7fe139f9ede0, role=&lt;value optimized out&gt;, other_role=1) at qos_ctx_helpers.c:539<br>
#7  0x00007fe136169220 in qos_dialog_response_CB (did=&lt;value optimized out&gt;, type=&lt;value optimized out&gt;, params=&lt;value optimized out&gt;) at qos_handlers.c:271<br>#8  0x00007fe136dff82e in run_dlg_callbacks (type=512, dlg=0x7fe1235c3fa0, msg=&lt;value optimized out&gt;, dir=4294967295, dlg_data=0x0) at dlg_cb.c:253<br>
#9  0x00007fe137cc19a5 in run_trans_callbacks (type=8, trans=0x7fe1233c9160, req=0x7fe12338bba8, rpl=&lt;value optimized out&gt;, code=&lt;value optimized out&gt;) at t_hooks.c:212<br>#10 0x00007fe137cdf966 in relay_reply (t=0x7fe1233c9160, p_msg=0x7fe139f9ede0, branch=0, msg_status=408, cancel_bitmap=&lt;value optimized out&gt;) at t_reply.c:1218<br>
#11 0x00007fe137ce0579 in reply_received (p_msg=0x7fe139f9ede0) at t_reply.c:1549<br>#12 0x000000000042fa45 in forward_reply (msg=0x7fe139f9ede0) at forward.c:575<br>#13 0x000000000047c80d in receive_msg (<br>    buf=0x7e3620 &quot;SIP/2.0 408 Request Timeout\r\nFrom: sip:00919565895272@XXX.XXX.XXX.XXX;tag=as2bf8b554\r\nTo: \&quot;123\&quot; &lt;sip:919820345554@XXX.XXX.XXX.XXX&gt;;tag=qmDrTd0epsE0CDM4mGbp2Ha29xKut3S.\r\nCall-ID: 4A6Vi2Hsyx4gmi3H3N0A&quot;..., len=471, rcv_info=0x7fff7a5f25c0) at receive.c:207<br>
#14 0x00000000004e03d1 in udp_rcv_loop () at udp_server.c:424<br>#15 0x0000000000438296 in main_loop (argc=&lt;value optimized out&gt;, argv=&lt;value optimized out&gt;) at main.c:884<br>#16 main (argc=&lt;value optimized out&gt;, argv=&lt;value optimized out&gt;) at main.c:1557<br>
===================<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 11, 2014 at 8:31 PM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div><tt>Hello,<br>
        <br>
        Two things:<br>
        <br>
        1) be sure you have the latest 1.9.1 code (GIT or tar balls)<br>
        <br>
        2) post the actual backtrace  (from the core file), please<br>
        <br>
        Thanks and regards,<br>
      </tt>
      <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre><div><div class="h5">
      On 11.02.2014 06:25, Ahsan Hasan wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr">So it crashed again today. Here is the log<br>
        <div><br>
          Feb 10 18:26:24 RTSIP rtsip-service[10443]:
          CRITICAL:core:qm_free: freeing already freed pointer, first
          free: parser/sdp/sdp.c: free_cloned_sdp_stream(874) - aborting
          <br>
          Feb 10 18:26:25 RTSIP rtsip-service[10464]:
          CRITICAL:core:receive_fd: EOF on 25<br>
          <br>
          <br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Mon, Feb 10, 2014 at 2:45 PM, Ahsan
          Hasan <span dir="ltr">&lt;<a href="mailto:ahsanhasanjaved@gmail.com" target="_blank">ahsanhasanjaved@gmail.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">My opensips has crashed again. Here is the
              core dump.<br>
              <br>
              ================= core dump =========================<br>
              <div>Reading symbols from /lib/libnss_compat.so.2...(no
                debugging symbols found)...done.<br>
                Loaded symbols for /lib/libnss_compat.so.2<br>
                Reading symbols from /lib/libnss_nis.so.2...(no
                debugging symbols found)...done.<br>
                Loaded symbols for /lib/libnss_nis.so.2<br>
                Reading symbols from /lib/libnss_files.so.2...(no
                debugging symbols found)...done.<br>
                Loaded symbols for /lib/libnss_files.so.2<br>
                Core was generated by `/usr/local/sbin/opensips -P
                /var/run/opensips/opensips.pid -m 256 -M 16 -u root&#39;.<br>
                Program terminated with signal 6, Aborted.<br>
                #0  0x00007fe13b0e31b5 in raise () from /lib/libc.so.6<br>
                <br>
                ===================================================<br>
                <br>
              </div>
              <div>The memlogs are also attached.<span><font color="#888888"><br>
                    <br>
                  </font></span></div>
              <div class="gmail_extra"><span><font color="#888888">-- <br>
                    Ahsan Hasan</font></span>
                <div>
                  <div><br>
                    <br>
                    <br>
                    <div class="gmail_quote">On Thu, Jan 9, 2014 at 3:14
                      PM, Ahsan Hasan <span dir="ltr">&lt;<a href="mailto:ahsanhasanjaved@gmail.com" target="_blank">ahsanhasanjaved@gmail.com</a>&gt;</span>
                      wrote:<br>
                      <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                        <div dir="ltr">
                          <div>
                            <div>Hi Razvan,<br>
                              <br>
                            </div>
                            Let me enable it and wait for the next
                            crash.<br>
                            <br>
                            <br>
                          </div>
                          Regards,<span><font color="#888888"><br>
                              -- <br>
                              Ahsan Hasan</font></span>
                          <div>
                            <div><br>
                              <div class="gmail_extra"><br>
                                <br>
                                <div class="gmail_quote">On Thu, Jan 9,
                                  2014 at 12:44 PM, Răzvan Crainea <span dir="ltr">&lt;<a href="mailto:razvan@opensips.org" target="_blank">razvan@opensips.org</a>&gt;</span>
                                  wrote:<br>
                                  <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,
                                    Ahsan!<br>
                                    <br>
                                    Can you please enable the the memory
                                    debugging (DBG_QM_MALLOC flag in
                                    menuconfig)? You can follow this
                                    tutorial[1].<br>
                                    <br>
                                    [1] <a href="http://www.opensips.org/Documentation/TroubleShooting-OutOfMem" target="_blank">http://www.opensips.org/Documentation/TroubleShooting-OutOfMem</a><br>
                                    <br>
                                    Best regards,<br>
                                    <br>
                                    Razvan Crainea<br>
                                    OpenSIPS Core Developer<br>
                                    <a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a>
                                    <div>
                                      <div><br>
                                        <br>
                                        On 01/09/2014 07:54 AM, Ahsan
                                        Hasan wrote:<br>
                                      </div>
                                    </div>
                                    <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                                      <div>
                                        <div>
                                          <br>
                                          We are using opensips-1.9.1
                                          and it is crashing randomly
                                          every other<br>
                                          week, the core dumps generated
                                          are always related to memory
                                          leakage. The<br>
                                          last four core dumps are<br>
                                          <br>
                                          Program terminated with signal
                                          11, Segmentation fault.<br>
                                          #0  0x00007f4c12e20c77 in
                                          write_dialog_profiles
                                          (links=0x7f4bff03d7f0)<br>
                                          at dlg_db_handler.c:1085<br>
                                          1085            l +=
                                          link-&gt;profile-&gt;name.len
                                          + 1 + link-&gt;value.len + 1;<br>
                                          <br>
                                          Program terminated with signal
                                          11, Segmentation fault.<br>
                                          #0  0x00000000004e5da2 in
                                          fm_remove_free
                                          (qm=0x7f4bfec5a000, size=112)<br>
                                          at mem/f_malloc.c:172<br>
                                          172      
                                           *pf=n-&gt;u.nxt_free;<br>
                                          <br>
                                          Program terminated with signal
                                          11, Segmentation fault.<br>
                                          #0  free_cloned_sdp_session
                                          (_session=0x362e373740333532)
                                          at<br>
                                          parser/sdp/sdp.c:893<br>
                                          893            session =
                                          l_session-&gt;next;<br>
                                          <br>
                                          Program terminated with signal
                                          11, Segmentation fault.<br>
                                          #0  0x00000000004e5da2 in
                                          fm_remove_free
                                          (qm=0x7f71a9524000, size=96)
                                          at<br>
                                          mem/f_malloc.c:172<br>
                                          172      
                                           *pf=n-&gt;u.nxt_free;<br>
                                          <br>
                                          What can be the cause?<br>
                                          <br>
                                          --<br>
                                          Ahsan Hasan<br>
                                          <br>
                                          <br>
                                          <br>
                                        </div>
                                      </div>
                                      _______________________________________________<br>
                                      Users mailing list<br>
                                      <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
                                      <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                                      <br>
                                    </blockquote>
                                    <br>
                                    _______________________________________________<br>
                                    Users mailing list<br>
                                    <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
                                    <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                                  </blockquote>
                                </div>
                                <br>
                                <br clear="all">
                                <br>
                                <br>
                                <div><br>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </blockquote>
                    </div>
                    <br>
                    <br clear="all">
                    <br>
                    <br>
                  </div>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <br>
        -- <br>
        Ahsan Hasan
        <div><a href="tel:%2B92.333.438.2041" value="+923334382041" target="_blank">+92.333.438.2041</a></div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br><br clear="all"><br>-- <br>Ahsan Hasan<div>+92.333.438.2041</div>
</div>