Hello, 4.4 is real old and you should seriously consider upgrading.
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. Cheers, Daniel On 15.12.20 16:44, Sheldon L wrote: > Hi, > > I'm trying to investigate a possible memory leak issue in Kamailio and > I'm following the instructions indicated > in https://www.kamailio.org/wiki/tutorials/troubleshooting/memory > <https://www.kamailio.org/wiki/tutorials/troubleshooting/memory> > > I'm using Kamailo 4.4 with the following kamailio internals: > > Print out of kamailio internals > Version: kamailio 4.4.2 (x86_64/linux) 892ad6 > Default config: > /apollo/env/TachyonPlatformKamailio/etc/kamailio/kamailio.cfg > Default paths to modules: > /apollo/env/TachyonPlatformKamailio/lib64/kamailio/modules > 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 > MAX_RECV_BUFFER_SIZE=262144 > MAX_LISTEN=16 > MAX_URI_SIZE=1024 > BUF_SIZE=65535 > DEFAULT PKG_SIZE=8MB > DEFAULT SHM_SIZE=64MB > ADAPTIVE_WAIT_LOOPS=1024 > TCP poll methods: poll, epoll_lt, epoll_et, sigio_rt, select > Source code revision ID: 892ad6 > Compiled with: x86_64-unknown-linux-gnu-gcc 4.9.4 > Compiled on: 23:36:48 Dec 8 2020 > Thank you for flying kamailio! > > 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. > > The following is the output from my gdb session: > > Copyright (C) 2013 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > <http://gnu.org/licenses/gpl.html <http://gnu.org/licenses/gpl.html>> > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. Type "show copying" > and "show warranty" for details. > This GDB was configured as "x86_64-amazon-linux-gnu". > For bug reporting instructions, please see: > <http://www.gnu.org/software/gdb/bugs/ > <http://www.gnu.org/software/gdb/bugs/>>... > Reading symbols from > /opt/codedeploy-agent/deployment-root/95bb1634-e653-4cec-b327-99b18b9227a8/d-7AJ1XZP58/deployment-archive/sbin/kamailio...done. > Attaching to program: > /apollo/env/TachyonPlatformKamailio/sbin/kamailio, process 8946 > ptrace: Operation not permitted. > (gdb) set $i=0 > (gdb) set $a = mem_block->first_frag > No symbol "mem_block" in current context. > (gdb) info list > Undefined info command: "list". Try "help info". > (gdb) info threads > No threads. > > > Is there something I need to do before accessing the mem_block symbol? > > Also do you have any other suggestions for debugging memory leaks that > may not be documented? > > Note: i can't upgrade to the latest version of Kamailio as we have > custom modules and would require considerable effort to upgrade. > > Thanks, > > Sheldon. > > > > _______________________________________________ > Kamailio (SER) - Users Mailing List > [email protected] > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- www.linkedin.com/in/miconda Funding: https://www.paypal.me/dcmierla
_______________________________________________ Kamailio (SER) - Users Mailing List [email protected] https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
