[OpenSIPS-Users] Quest to find memory leak

John Nash john.nash778 at gmail.com
Mon Mar 6 02:55:25 EST 2017


I am using OpenSIPS (2.1.5 (x86_64/linux)) in production. I observed
private memory is decreasing constantly for one process mainly and
ultimately leading to memory errors and crash.

To debug this issue I prepared a test server and compiled opensips as per
https://www.opensips.org/Documentation/TroubleShooting-OutOfMem

I made only one single call (which was rejected by opensips as it was not
authorized user) and I saw private free memory decreased. I was hoping
since transaction is done ideally it should release memory and should show
me same memory as startup but it did not. I verified this with many call
attempts and i see free memory is always decreasing slowly.

I used kill -SIGUSR1 <lowest pid> to create memory dump. But i am unable to
make sense of it. It shows log like ...

r  6 07:29:19 Server3021 opensips[13276]: Memory status (pkg):
Mar  6 07:29:19 Server3021 opensips[13276]: qm_status (0x7f5b8ebba010):
Mar  6 07:29:19 Server3021 opensips[13276]:  heap size= 4194304
Mar  6 07:29:19 Server3021 opensips[13276]:  used= 346768,
used+overhead=848792, free=3345512
Mar  6 07:29:19 Server3021 opensips[13276]:  max used (+overhead)= 931920
Mar  6 07:29:19 Server3021 opensips[13276]: dumping all alloc'ed. fragments:
Mar  6 07:29:19 Server3021 opensips[13276]:       0. N
 address=0x7f5b8ebef528 frag=0x7f5b8ebef4f8 size=40 used=1
Mar  6 07:29:19 Server3021 opensips[13276]:             alloc'd from
script_cb.c: add_callback(60)
Mar  6 07:29:19 Server3021 opensips[13276]:         start
check=f0f0f0f0f0f0f0f0, end check= c0c0c0c0c0c0c0c0, abcdefedabcdefed
Mar  6 07:29:19 Server3021 opensips[13276]:       1. N
 address=0x7f5b8ebef5b0

I pasted only few lines in this mail. What should be my next step?...How
can i really trace what is wrong in my script or any other memory leak?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170306/210b3735/attachment.html>


More information about the Users mailing list