<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">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">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/">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>