[Freeswitch-dev] Question about Valgrind output showing mem leak in FS

freeswitch-dev at lists.freeswitch.org freeswitch-dev at lists.freeswitch.org
Wed Jul 15 20:40:34 PDT 2009


Hi,

I run valgrind and get the following output.  It points to some places where
there are some "definitely memory leak".  Is this a real issue or just a
false alarm?


[root at server ~]# cat /usr/local/freeswitch.bak/conf/test.log
==20667== Memcheck, a memory error detector.
==20667== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
==20667== Using LibVEX rev 1658, a library for dynamic binary translation.
==20667== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==20667== Using valgrind-3.2.1, a dynamic binary instrumentation framework.
==20667== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==20667== For more details, rerun with: -v
==20667==
==20667== My PID = 20667, parent PID = 19188.  Prog and args are:
==20667==    /usr/local/freeswitch.bak/bin/freeswitch
==20667==    -vg
==20667==    -log
==20667==    /usr/local/freeswitch.bak/log/
==20667==    -conf
==20667==    /usr/local/freeswitch.bak/conf/
==20667==    -db
==20667==    /usr/local/freeswitch.bak/db/
==20667==
==20667== Warning: set address range perms: large range 1024004096 (defined)
==20667== Warning: set address range perms: large range 1024004096 (defined)
==20667== Warning: set address range perms: large range 1024004096
(noaccess)
==20667== Warning: set address range perms: large range 1024004096
(noaccess)
==20667== Warning: set address range perms: large range 1024004096 (defined)
==20667== Warning: set address range perms: large range 1024004096 (defined)
==20667== Warning: set address range perms: large range 1024004096
(noaccess)
==20667== Warning: set address range perms: large range 1024004096
(noaccess)
==20667==
==20667== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 68 from 1)
==20667== malloc/free: in use at exit: 1,121,194 bytes in 426 blocks.
==20667== malloc/free: 4,603,109 allocs, 4,602,683 frees, 1,569,942,087
bytes allocated.
==20667== For counts of detected errors, rerun with: -v
==20667== searching for pointers to 426 not-freed blocks.
==20667== checked 2,477,072 bytes.
==20667==
==20667== 513 bytes in 3 blocks are definitely lost in loss record 15 of 33
==20667==    at 0x4A05809: malloc (vg_replace_malloc.c:149)
==20667==    by 0x4D1AA25: crypto_alloc (alloc.c:97)
==20667==    by 0x4D18551: aes_icm_alloc_ismacryp (aes_icm.c:115)
==20667==    by 0x4D16F59: cipher_type_self_test (cipher.c:264)
==20667==    by 0x4D1A456: crypto_kernel_load_cipher_type
(crypto_kernel.c:310)
==20667==    by 0x4D1A955: crypto_kernel_init (crypto_kernel.c:154)
==20667==    by 0x4D14D68: srtp_init (srtp.c:1081)
==20667==    by 0x4C83A1A: switch_rtp_init (switch_rtp.c:407)
==20667==    by 0x4C70935: switch_core_init (switch_core.c:1112)
==20667==    by 0x4C719AF: switch_core_init_and_modload (switch_core.c:1278)
==20667==    by 0x4025BA: main (switch.c:701)
==20667==
==20667==
==20667== 576 bytes in 1 blocks are definitely lost in loss record 17 of 33
==20667==    at 0x4A05809: malloc (vg_replace_malloc.c:149)
==20667==    by 0x64B80D2: sofia_glue_do_invite (sofia_glue.c:1488)
==20667==    by 0x6490913: sofia_on_init (mod_sofia.c:102)
==20667==    by 0x4C69523: switch_core_session_run
(switch_core_state_machine.c:480)
==20667==    by 0x4C66D0F: switch_core_session_thread
(switch_core_session.c:1065)
==20667==    by 0x3B85806366: start_thread (in /lib64/libpthread-2.5.so)
==20667==    by 0x3B850D2F7C: clone (in /lib64/libc-2.5.so)
==20667==
==20667==
==20667== 640 bytes in 2 blocks are possibly lost in loss record 18 of 33
==20667==    at 0x4A04B32: calloc (vg_replace_malloc.c:279)
==20667==    by 0x3B84C0FF12: _dl_allocate_tls (in /lib64/ld-2.5.so)
==20667==    by 0x3B85806AC2: pthread_create@@GLIBC_2.2.5 (in /lib64/
libpthread-2.5.so)
==20667==    by 0x4C6FB05: switch_core_launch_thread (switch_core.c:390)
==20667==    by 0x4C77DE0: switch_loadable_module_init
(switch_loadable_module.c:121)
==20667==    by 0x4C71AA9: switch_core_init_and_modload (switch_core.c:1307)
==20667==    by 0x4025BA: main (switch.c:701)
==20667==
==20667==
==20667== 1,152 bytes in 2 blocks are definitely lost in loss record 23 of
33
==20667==    at 0x4A05809: malloc (vg_replace_malloc.c:149)
==20667==    by 0x6499E41: sofia_handle_sip_i_invite (sofia.c:4891)
==20667==    by 0x649E733: sofia_event_callback (sofia.c:478)
==20667==    by 0x6519D19: nua_application_event (nua_stack.c:393)
==20667==    by 0x65971E8: su_base_port_execute_msgs (su_base_port.c:280)
==20667==    by 0x6596F60: su_base_port_getmsgs (su_base_port.c:202)
==20667==    by 0x6597503: su_base_port_step (su_base_port.c:473)
==20667==    by 0x659A2C5: su_port_step (su_port.h:340)
==20667==    by 0x659A28D: su_root_step (su_root.c:858)
==20667==    by 0x64A8E9A: sofia_profile_thread_run (sofia.c:877)
==20667==    by 0x3B85806366: start_thread (in /lib64/libpthread-2.5.so)
==20667==    by 0x3B850D2F7C: clone (in /lib64/libc-2.5.so)
==20667==
==20667==
==20667== 2,211 bytes in 201 blocks are definitely lost in loss record 24 of
33
==20667==    at 0x4A05809: malloc (vg_replace_malloc.c:149)
==20667==    by 0x3B85078AC1: strdup (in /lib64/libc-2.5.so)
==20667==    by 0x72EE44F: ??? (mod_highroute.c:1445)
==20667==    by 0x4C67197: switch_core_session_exec
(switch_core_session.c:1473)
==20667==    by 0x4C6761E: switch_core_session_execute_application
(switch_core_session.c:1395)
==20667==    by 0x4C6A892: switch_core_session_run
(switch_core_state_machine.c:166)
==20667==    by 0x4C66D0F: switch_core_session_thread
(switch_core_session.c:1065)
==20667==    by 0x3B85806366: start_thread (in /lib64/libpthread-2.5.so)
==20667==    by 0x3B850D2F7C: clone (in /lib64/libc-2.5.so)
==20667==
==20667== LEAK SUMMARY:
==20667==    definitely lost: 4,452 bytes in 207 blocks.
==20667==      possibly lost: 640 bytes in 2 blocks.
==20667==    still reachable: 1,116,102 bytes in 217 blocks.
==20667==         suppressed: 0 bytes in 0 blocks.
==20667== Reachable blocks (those to which a pointer was found) are not
shown.
==20667== To see them, rerun with: --show-reachable=yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20090716/40305422/attachment.html 


More information about the FreeSWITCH-dev mailing list