drachtio/drachtio-freeswitch-modules

mod_audio_fork: memory leak in mod audio fork

Opened this issue · 0 comments

I am getting some memory likes when i use mod_audio_fork following are the valgrind ligs

==17== 904 bytes in 1 blocks are still reachable in loss record 110 of 175
==17==    at 0x48407B4: malloc (vg_replace_malloc.c:381)
==17==    by 0x57B4B58: CRYPTO_zalloc (in /usr/lib/x86_64-linux-gnu/libcrypto.so.3)
==17==    by 0x576AC1F: ??? (in /usr/lib/x86_64-linux-gnu/libcrypto.so.3)
==17==    by 0x576AD58: ERR_clear_error (in /usr/lib/x86_64-linux-gnu/libcrypto.so.3)
==17==    by 0x157BC3EF: ??? (in /usr/lib/x86_64-linux-gnu/libwebsockets.so.17)
==17==    by 0x157BB5D0: ??? (in /usr/lib/x86_64-linux-gnu/libwebsockets.so.17)
==17==    by 0x157CA30E: lws_create_vhost (in /usr/lib/x86_64-linux-gnu/libwebsockets.so.17)
==17==    by 0x157BE57F: lws_create_context (in /usr/lib/x86_64-linux-gnu/libwebsockets.so.17)
==17==    by 0x15799E95: AudioPipe::lws_service_thread(unsigned int) (audio_pipe.cpp:476)
==17==    by 0x5AD94A2: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30)
==17==    by 0x4D8A043: start_thread (pthread_create.c:442)
==17==    by 0x4E0987F: clone (clone.S:100)
==17== 432 bytes in 1 blocks are possibly lost in loss record 94 of 175
==17==    at 0x48455EF: calloc (vg_replace_malloc.c:1328)
==17==    by 0x4010AE2: calloc (rtld-malloc.h:44)
==17==    by 0x4010AE2: allocate_dtv (dl-tls.c:375)
==17==    by 0x40114DD: _dl_allocate_tls (dl-tls.c:634)
==17==    by 0x4D8ABFE: allocate_stack (allocatestack.c:423)
==17==    by 0x4D8ABFE: pthread_create@@GLIBC_2.34 (pthread_create.c:650)
==17==    by 0x5AD9578: std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30)
==17==    by 0x1579BCCD: thread<bool (*)(unsigned int), unsigned int&> (std_thread.h:142)
==17==    by 0x1579BCCD: AudioPipe::initialize(char const*, unsigned int, int, void (*)(int, char const*)) (audio_pipe.cpp:505)
==17==    by 0x1578544B: fork_init (lws_glue.cpp:450)
==17==    by 0x157839C3: mod_audio_fork_load (mod_audio_fork.c:335)
==17==    by 0x494252A: switch_loadable_module_load_file (switch_loadable_module.c:1720)
==17==    by 0x494252A: switch_loadable_module_load_module_ex (switch_loadable_module.c:1827)
==17==    by 0x4945453: switch_loadable_module_init (switch_loadable_module.c:2245)
==17==    by 0x48F44CE: switch_core_init_and_modload (switch_core.c:2470)
==17==    by 0x10AE89: main (switch.c:1201)
==17== 
==17== 904 bytes in 1 blocks are still reachable in loss record 110 of 175
==17==    at 0x48407B4: malloc (vg_replace_malloc.c:381)
==17==    by 0x57B4B58: CRYPTO_zalloc (in /usr/lib/x86_64-linux-gnu/libcrypto.so.3)
==17==    by 0x576AC1F: ??? (in /usr/lib/x86_64-linux-gnu/libcrypto.so.3)
==17==    by 0x576AD58: ERR_clear_error (in /usr/lib/x86_64-linux-gnu/libcrypto.so.3)
==17==    by 0x157BC3EF: ??? (in /usr/lib/x86_64-linux-gnu/libwebsockets.so.17)
==17==    by 0x157BB5D0: ??? (in /usr/lib/x86_64-linux-gnu/libwebsockets.so.17)
==17==    by 0x157CA30E: lws_create_vhost (in /usr/lib/x86_64-linux-gnu/libwebsockets.so.17)
==17==    by 0x157BE57F: lws_create_context (in /usr/lib/x86_64-linux-gnu/libwebsockets.so.17)
==17==    by 0x15799E95: AudioPipe::lws_service_thread(unsigned int) (audio_pipe.cpp:476)
==17==    by 0x5AD94A2: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30)
==17==    by 0x4D8A043: start_thread (pthread_create.c:442)
==17==    by 0x4E0987F: clone (clone.S:100)

==17== 6,544 bytes in 1 blocks are still reachable in loss record 129 of 175
==17==    at 0x48406C4: malloc (vg_replace_malloc.c:380)
==17==    by 0x157BCCCB: ??? (in /usr/lib/x86_64-linux-gnu/libwebsockets.so.17)
==17==    by 0x157BCD11: ??? (in /usr/lib/x86_64-linux-gnu/libwebsockets.so.17)
==17==    by 0x157BDDAF: lws_create_context (in /usr/lib/x86_64-linux-gnu/libwebsockets.so.17)
==17==    by 0x15799E95: AudioPipe::lws_service_thread(unsigned int) (audio_pipe.cpp:476)
==17==    by 0x5AD94A2: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30)
==17==    by 0x4D8A043: start_thread (pthread_create.c:442)
==17==    by 0x4E0987F: clone (clone.S:100)
==17== 

If this is already fixed or anyone have some idea please help.