[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 21:35:08 PDT 2009


Some questions?

1) How many calls did you run through FS to produce this log?
2) What svn rev were you on (line numbers don't match)
3) Best to focus on leaks that are hit on a per-call basis.  init leaks are
annoying but not the end of the world.

On Wed, Jul 15, 2009 at 10:40 PM, <freeswitch-dev at lists.freeswitch.org>wrote:

> 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?
>
> ==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)
>

init leak


> ==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==


Should be looked at -- but I line numbers don't line up with what I have.

>
> ==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==


init leak


>
> ==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)
>

Should be looked at.


> ==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)
>

Whats that?
-- 
-Rupa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20090715/69f23334/attachment.html 


More information about the FreeSWITCH-dev mailing list