[OpenSIPS-Devel] Potential Package Memory Leak

Ovidiu Sas osas at voipembedded.com
Mon Apr 2 22:33:24 CEST 2012


Please follows the steps described here to troubleshoot the problem:
http://www.opensips.org/Resources/DocsTsMem

Regards,
Ovidiu Sas

On Fri, Mar 30, 2012 at 4:01 AM, Muhammad Shahzad
<shaheryarkh at googlemail.com> wrote:
> I am running revision 8865 of opensips v1.7.2 and getting similar error. The
> service is crashing twice a day.
>
> =============================================================================================
> Mar 29 16:48:54 osips-test rtsip-service[17339]: WARNING:core:fm_malloc: Not
> enough free memory, will atempt defragmenation
> Mar 29 16:48:54 osips-test rtsip-service[17339]: ERROR:core:tcpconn_new:
> shared memory allocation failure
> Mar 29 16:49:03 osips-test rtsip-service[17339]:
> ERROR:core:handle_new_connect: tcpconn_new failed, closing socket
> =============================================================================================
>
> opensips -V output is,
> =============================================================================================
> version: opensips 1.7.2-tls (i386/linux)
> flags: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, USE_SCTP, DISABLE_NAGLE,
> USE_MCAST, SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
> MAX_URI_SIZE 1024, BUF_SIZE 65535
> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
> svnrevision: 2:8865M
> @(#) $Id: main.c 8537 2011-11-08 17:02:11Z bogdan_iancu $
> main.c compiled on 20:09:09 Mar 27 2012 with gcc 4.4.5
> =============================================================================================
>
> Thank you.
>
>
> On Fri, Mar 30, 2012 at 3:00 AM, Ovidiu Sas <osas at voipembedded.com> wrote:
>>
>> Your opensips version is quite a few revisions back (8527 vs 8880).
>> Please rebuild from stable branch and try again:
>> https://opensips.svn.sourceforge.net/svnroot/opensips/branches/1.8
>>
>> Regards,
>> Ovidiu Sas
>>
>> --
>> VoIP Embedded, Inc.
>> http://www.voipembedded.com
>>
>> On Thu, Mar 29, 2012 at 5:54 PM, Ryan Bullock <rrb3942 at gmail.com> wrote:
>> > After some recent scripting changes we started getting the following
>> > errors in our logs:
>> >
>> > ERROR:core:do_action: memory allocation failure
>> > ERROR:core:pv_set_ruri_user: do action failed
>> > CRITICAL:core:mk_proxy: pkg memory allocation failure
>> > .........
>> > .........
>> >
>> > Restarting opensips clears the issue for awhile.
>> >
>> > System information:
>> > Scientific Linux 6.1
>> > Linux 2.6.32-220.4.1.el6.x86_64 #1 SMP Mon Jan 23 17:20:44 CST 2012
>> > x86_64 x86_64 x86_64 GNU/Linux
>> >
>> > Opensips Info (This is a bit older SVN of trunk, so unsure if this is
>> > a known issue, I could not find one):
>> > version: opensips 1.8.0-dev0-notls (x86_64/linux)
>> > flags: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST,
>> > SHM_MEM, SHM_MMAP, PKG_MALLOC, DBG_QM_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
>> > ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
>> > MAX_URI_SIZE 1024, BUF_SIZE 65535
>> > poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
>> > svnrevision: 2:8527M
>> > @(#) $Id: main.c 8506 2011-10-21 10:21:10Z vladut-paiu $
>> > main.c compiled on 09:00:51 Jan  9 2012 with gcc 4.4.5
>> >
>> > Opensips Startup options: "-u opensips -g opensips -m 2560 -M 100"
>> >
>> > The big scripting changes that were made included storing the $rb of
>> > the initial invite in a dialog variable (e.g
>> > store_dlg_value("uac_body","$rb")) and the use of  append_to_reply()
>> > (e.g. append_to_reply("Contact: $avp(contact)\r\nContent-Type:
>> > application/sdp\r\n"))  with t_reply_with_body (e.g
>> > t_reply_with_body("200", "OK", "$avp(uac_body)")) for an interop issue
>> > were having.
>> >
>> > While I would expect some increased memory usage (from storing $rb), I
>> > do not think it should be using up all of our package memory.
>> > Increasing package memory does appear to increase the time between
>> > occurrences.
>> >
>> > A memory dump from the last time we received these errors is availble
>> > at:
>> > http://voipnerd.net/files/temp/opensips_memdump_dlgvar.log.bz2
>> >
>> > Could someone please take a peak at the dump and ensure no leak is
>> > happening? Or am I really using 100M of package memory?
>> >
>> > We are planning an update to the latest 1.8 svn this weekend in hopes
>> > that it may resolve this issue and bring us more current.
>> >
>> > Please let me know if any additional information is required.
>> >
>> > Thank you for your time.
>> >
>> > Regards,
>> >
>> > Ryan
>>
>> _______________________________________________
>> Devel mailing list
>> Devel at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>
>
>
>
> --
> Muhammad Shahzad
> -----------------------------------
> CISCO Rich Media Communication Specialist (CRMCS)
> CISCO Certified Network Associate (CCNA)
> Cell: +92 334 422 40 88
> MSN: shari_786pk at hotmail.com
> Email: shaheryarkh at googlemail.com
>
> _______________________________________________
> Devel mailing list
> Devel at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>



-- 
VoIP Embedded, Inc.
http://www.voipembedded.com



More information about the Devel mailing list