<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,</p>
<p>4.4 is real old and you should seriously consider upgrading.</p>
<p>Then, to the question itself, you have to look for _qm_pkg_block
for private memory root structure, probably the guide needs some
updates, likely it was written before the option to select the
memory manager.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 15.12.20 16:44, Sheldon L wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAKOSiMc6JWNLDY0LhNbWLtmBzG2hHrxVeZAkshGRjL3ZUkNm=A@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi,
<div><br>
</div>
<div>I'm trying to investigate a possible memory leak issue in
Kamailio and I'm following the instructions indicated in <a
href="https://www.kamailio.org/wiki/tutorials/troubleshooting/memory"
moz-do-not-send="true">https://www.kamailio.org/wiki/tutorials/troubleshooting/memory</a></div>
<div><br>
</div>
<div>I'm using Kamailo 4.4 with the following kamailio
internals:</div>
<div><br>
</div>
<div>Print out of kamailio internals<br>
Version: kamailio 4.4.2 (x86_64/linux) 892ad6<br>
Default config:
/apollo/env/TachyonPlatformKamailio/etc/kamailio/kamailio.cfg<br>
Default paths to modules:
/apollo/env/TachyonPlatformKamailio/lib64/kamailio/modules<br>
Compile flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP,
TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST,
DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC,
F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, DBG_QM_MALLOC,
USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE,
USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST,
HAVE_RESOLV_RES<br>
MAX_RECV_BUFFER_SIZE=262144<br>
MAX_LISTEN=16<br>
MAX_URI_SIZE=1024<br>
BUF_SIZE=65535<br>
DEFAULT PKG_SIZE=8MB<br>
DEFAULT SHM_SIZE=64MB<br>
ADAPTIVE_WAIT_LOOPS=1024<br>
TCP poll methods: poll, epoll_lt, epoll_et, sigio_rt, select<br>
Source code revision ID: 892ad6<br>
Compiled with: x86_64-unknown-linux-gnu-gcc 4.9.4<br>
Compiled on: 23:36:48 Dec 8 2020<br>
Thank you for flying kamailio!<br>
</div>
<div><br>
</div>
<div>I have attached to one of the kamailio tcp receiver
processes via GDB and I am trying to dump memory blocks from
the memory manager. However, mem_block is not in the
current_context.</div>
<div><br>
</div>
<div>The following is the output from my gdb session:</div>
<div><br>
</div>
<div>Copyright (C) 2013 Free Software Foundation, Inc.<br>
License GPLv3+: GNU GPL version 3 or later <<a
href="http://gnu.org/licenses/gpl.html"
moz-do-not-send="true">http://gnu.org/licenses/gpl.html</a>><br>
This is free software: you are free to change and redistribute
it.<br>
There is NO WARRANTY, to the extent permitted by law. Type
"show copying"<br>
and "show warranty" for details.<br>
This GDB was configured as "x86_64-amazon-linux-gnu".<br>
For bug reporting instructions, please see:<br>
<<a href="http://www.gnu.org/software/gdb/bugs/"
moz-do-not-send="true">http://www.gnu.org/software/gdb/bugs/</a>>...<br>
Reading symbols from
/opt/codedeploy-agent/deployment-root/95bb1634-e653-4cec-b327-99b18b9227a8/d-7AJ1XZP58/deployment-archive/sbin/kamailio...done.<br>
Attaching to program:
/apollo/env/TachyonPlatformKamailio/sbin/kamailio, process
8946<br>
ptrace: Operation not permitted.<br>
(gdb) set $i=0<br>
(gdb) set $a = mem_block->first_frag<br>
No symbol "mem_block" in current context.<br>
(gdb) info list<br>
Undefined info command: "list". Try "help info".<br>
(gdb) info threads<br>
No threads.<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Is there something I need to do before accessing the
mem_block symbol? </div>
<div><br>
</div>
<div>Also do you have any other suggestions for debugging memory
leaks that may not be documented?</div>
<div><br>
</div>
<div>Note: i can't upgrade to the latest version of Kamailio as
we have custom modules and would require considerable effort
to upgrade.</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
Sheldon.</div>
<div><br>
</div>
<div><br>
</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>
Funding: <a class="moz-txt-link-freetext" href="https://www.paypal.me/dcmierla">https://www.paypal.me/dcmierla</a></pre>
</body>
</html>