Hi, I I'm testing freeswitch with sipp. My test configuration is the following: Sipp(caller) -> freeswitch -> Sipp(callee)s Testing loads are 5 CPS ~ 30 CPS and caller has hanged up a call as soon as receiving 200 OK. In this testing environment, freeswitch's used memory is growing continuously. The following is the valgrind's log on testing with 5 CPS 100 calls. ==20156== ==20156== ERROR SUMMARY: 19431 errors from 30 contexts (suppressed: 259 from 2) ==20156== malloc/free: in use at exit: 16,697,395 bytes in 3,372 blocks. ==20156== malloc/free: 4,304,021 allocs, 4,300,649 frees, 505,070,026 bytes allocated. ==20156== For counts of detected errors, rerun with: -v ==20156== searching for pointers to 3,372 not-freed blocks. ==20156== checked 33,297,068 bytes. ==20156== ==20156== Thread 1: ==20156== ==20156== 8 bytes in 2 blocks are still reachable in loss record 1 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x4006F98: (within /lib/ld-2.6.1.so) ==20156== by 0x400824D: (within /lib/ld-2.6.1.so) ==20156== by 0x400BF75: (within /lib/ld-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x400C159: (within /lib/ld-2.6.1.so) ==20156== by 0x40117A3: (within /lib/ld-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x401114B: (within /lib/ld-2.6.1.so) ==20156== by 0x41B089C: (within /lib/libdl-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x41B010B: (within /lib/libdl-2.6.1.so) ==20156== ==20156== ==20156== 16 bytes in 2 blocks are still reachable in loss record 2 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x4007923: (within /lib/ld-2.6.1.so) ==20156== by 0x4007EBF: (within /lib/ld-2.6.1.so) ==20156== by 0x40084FF: (within /lib/ld-2.6.1.so) ==20156== by 0x400BF75: (within /lib/ld-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x400C159: (within /lib/ld-2.6.1.so) ==20156== by 0x40117A3: (within /lib/ld-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x401114B: (within /lib/ld-2.6.1.so) ==20156== by 0x41B089C: (within /lib/libdl-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== ==20156== ==20156== 20 bytes in 1 blocks are still reachable in loss record 3 of 65 ==20156== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==20156== by 0x41B017B: (within /lib/libdl-2.6.1.so) ==20156== by 0x41B091E: dlopen (in /lib/libdl-2.6.1.so) ==20156== by 0x40F3A0C: apr_dso_load (dso.c:139) ==20156== by 0x4090D4A: switch_dso_load (switch_apr.c:85) ==20156== by 0x40B43E4: switch_loadable_module_load_file (switch_loadable_module.c:698) ==20156== by 0x40B489B: switch_loadable_module_load_module (switch_loadable_module.c:825) ==20156== by 0x40B4B63: switch_loadable_module_init (switch_loadable_module.c:1027) ==20156== by 0x40AE6A0: switch_core_init_and_modload (switch_core.c:1205) ==20156== by 0x8049C2F: main (switch.c:546) ==20156== ==20156== ==20156== 34 bytes in 3 blocks are still reachable in loss record 4 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x40B861E: my_dup (switch_event.c:89) ==20156== by 0x40BA442: switch_event_bind_removable (switch_event.c:1041) ==20156== by 0x40BA610: switch_event_bind (switch_event.c:1070) ==20156== by 0x40A0F72: switch_core_sqldb_start (switch_core_sqldb.c:471) ==20156== by 0x40AD433: switch_core_init (switch_core.c:1006) ==20156== by 0x40AE57C: switch_core_init_and_modload (switch_core.c:1176) ==20156== by 0x8049C2F: main (switch.c:546) ==20156== ==20156== ==20156== 35 (8 direct, 27 indirect) bytes in 1 blocks are definitely lost in loss record 5 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x40BA2AB: switch_event_reserve_subclass_detailed (switch_event.c:388) ==20156== by 0x40BA57F: switch_event_bind_removable (switch_event.c:1027) ==20156== by 0x7CC8F2D: mod_sofia_load (mod_sofia.c:2221) ==20156== by 0x40B450D: switch_loadable_module_load_file (switch_loadable_module.c:731) ==20156== by 0x40B489B: switch_loadable_module_load_module (switch_loadable_module.c:825) ==20156== by 0x40B4CC8: switch_loadable_module_init (switch_loadable_module.c:1039) ==20156== by 0x40AE6A0: switch_core_init_and_modload (switch_core.c:1205) ==20156== by 0x8049C2F: main (switch.c:546) ==20156== ==20156== ==20156== 27 bytes in 2 blocks are indirectly lost in loss record 6 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x40B861E: my_dup (switch_event.c:89) ==20156== by 0x40BA2D3: switch_event_reserve_subclass_detailed (switch_event.c:391) ==20156== by 0x40BA57F: switch_event_bind_removable (switch_event.c:1027) ==20156== by 0x7CC8F2D: mod_sofia_load (mod_sofia.c:2221) ==20156== by 0x40B450D: switch_loadable_module_load_file (switch_loadable_module.c:731) ==20156== by 0x40B489B: switch_loadable_module_load_module (switch_loadable_module.c:825) ==20156== by 0x40B4CC8: switch_loadable_module_init (switch_loadable_module.c:1039) ==20156== by 0x40AE6A0: switch_core_init_and_modload (switch_core.c:1205) ==20156== by 0x8049C2F: main (switch.c:546) ==20156== ==20156== ==20156== 44 bytes in 1 blocks are still reachable in loss record 7 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x4091278: switch_buffer_create_dynamic (switch_buffer.c:74) ==20156== by 0xFD35024: ??? (mod_local_stream.c:113) ==20156== by 0x40FC5D5: dummy_worker (thread.c:138) ==20156== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==20156== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==20156== ==20156== ==20156== 56 bytes in 2 blocks are still reachable in loss record 8 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x800C4F4: ??? ==20156== by 0x800A386: ??? ==20156== by 0x800A675: ??? ==20156== by 0x800A857: ??? ==20156== by 0x8000155: ??? ==20156== by 0x800040A: ??? ==20156== by 0x42DE46F: (within /lib/libc-2.6.1.so) ==20156== by 0x42DED8F: getaddrinfo (in /lib/libc-2.6.1.so) ==20156== by 0x40F8F07: call_resolver (sockaddr.c:337) ==20156== by 0x408FB10: switch_sockaddr_info_get (switch_apr.c:616) ==20156== by 0x40DC164: switch_stun_lookup (switch_stun.c:465) ==20156== ==20156== ==20156== 64 bytes in 1 blocks are still reachable in loss record 9 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x10E0CCAB: js_SetupLocks (in /usr/local/freeswitch/lib/libjs.so.1.0.6) ==20156== by 0x10DD0C15: JS_Init (in /usr/local/freeswitch/lib/libjs.so.1.0.6) ==20156== by 0x10D4AA1B: mod_spidermonkey_load (mod_spidermonkey.c:1043) ==20156== by 0x40B450D: switch_loadable_module_load_file (switch_loadable_module.c:731) ==20156== by 0x40B489B: switch_loadable_module_load_module (switch_loadable_module.c:825) ==20156== by 0x40B4CC8: switch_loadable_module_init (switch_loadable_module.c:1039) ==20156== by 0x40AE6A0: switch_core_init_and_modload (switch_core.c:1205) ==20156== by 0x8049C2F: main (switch.c:546) ==20156== ==20156== ==20156== 68 bytes in 3 blocks are still reachable in loss record 10 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x40087E1: (within /lib/ld-2.6.1.so) ==20156== by 0x400BF75: (within /lib/ld-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x400C159: (within /lib/ld-2.6.1.so) ==20156== by 0x40117A3: (within /lib/ld-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x401114B: (within /lib/ld-2.6.1.so) ==20156== by 0x41B089C: (within /lib/libdl-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x41B010B: (within /lib/libdl-2.6.1.so) ==20156== by 0x41B091E: dlopen (in /lib/libdl-2.6.1.so) ==20156== ==20156== ==20156== 72 bytes in 3 blocks are still reachable in loss record 11 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x40BA3EB: switch_event_bind_removable (switch_event.c:1037) ==20156== by 0x40BA610: switch_event_bind (switch_event.c:1070) ==20156== by 0x40A0F72: switch_core_sqldb_start (switch_core_sqldb.c:471) ==20156== by 0x40AD433: switch_core_init (switch_core.c:1006) ==20156== by 0x40AE57C: switch_core_init_and_modload (switch_core.c:1176) ==20156== by 0x8049C2F: main (switch.c:546) ==20156== ==20156== ==20156== 75 bytes in 2 blocks are still reachable in loss record 12 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x40060C6: (within /lib/ld-2.6.1.so) ==20156== by 0x4008934: (within /lib/ld-2.6.1.so) ==20156== by 0x400BF75: (within /lib/ld-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x400C159: (within /lib/ld-2.6.1.so) ==20156== by 0x40117A3: (within /lib/ld-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x401114B: (within /lib/ld-2.6.1.so) ==20156== by 0x41B089C: (within /lib/libdl-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x41B010B: (within /lib/libdl-2.6.1.so) ==20156== ==20156== ==20156== 80 bytes in 1 blocks are still reachable in loss record 13 of 65 ==20156== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==20156== by 0x422547D: _nc_read_termtype (in /lib/libncurses.so.5.6) ==20156== by 0x4225779: _nc_read_file_entry (in /lib/libncurses.so.5.6) ==20156== by 0x4225935: _nc_read_entry (in /lib/libncurses.so.5.6) ==20156== by 0x42211DA: (within /lib/libncurses.so.5.6) ==20156== by 0x42217C9: _nc_setupterm (in /lib/libncurses.so.5.6) ==20156== by 0x4221FE7: tgetent (in /lib/libncurses.so.5.6) ==20156== by 0x416CC20: term_set (term.c:925) ==20156== by 0x416D021: term_init (term.c:350) ==20156== by 0x4165754: el_init (el.c:84) ==20156== by 0x4098B39: switch_console_loop (switch_console.c:703) ==20156== by 0x40AC15F: switch_core_runtime_loop (switch_core.c:608) ==20156== ==20156== ==20156== 80 bytes in 4 blocks are still reachable in loss record 14 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x4022C4C: realloc (vg_replace_malloc.c:429) ==20156== by 0x400A239: (within /lib/ld-2.6.1.so) ==20156== by 0x400AEB8: (within /lib/ld-2.6.1.so) ==20156== by 0x401187A: (within /lib/ld-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x401114B: (within /lib/ld-2.6.1.so) ==20156== by 0x41B089C: (within /lib/libdl-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x41B010B: (within /lib/libdl-2.6.1.so) ==20156== by 0x41B091E: dlopen (in /lib/libdl-2.6.1.so) ==20156== by 0x40F3A0C: apr_dso_load (dso.c:139) ==20156== ==20156== ==20156== 83 bytes in 1 blocks are still reachable in loss record 15 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x421F23F: _nc_doalloc (in /lib/libncurses.so.5.6) ==20156== by 0x4222A5A: _nc_tparm_analyze (in /lib/libncurses.so.5.6) ==20156== by 0x4222C3D: tparm (in /lib/libncurses.so.5.6) ==20156== by 0x4225E66: (within /lib/libncurses.so.5.6) ==20156== by 0x422615B: _nc_trim_sgr0 (in /lib/libncurses.so.5.6) ==20156== by 0x422213D: tgetent (in /lib/libncurses.so.5.6) ==20156== by 0x416CC20: term_set (term.c:925) ==20156== by 0x416D021: term_init (term.c:350) ==20156== by 0x4165754: el_init (el.c:84) ==20156== by 0x4098B39: switch_console_loop (switch_console.c:703) ==20156== by 0x40AC15F: switch_core_runtime_loop (switch_core.c:608) ==20156== ==20156== ==20156== 96 bytes in 1 blocks are still reachable in loss record 16 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x408FFC5: switch_dir_open (switch_apr.c:427) ==20156== by 0xFD351D3: ??? (mod_local_stream.c:132) ==20156== by 0x40FC5D5: dummy_worker (thread.c:138) ==20156== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==20156== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==20156== ==20156== ==20156== 104 bytes in 1 blocks are still reachable in loss record 17 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x40F6EFE: apr_allocator_create (apr_pools.c:91) ==20156== by 0x40F77DD: apr_pool_initialize (apr_pools.c:519) ==20156== by 0x40F85FE: apr_initialize (start.c:55) ==20156== by 0x80493BD: main (switch.c:478) ==20156== ==20156== ==20156== 128 bytes in 1 blocks are still reachable in loss record 18 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x10E0CD20: js_SetupLocks (in /usr/local/freeswitch/lib/libjs.so.1.0.6) ==20156== by 0x10DD0C15: JS_Init (in /usr/local/freeswitch/lib/libjs.so.1.0.6) ==20156== by 0x10D4AA1B: mod_spidermonkey_load (mod_spidermonkey.c:1043) ==20156== by 0x40B450D: switch_loadable_module_load_file (switch_loadable_module.c:731) ==20156== by 0x40B489B: switch_loadable_module_load_module (switch_loadable_module.c:825) ==20156== by 0x40B4CC8: switch_loadable_module_init (switch_loadable_module.c:1039) ==20156== by 0x40AE6A0: switch_core_init_and_modload (switch_core.c:1205) ==20156== by 0x8049C2F: main (switch.c:546) ==20156== ==20156== ==20156== 128 bytes in 4 blocks are still reachable in loss record 19 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x4011B2B: (within /lib/ld-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x401114B: (within /lib/ld-2.6.1.so) ==20156== by 0x41B089C: (within /lib/libdl-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x41B010B: (within /lib/libdl-2.6.1.so) ==20156== by 0x41B091E: dlopen (in /lib/libdl-2.6.1.so) ==20156== by 0x40F3A0C: apr_dso_load (dso.c:139) ==20156== by 0x4090D4A: switch_dso_load (switch_apr.c:85) ==20156== by 0x40B44DD: switch_loadable_module_load_file (switch_loadable_module.c:703) ==20156== by 0x40B489B: switch_loadable_module_load_module (switch_loadable_module.c:825) ==20156== ==20156== ==20156== 132 bytes in 14 blocks are still reachable in loss record 20 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x415A214: crypto_alloc (alloc.c:97) ==20156== by 0x4159A1C: crypto_kernel_load_debug_module (crypto_kernel.c:486) ==20156== by 0x415A035: crypto_kernel_init (crypto_kernel.c:114) ==20156== by 0x4153676: srtp_init (srtp.c:1081) ==20156== by 0x40C0A65: switch_rtp_init (switch_rtp.c:393) ==20156== by 0x40AD43E: switch_core_init (switch_core.c:1008) ==20156== by 0x40AE57C: switch_core_init_and_modload (switch_core.c:1176) ==20156== by 0x8049C2F: main (switch.c:546) ==20156== ==20156== ==20156== 156 bytes in 5 blocks are still reachable in loss record 21 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x400C1C5: (within /lib/ld-2.6.1.so) ==20156== by 0x40117A3: (within /lib/ld-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x401114B: (within /lib/ld-2.6.1.so) ==20156== by 0x41B089C: (within /lib/libdl-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x41B010B: (within /lib/libdl-2.6.1.so) ==20156== by 0x41B091E: dlopen (in /lib/libdl-2.6.1.so) ==20156== by 0x40F3A0C: apr_dso_load (dso.c:139) ==20156== by 0x4090D4A: switch_dso_load (switch_apr.c:85) ==20156== by 0x40B44DD: switch_loadable_module_load_file (switch_loadable_module.c:703) ==20156== ==20156== ==20156== 169 bytes in 19 blocks are still reachable in loss record 22 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x429ECAF: strdup (in /lib/libc-2.6.1.so) ==20156== by 0x402E8C1: ??? (mod_logfile.c:288) ==20156== by 0x402EB4D: mod_logfile_load (mod_logfile.c:368) ==20156== by 0x40B450D: switch_loadable_module_load_file (switch_loadable_module.c:731) ==20156== by 0x40B489B: switch_loadable_module_load_module (switch_loadable_module.c:825) ==20156== by 0x40B4CC8: switch_loadable_module_init (switch_loadable_module.c:1039) ==20156== by 0x40AE6A0: switch_core_init_and_modload (switch_core.c:1205) ==20156== by 0x8049C2F: main (switch.c:546) ==20156== ==20156== ==20156== 172 bytes in 1 blocks are still reachable in loss record 23 of 65 ==20156== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==20156== by 0x42217B5: _nc_setupterm (in /lib/libncurses.so.5.6) ==20156== by 0x4221FE7: tgetent (in /lib/libncurses.so.5.6) ==20156== by 0x416CC20: term_set (term.c:925) ==20156== by 0x416D021: term_init (term.c:350) ==20156== by 0x4165754: el_init (el.c:84) ==20156== by 0x4098B39: switch_console_loop (switch_console.c:703) ==20156== by 0x40AC15F: switch_core_runtime_loop (switch_core.c:608) ==20156== by 0x8049C53: main (switch.c:551) ==20156== ==20156== ==20156== 180 bytes in 1 blocks are still reachable in loss record 24 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x4225689: _nc_read_termtype (in /lib/libncurses.so.5.6) ==20156== by 0x4225779: _nc_read_file_entry (in /lib/libncurses.so.5.6) ==20156== by 0x4225935: _nc_read_entry (in /lib/libncurses.so.5.6) ==20156== by 0x42211DA: (within /lib/libncurses.so.5.6) ==20156== by 0x42217C9: _nc_setupterm (in /lib/libncurses.so.5.6) ==20156== by 0x4221FE7: tgetent (in /lib/libncurses.so.5.6) ==20156== by 0x416CC20: term_set (term.c:925) ==20156== by 0x416D021: term_init (term.c:350) ==20156== by 0x4165754: el_init (el.c:84) ==20156== by 0x4098B39: switch_console_loop (switch_console.c:703) ==20156== by 0x40AC15F: switch_core_runtime_loop (switch_core.c:608) ==20156== ==20156== ==20156== 252 bytes in 4 blocks are possibly lost in loss record 25 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x4104D2C: sqlite3GenericMalloc (os_common.h:174) ==20156== by 0x4104302: sqlite3_malloc (main.c:402) ==20156== by 0x4104349: sqlite3_realloc (main.c:412) ==20156== by 0x4108CB9: base_vprintf (printf.c:764) ==20156== by 0x4108DAC: sqlite3_vmprintf (printf.c:814) ==20156== by 0x40AF856: switch_mprintf (switch_core_db.c:178) ==20156== by 0x40A2BA8: switch_core_session_execute_application (switch_core_session.c:1051) ==20156== by 0x40A6991: switch_core_session_run (switch_core_state_machine.c:143) ==20156== by 0x40A5294: switch_core_session_thread (switch_core_session.c:787) ==20156== by 0x40FC5D5: dummy_worker (thread.c:138) ==20156== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==20156== ==20156== ==20156== 288 bytes in 2 blocks are possibly lost in loss record 26 of 65 ==20156== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==20156== by 0x4010817: (within /lib/ld-2.6.1.so) ==20156== by 0x40108DB: _dl_allocate_tls (in /lib/ld-2.6.1.so) ==20156== by 0x41EB999: pthread_create@@GLIBC_2.1 (in /lib/libpthread-2.6.1.so) ==20156== by 0x41EBF67: pthread_create@GLIBC_2.0 (in /lib/libpthread-2.6.1.so) ==20156== by 0x40FC974: apr_thread_create (thread.c:176) ==20156== by 0x408FE78: switch_thread_create (switch_apr.c:530) ==20156== by 0x40B9A0C: launch_dispatch_threads (switch_event.c:472) ==20156== by 0x40B9CA0: switch_event_init (switch_event.c:510) ==20156== by 0x40AD347: switch_core_init (switch_core.c:987) ==20156== by 0x40AE57C: switch_core_init_and_modload (switch_core.c:1176) ==20156== by 0x8049C2F: main (switch.c:546) ==20156== ==20156== ==20156== 352 bytes in 1 blocks are still reachable in loss record 27 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x428954E: (within /lib/libc-2.6.1.so) ==20156== by 0x428961B: fopen (in /lib/libc-2.6.1.so) ==20156== by 0x7D9D203: init (su_uniqueid.c:147) ==20156== by 0x7D9D539: su_guid_generate (su_uniqueid.c:255) ==20156== by 0x7D757F8: sip_call_id_create (sip_basic.c:1137) ==20156== by 0x7D26EE2: nta_leg_tcreate (nta.c:3700) ==20156== by 0x7D42F21: nua_client_init_request (nua_stack.c:2312) ==20156== by 0x7D423B5: nua_client_create (nua_stack.c:2043) ==20156== by 0x7D4FAAC: nua_stack_notify (nua_notifier.c:470) ==20156== by 0x7D3EA92: nua_stack_signal (nua_stack.c:627) ==20156== by 0x7DA2DE9: su_base_port_execute_msgs (su_base_port.c:276) ==20156== ==20156== ==20156== 392 bytes in 1 blocks are still reachable in loss record 28 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x4011509: (within /lib/ld-2.6.1.so) ==20156== by 0x4011997: (within /lib/ld-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x401114B: (within /lib/ld-2.6.1.so) ==20156== by 0x41B089C: (within /lib/libdl-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x41B010B: (within /lib/libdl-2.6.1.so) ==20156== by 0x41B091E: dlopen (in /lib/libdl-2.6.1.so) ==20156== by 0x40F3A0C: apr_dso_load (dso.c:139) ==20156== by 0x4090D4A: switch_dso_load (switch_apr.c:85) ==20156== by 0x10D4A749: ??? (mod_spidermonkey.c:897) ==20156== ==20156== ==20156== 473 bytes in 3 blocks are definitely lost in loss record 29 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x415A214: crypto_alloc (alloc.c:97) ==20156== by 0x415AA5D: null_cipher_alloc (null_cipher.c:68) ==20156== by 0x4155D1E: cipher_type_self_test (cipher.c:264) ==20156== by 0x4159B25: crypto_kernel_load_cipher_type (crypto_kernel.c:310) ==20156== by 0x415A0EC: crypto_kernel_init (crypto_kernel.c:151) ==20156== by 0x4153676: srtp_init (srtp.c:1081) ==20156== by 0x40C0A65: switch_rtp_init (switch_rtp.c:393) ==20156== by 0x40AD43E: switch_core_init (switch_core.c:1008) ==20156== by 0x40AE57C: switch_core_init_and_modload (switch_core.c:1176) ==20156== by 0x8049C2F: main (switch.c:546) ==20156== ==20156== ==20156== 619 bytes in 16 blocks are still reachable in loss record 30 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x10D989C0: PR_Malloc (prmem.c:448) ==20156== by 0x10DA0F26: PR_NewCondVar (ptsynch.c:341) ==20156== by 0x10DA93ED: _PR_InitThreads (ptthread.c:876) ==20156== by 0x10D9B520: _PR_InitStuff (prinit.c:215) ==20156== by 0x10D9B54F: _PR_ImplicitInitialization (prinit.c:245) ==20156== by 0x10DA077E: PR_NewLock (ptsynch.c:172) ==20156== by 0x10E3D7CB: js_InitStringGlobals (in /usr/local/freeswitch/lib/libjs.so.1.0.6) ==20156== by 0x10DD0B3E: JS_Init (in /usr/local/freeswitch/lib/libjs.so.1.0.6) ==20156== by 0x10D4AA1B: mod_spidermonkey_load (mod_spidermonkey.c:1043) ==20156== by 0x40B450D: switch_loadable_module_load_file (switch_loadable_module.c:731) ==20156== by 0x40B489B: switch_loadable_module_load_module (switch_loadable_module.c:825) ==20156== ==20156== ==20156== 634 bytes in 8 blocks are possibly lost in loss record 31 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x7D987E2: sub_alloc (su_alloc.c:490) ==20156== by 0x7D990DE: su_alloc (su_alloc.c:771) ==20156== by 0x7D9C8E2: su_strdup (su_strdup.c:55) ==20156== by 0x7D05963: msg_header_add_str (msg_parser.c:2759) ==20156== by 0x7D7B374: sip_add_tagis (sip_tag_class.c:260) ==20156== by 0x7D42CFC: nua_client_init_request (nua_stack.c:2278) ==20156== by 0x7D423B5: nua_client_create (nua_stack.c:2043) ==20156== by 0x7D54F65: nua_stack_invite (nua_session.c:701) ==20156== by 0x7D3E8DA: nua_stack_signal (nua_stack.c:592) ==20156== by 0x7DA2DE9: su_base_port_execute_msgs (su_base_port.c:276) ==20156== by 0x7DA2B90: su_base_port_getmsgs (su_base_port.c:198) ==20156== ==20156== ==20156== 811 bytes in 17 blocks are still reachable in loss record 32 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x4104D2C: sqlite3GenericMalloc (os_common.h:174) ==20156== by 0x4104302: sqlite3_malloc (main.c:402) ==20156== by 0x4104349: sqlite3_realloc (main.c:412) ==20156== by 0x4108CB9: base_vprintf (printf.c:764) ==20156== by 0x4108DAC: sqlite3_vmprintf (printf.c:814) ==20156== by 0x40AF856: switch_mprintf (switch_core_db.c:178) ==20156== by 0x40A2BA8: switch_core_session_execute_application (switch_core_session.c:1051) ==20156== by 0x40A6991: switch_core_session_run (switch_core_state_machine.c:143) ==20156== by 0x40A5294: switch_core_session_thread (switch_core_session.c:787) ==20156== by 0x40FC5D5: dummy_worker (thread.c:138) ==20156== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==20156== ==20156== ==20156== 837 bytes in 36 blocks are still reachable in loss record 33 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x410E1A4: sqlite3MallocX (sqliteInt.h:278) ==20156== by 0x4102FA2: sqlite3HashInsert (hash.c:363) ==20156== by 0x40A08FE: switch_core_hash_insert (switch_core_hash.c:67) ==20156== by 0x402E869: ??? (mod_logfile.c:295) ==20156== by 0x402EB4D: mod_logfile_load (mod_logfile.c:368) ==20156== by 0x40B450D: switch_loadable_module_load_file (switch_loadable_module.c:731) ==20156== by 0x40B489B: switch_loadable_module_load_module (switch_loadable_module.c:825) ==20156== by 0x40B4CC8: switch_loadable_module_init (switch_loadable_module.c:1039) ==20156== by 0x40AE6A0: switch_core_init_and_modload (switch_core.c:1205) ==20156== by 0x8049C2F: main (switch.c:546) ==20156== ==20156== ==20156== 856 bytes in 12 blocks are still reachable in loss record 34 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x7EA362B: (within /usr/lib/libcrypto.so.0.9.8) ==20156== ==20156== ==20156== 1,024 bytes in 1 blocks are still reachable in loss record 35 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0xF8660FA: ??? (mod_voicemail.c:403) ==20156== by 0xF867761: mod_voicemail_load (mod_voicemail.c:3215) ==20156== by 0x40B450D: switch_loadable_module_load_file (switch_loadable_module.c:731) ==20156== by 0x40B489B: switch_loadable_module_load_module (switch_loadable_module.c:825) ==20156== by 0x40B4CC8: switch_loadable_module_init (switch_loadable_module.c:1039) ==20156== by 0x40AE6A0: switch_core_init_and_modload (switch_core.c:1205) ==20156== by 0x8049C2F: main (switch.c:546) ==20156== ==20156== ==20156== 1,024 bytes in 1 blocks are still reachable in loss record 36 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x40AC7B3: switch_core_set_globals (switch_core.c:375) ==20156== by 0x8049A98: main (switch.c:520) ==20156== ==20156== ==20156== 1,344 bytes in 1 blocks are still reachable in loss record 37 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x7D11304: msg_mclass_clone (msg_mclass.c:111) ==20156== by 0x7D7BC6C: sip_extend_mclass (sip_parser.c:131) ==20156== by 0x7CD4BC6: config_sofia (sofia.c:1292) ==20156== by 0x7CC8E7A: mod_sofia_load (mod_sofia.c:2213) ==20156== by 0x40B450D: switch_loadable_module_load_file (switch_loadable_module.c:731) ==20156== by 0x40B489B: switch_loadable_module_load_module (switch_loadable_module.c:825) ==20156== by 0x40B4CC8: switch_loadable_module_init (switch_loadable_module.c:1039) ==20156== by 0x40AE6A0: switch_core_init_and_modload (switch_core.c:1205) ==20156== by 0x8049C2F: main (switch.c:546) ==20156== ==20156== ==20156== 1,359 bytes in 32 blocks are still reachable in loss record 38 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x4007794: (within /lib/ld-2.6.1.so) ==20156== by 0x4008189: (within /lib/ld-2.6.1.so) ==20156== by 0x4011743: (within /lib/ld-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x401114B: (within /lib/ld-2.6.1.so) ==20156== by 0x41B089C: (within /lib/libdl-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x41B010B: (within /lib/libdl-2.6.1.so) ==20156== by 0x41B091E: dlopen (in /lib/libdl-2.6.1.so) ==20156== by 0x40F3A0C: apr_dso_load (dso.c:139) ==20156== by 0x4090D4A: switch_dso_load (switch_apr.c:85) ==20156== ==20156== ==20156== 1,409 bytes in 1 blocks are still reachable in loss record 39 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x4224E26: _nc_read_termtype (in /lib/libncurses.so.5.6) ==20156== by 0x4225779: _nc_read_file_entry (in /lib/libncurses.so.5.6) ==20156== by 0x4225935: _nc_read_entry (in /lib/libncurses.so.5.6) ==20156== by 0x42211DA: (within /lib/libncurses.so.5.6) ==20156== by 0x42217C9: _nc_setupterm (in /lib/libncurses.so.5.6) ==20156== by 0x4221FE7: tgetent (in /lib/libncurses.so.5.6) ==20156== by 0x416CC20: term_set (term.c:925) ==20156== by 0x416D021: term_init (term.c:350) ==20156== by 0x4165754: el_init (el.c:84) ==20156== by 0x4098B39: switch_console_loop (switch_console.c:703) ==20156== by 0x40AC15F: switch_core_runtime_loop (switch_core.c:608) ==20156== ==20156== ==20156== 1,420 bytes in 5 blocks are possibly lost in loss record 40 of 65 ==20156== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==20156== by 0x7D98983: su_hash_alloc (su_alloc.c:390) ==20156== by 0x7D98B1E: su_home_new (su_alloc.c:562) ==20156== by 0x7D06200: msg_create (msg.c:61) ==20156== by 0x7D24754: nta_msg_create (nta.c:2829) ==20156== by 0x7D431B2: nua_client_request_template (nua_stack.c:2361) ==20156== by 0x7D42AD6: nua_client_init_request (nua_stack.c:2223) ==20156== by 0x7D423B5: nua_client_create (nua_stack.c:2043) ==20156== by 0x7D54F65: nua_stack_invite (nua_session.c:701) ==20156== by 0x7D3E8DA: nua_stack_signal (nua_stack.c:592) ==20156== by 0x7DA2DE9: su_base_port_execute_msgs (su_base_port.c:276) ==20156== by 0x7DA2B90: su_base_port_getmsgs (su_base_port.c:198) ==20156== ==20156== ==20156== 1,502 bytes in 37 blocks are still reachable in loss record 41 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x400A54D: (within /lib/ld-2.6.1.so) ==20156== by 0x40063E9: (within /lib/ld-2.6.1.so) ==20156== by 0x400824D: (within /lib/ld-2.6.1.so) ==20156== by 0x4011743: (within /lib/ld-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x401114B: (within /lib/ld-2.6.1.so) ==20156== by 0x41B089C: (within /lib/libdl-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x41B010B: (within /lib/libdl-2.6.1.so) ==20156== by 0x41B091E: dlopen (in /lib/libdl-2.6.1.so) ==20156== by 0x40F3A0C: apr_dso_load (dso.c:139) ==20156== ==20156== ==20156== 1,869 bytes in 4 blocks are still reachable in loss record 42 of 65 ==20156== at 0x4022BDE: realloc (vg_replace_malloc.c:429) ==20156== by 0x421F21F: _nc_doalloc (in /lib/libncurses.so.5.6) ==20156== by 0x4225359: _nc_read_termtype (in /lib/libncurses.so.5.6) ==20156== by 0x4225779: _nc_read_file_entry (in /lib/libncurses.so.5.6) ==20156== by 0x4225935: _nc_read_entry (in /lib/libncurses.so.5.6) ==20156== by 0x42211DA: (within /lib/libncurses.so.5.6) ==20156== by 0x42217C9: _nc_setupterm (in /lib/libncurses.so.5.6) ==20156== by 0x4221FE7: tgetent (in /lib/libncurses.so.5.6) ==20156== by 0x416CC20: term_set (term.c:925) ==20156== by 0x416D021: term_init (term.c:350) ==20156== by 0x4165754: el_init (el.c:84) ==20156== by 0x4098B39: switch_console_loop (switch_console.c:703) ==20156== ==20156== ==20156== 1,988 bytes in 7 blocks are still reachable in loss record 43 of 65 ==20156== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==20156== by 0x7D98983: su_hash_alloc (su_alloc.c:390) ==20156== by 0x7D98B1E: su_home_new (su_alloc.c:562) ==20156== by 0x7D06200: msg_create (msg.c:61) ==20156== by 0x7D24754: nta_msg_create (nta.c:2829) ==20156== by 0x7D431B2: nua_client_request_template (nua_stack.c:2361) ==20156== by 0x7D42AD6: nua_client_init_request (nua_stack.c:2223) ==20156== by 0x7D423B5: nua_client_create (nua_stack.c:2043) ==20156== by 0x7D54F65: nua_stack_invite (nua_session.c:701) ==20156== by 0x7D3E8DA: nua_stack_signal (nua_stack.c:592) ==20156== by 0x7DA2DE9: su_base_port_execute_msgs (su_base_port.c:276) ==20156== by 0x7DA2B90: su_base_port_getmsgs (su_base_port.c:198) ==20156== ==20156== ==20156== 3,024 bytes in 6 blocks are possibly lost in loss record 44 of 65 ==20156== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==20156== by 0x7D98B01: su_home_new (su_alloc.c:559) ==20156== by 0x7D06200: msg_create (msg.c:61) ==20156== by 0x7D24754: nta_msg_create (nta.c:2829) ==20156== by 0x7D431B2: nua_client_request_template (nua_stack.c:2361) ==20156== by 0x7D42AD6: nua_client_init_request (nua_stack.c:2223) ==20156== by 0x7D423B5: nua_client_create (nua_stack.c:2043) ==20156== by 0x7D54F65: nua_stack_invite (nua_session.c:701) ==20156== by 0x7D3E8DA: nua_stack_signal (nua_stack.c:592) ==20156== by 0x7DA2DE9: su_base_port_execute_msgs (su_base_port.c:276) ==20156== by 0x7DA2B90: su_base_port_getmsgs (su_base_port.c:198) ==20156== by 0x7DA2EC4: su_base_port_run (su_base_port.c:331) ==20156== ==20156== ==20156== 3,200 bytes in 2 blocks are still reachable in loss record 45 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x10DE13FC: JS_DHashAllocTable (in /usr/local/freeswitch/lib/libjs.so.1.0.6) ==20156== by 0x10DE1222: JS_DHashTableInit (in /usr/local/freeswitch/lib/libjs.so.1.0.6) ==20156== by 0x10DFC1E0: js_InitGC (in /usr/local/freeswitch/lib/libjs.so.1.0.6) ==20156== by 0x10DD0BC4: JS_Init (in /usr/local/freeswitch/lib/libjs.so.1.0.6) ==20156== by 0x10D4AA1B: mod_spidermonkey_load (mod_spidermonkey.c:1043) ==20156== by 0x40B450D: switch_loadable_module_load_file (switch_loadable_module.c:731) ==20156== by 0x40B489B: switch_loadable_module_load_module (switch_loadable_module.c:825) ==20156== by 0x40B4CC8: switch_loadable_module_init (switch_loadable_module.c:1039) ==20156== by 0x40AE6A0: switch_core_init_and_modload (switch_core.c:1205) ==20156== by 0x8049C2F: main (switch.c:546) ==20156== ==20156== ==20156== 3,216 bytes in 6 blocks are possibly lost in loss record 46 of 65 ==20156== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==20156== by 0x7D9A9F4: su_zalloc (su_alloc.c:1437) ==20156== by 0x7DA08C4: su_msg_new (su_root.c:901) ==20156== by 0x7D3E313: nua_signal (nua_stack.c:495) ==20156== by 0x7D46E3F: nua_invite (nua.c:633) ==20156== by 0x7CEB0AE: sofia_glue_do_invite (sofia_glue.c:1288) ==20156== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==20156== by 0x40A62AD: switch_core_session_run (switch_core_state_machine.c:415) ==20156== by 0x40A5294: switch_core_session_thread (switch_core_session.c:787) ==20156== by 0x40FC5D5: dummy_worker (thread.c:138) ==20156== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==20156== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==20156== ==20156== ==20156== 3,304 bytes in 32 blocks are still reachable in loss record 47 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x400C2A6: (within /lib/ld-2.6.1.so) ==20156== by 0x40117A3: (within /lib/ld-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x401114B: (within /lib/ld-2.6.1.so) ==20156== by 0x41B089C: (within /lib/libdl-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x41B010B: (within /lib/libdl-2.6.1.so) ==20156== by 0x41B091E: dlopen (in /lib/libdl-2.6.1.so) ==20156== by 0x40F3A0C: apr_dso_load (dso.c:139) ==20156== by 0x4090D4A: switch_dso_load (switch_apr.c:85) ==20156== by 0x40B44DD: switch_loadable_module_load_file (switch_loadable_module.c:703) ==20156== ==20156== ==20156== 3,424 bytes in 37 blocks are still reachable in loss record 48 of 65 ==20156== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==20156== by 0x400F088: (within /lib/ld-2.6.1.so) ==20156== by 0x4011A26: (within /lib/ld-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x401114B: (within /lib/ld-2.6.1.so) ==20156== by 0x41B089C: (within /lib/libdl-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x41B010B: (within /lib/libdl-2.6.1.so) ==20156== by 0x41B091E: dlopen (in /lib/libdl-2.6.1.so) ==20156== by 0x40F3A0C: apr_dso_load (dso.c:139) ==20156== by 0x4090D4A: switch_dso_load (switch_apr.c:85) ==20156== by 0x40B44DD: switch_loadable_module_load_file (switch_loadable_module.c:703) ==20156== ==20156== ==20156== 3,844 bytes in 49 blocks are still reachable in loss record 49 of 65 ==20156== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==20156== by 0x10D98A22: PR_Calloc (prmem.c:455) ==20156== by 0x10D94922: PR_NewLogModule (prlog.c:361) ==20156== by 0x10D9B3A7: _PR_InitStuff (prinit.c:185) ==20156== by 0x10D9B54F: _PR_ImplicitInitialization (prinit.c:245) ==20156== by 0x10DA077E: PR_NewLock (ptsynch.c:172) ==20156== by 0x10E3D7CB: js_InitStringGlobals (in /usr/local/freeswitch/lib/libjs.so.1.0.6) ==20156== by 0x10DD0B3E: JS_Init (in /usr/local/freeswitch/lib/libjs.so.1.0.6) ==20156== by 0x10D4AA1B: mod_spidermonkey_load (mod_spidermonkey.c:1043) ==20156== by 0x40B450D: switch_loadable_module_load_file (switch_loadable_module.c:731) ==20156== by 0x40B489B: switch_loadable_module_load_module (switch_loadable_module.c:825) ==20156== by 0x40B4CC8: switch_loadable_module_init (switch_loadable_module.c:1039) ==20156== ==20156== ==20156== 4,124 bytes in 1 blocks are still reachable in loss record 50 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x42BBEE6: (within /lib/libc-2.6.1.so) ==20156== by 0x42BBFD2: opendir (in /lib/libc-2.6.1.so) ==20156== by 0x40F4EC7: apr_dir_open (dir.c:82) ==20156== by 0x408FFF9: switch_dir_open (switch_apr.c:435) ==20156== by 0xFD351D3: ??? (mod_local_stream.c:132) ==20156== by 0x40FC5D5: dummy_worker (thread.c:138) ==20156== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==20156== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==20156== ==20156== ==20156== 4,246 bytes in 2 blocks are still reachable in loss record 51 of 65 ==20156== at 0x4022BDE: realloc (vg_replace_malloc.c:429) ==20156== by 0x409B0E3: switch_console_stream_write (switch_console.c:129) ==20156== by 0xF865B9D: ??? (mod_voicemail.c:333) ==20156== by 0xF867761: mod_voicemail_load (mod_voicemail.c:3215) ==20156== by 0x40B450D: switch_loadable_module_load_file (switch_loadable_module.c:731) ==20156== by 0x40B489B: switch_loadable_module_load_module (switch_loadable_module.c:825) ==20156== by 0x40B4CC8: switch_loadable_module_init (switch_loadable_module.c:1039) ==20156== by 0x40AE6A0: switch_core_init_and_modload (switch_core.c:1205) ==20156== by 0x8049C2F: main (switch.c:546) ==20156== ==20156== ==20156== 5,130 bytes in 102 blocks are definitely lost in loss record 52 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x429ECAF: strdup (in /lib/libc-2.6.1.so) ==20156== by 0x40ACE31: switch_core_set_variable (switch_core.c:224) ==20156== by 0x40AD2EC: switch_core_init (switch_core.c:981) ==20156== by 0x40AE57C: switch_core_init_and_modload (switch_core.c:1176) ==20156== by 0x8049C2F: main (switch.c:546) ==20156== ==20156== ==20156== 8,192 bytes in 1 blocks are still reachable in loss record 53 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x4170505: libedit_fgetln (fgetln.c:60) ==20156== by 0x4171216: history (history.c:685) ==20156== by 0x409939B: switch_console_loop (switch_console.c:760) ==20156== by 0x40AC15F: switch_core_runtime_loop (switch_core.c:608) ==20156== by 0x8049C53: main (switch.c:551) ==20156== ==20156== ==20156== 8,277 bytes in 130 blocks are still reachable in loss record 54 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x7D987E2: sub_alloc (su_alloc.c:490) ==20156== by 0x7D990DE: su_alloc (su_alloc.c:771) ==20156== by 0x7D073B4: msg_avlist_d (msg_parser_util.c:437) ==20156== by 0x7D074D3: msg_params_d (msg_parser_util.c:487) ==20156== by 0x7D74BCA: sip_name_addr_d (sip_basic.c:732) ==20156== by 0x7D7A90B: sip_remote_party_id_d (sip_extra.c:1156) ==20156== by 0x7D0269B: header_parse (msg_parser.c:1132) ==20156== by 0x7D02453: extract_header (msg_parser.c:1071) ==20156== by 0x7D02185: msg_extract_header (msg_parser.c:1008) ==20156== by 0x7D05A42: msg_header_parse_str (msg_parser.c:2801) ==20156== by 0x7D0598E: msg_header_add_str (msg_parser.c:2764) ==20156== ==20156== ==20156== 9,388 bytes in 1 blocks are still reachable in loss record 55 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x10DD0B5F: JS_Init (in /usr/local/freeswitch/lib/libjs.so.1.0.6) ==20156== by 0x10D4AA1B: mod_spidermonkey_load (mod_spidermonkey.c:1043) ==20156== by 0x40B450D: switch_loadable_module_load_file (switch_loadable_module.c:731) ==20156== by 0x40B489B: switch_loadable_module_load_module (switch_loadable_module.c:825) ==20156== by 0x40B4CC8: switch_loadable_module_init (switch_loadable_module.c:1039) ==20156== by 0x40AE6A0: switch_core_init_and_modload (switch_core.c:1205) ==20156== by 0x8049C2F: main (switch.c:546) ==20156== ==20156== ==20156== 17,418 bytes in 1 blocks are still reachable in loss record 56 of 65 ==20156== at 0x4022BDE: realloc (vg_replace_malloc.c:429) ==20156== by 0x4090FC0: switch_buffer_write (switch_buffer.c:241) ==20156== by 0xFD35607: ??? (mod_local_stream.c:205) ==20156== by 0x40FC5D5: dummy_worker (thread.c:138) ==20156== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==20156== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==20156== ==20156== ==20156== 21,868 bytes in 77 blocks are indirectly lost in loss record 57 of 65 ==20156== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==20156== by 0x7D98983: su_hash_alloc (su_alloc.c:390) ==20156== by 0x7D98B1E: su_home_new (su_alloc.c:562) ==20156== by 0x7D06200: msg_create (msg.c:61) ==20156== by 0x7D24754: nta_msg_create (nta.c:2829) ==20156== by 0x7D431B2: nua_client_request_template (nua_stack.c:2361) ==20156== by 0x7D42AD6: nua_client_init_request (nua_stack.c:2223) ==20156== by 0x7D423B5: nua_client_create (nua_stack.c:2043) ==20156== by 0x7D54F65: nua_stack_invite (nua_session.c:701) ==20156== by 0x7D3E8DA: nua_stack_signal (nua_stack.c:592) ==20156== by 0x7DA2DE9: su_base_port_execute_msgs (su_base_port.c:276) ==20156== by 0x7DA2B90: su_base_port_getmsgs (su_base_port.c:198) ==20156== ==20156== ==20156== 23,627 bytes in 37 blocks are still reachable in loss record 58 of 65 ==20156== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==20156== by 0x400A2DA: (within /lib/ld-2.6.1.so) ==20156== by 0x40063E9: (within /lib/ld-2.6.1.so) ==20156== by 0x400824D: (within /lib/ld-2.6.1.so) ==20156== by 0x4011743: (within /lib/ld-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x401114B: (within /lib/ld-2.6.1.so) ==20156== by 0x41B089C: (within /lib/libdl-2.6.1.so) ==20156== by 0x400D785: (within /lib/ld-2.6.1.so) ==20156== by 0x41B010B: (within /lib/libdl-2.6.1.so) ==20156== by 0x41B091E: dlopen (in /lib/libdl-2.6.1.so) ==20156== by 0x40F3A0C: apr_dso_load (dso.c:139) ==20156== ==20156== ==20156== 43,599 bytes in 663 blocks are indirectly lost in loss record 59 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x7D987E2: sub_alloc (su_alloc.c:490) ==20156== by 0x7D990DE: su_alloc (su_alloc.c:771) ==20156== by 0x7D04C85: msg_header_alloc (msg_parser.c:2309) ==20156== by 0x7D0FE97: msg_header_dup_as (msg_header_copy.c:277) ==20156== by 0x7D05607: _msg_header_add_dup_as (msg_parser.c:2654) ==20156== by 0x7D0556E: msg_header_add_dup_as (msg_parser.c:2634) ==20156== by 0x7D7B2F1: sip_add_tagis (sip_tag_class.c:250) ==20156== by 0x7D43220: nua_client_request_template (nua_stack.c:2377) ==20156== by 0x7D42AD6: nua_client_init_request (nua_stack.c:2223) ==20156== by 0x7D423B5: nua_client_create (nua_stack.c:2043) ==20156== by 0x7D54F65: nua_stack_invite (nua_session.c:701) ==20156== ==20156== ==20156== 66,933 bytes in 1,670 blocks are definitely lost in loss record 60 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x4104D2C: sqlite3GenericMalloc (os_common.h:174) ==20156== by 0x4104302: sqlite3_malloc (main.c:402) ==20156== by 0x4104349: sqlite3_realloc (main.c:412) ==20156== by 0x4108CB9: base_vprintf (printf.c:764) ==20156== by 0x4108DAC: sqlite3_vmprintf (printf.c:814) ==20156== by 0x40AF856: switch_mprintf (switch_core_db.c:178) ==20156== by 0x40A2BA8: switch_core_session_execute_application (switch_core_session.c:1051) ==20156== by 0x40A6991: switch_core_session_run (switch_core_state_machine.c:143) ==20156== by 0x40A5294: switch_core_session_thread (switch_core_session.c:787) ==20156== by 0x40FC5D5: dummy_worker (thread.c:138) ==20156== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==20156== ==20156== ==20156== 107,299 (41,832 direct, 65,467 indirect) bytes in 83 blocks are definitely lost in loss record 61 of 65 ==20156== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==20156== by 0x7D98B01: su_home_new (su_alloc.c:559) ==20156== by 0x7D06200: msg_create (msg.c:61) ==20156== by 0x7D24754: nta_msg_create (nta.c:2829) ==20156== by 0x7D431B2: nua_client_request_template (nua_stack.c:2361) ==20156== by 0x7D42AD6: nua_client_init_request (nua_stack.c:2223) ==20156== by 0x7D423B5: nua_client_create (nua_stack.c:2043) ==20156== by 0x7D54F65: nua_stack_invite (nua_session.c:701) ==20156== by 0x7D3E8DA: nua_stack_signal (nua_stack.c:592) ==20156== by 0x7DA2DE9: su_base_port_execute_msgs (su_base_port.c:276) ==20156== by 0x7DA2B90: su_base_port_getmsgs (su_base_port.c:198) ==20156== by 0x7DA2EC4: su_base_port_run (su_base_port.c:331) ==20156== ==20156== ==20156== 44,488 bytes in 83 blocks are definitely lost in loss record 62 of 65 ==20156== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==20156== by 0x7D9A9F4: su_zalloc (su_alloc.c:1437) ==20156== by 0x7DA08C4: su_msg_new (su_root.c:901) ==20156== by 0x7D3E313: nua_signal (nua_stack.c:495) ==20156== by 0x7D46E3F: nua_invite (nua.c:633) ==20156== by 0x7CEB0AE: sofia_glue_do_invite (sofia_glue.c:1288) ==20156== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==20156== by 0x40A62AD: switch_core_session_run (switch_core_state_machine.c:415) ==20156== by 0x40A5294: switch_core_session_thread (switch_core_session.c:787) ==20156== by 0x40FC5D5: dummy_worker (thread.c:138) ==20156== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==20156== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==20156== ==20156== ==20156== 55,728 bytes in 1 blocks are still reachable in loss record 63 of 65 ==20156== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==20156== by 0xFCE0A57: sf_open (sndfile.c:285) ==20156== by 0xFCD9FD3: ??? (mod_sndfile.c:174) ==20156== by 0x40A04A1: switch_core_perform_file_open (switch_core_file.c:100) ==20156== by 0xFD3549A: ??? (mod_local_stream.c:178) ==20156== by 0x40FC5D5: dummy_worker (thread.c:138) ==20156== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==20156== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==20156== ==20156== ==20156== 696,320 bytes in 85 blocks are still reachable in loss record 64 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x40F74CF: apr_pool_create_ex (apr_pools.c:300) ==20156== by 0x40F781E: apr_pool_initialize (apr_pools.c:524) ==20156== by 0x40F85FE: apr_initialize (start.c:55) ==20156== by 0x80493BD: main (switch.c:478) ==20156== ==20156== ==20156== 15,605,760 bytes in 38 blocks are still reachable in loss record 65 of 65 ==20156== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==20156== by 0x40F7A53: apr_palloc (apr_pools.c:300) ==20156== by 0x40EDFBA: apr_queue_create (apr_queue.c:129) ==20156== by 0x408F6FA: switch_queue_create (switch_apr.c:747) ==20156== by 0x409DC9C: switch_core_memory_init (switch_core_memory.c:468) ==20156== by 0x40ACF4C: switch_core_init (switch_core.c:950) ==20156== by 0x40AE57C: switch_core_init_and_modload (switch_core.c:1176) ==20156== by 0x8049C2F: main (switch.c:546) ==20156== ==20156== LEAK SUMMARY: ==20156== definitely lost: 158,864 bytes in 1,942 blocks. ==20156== indirectly lost: 65,494 bytes in 742 blocks. ==20156== possibly lost: 8,834 bytes in 31 blocks. ==20156== still reachable: 16,464,203 bytes in 657 blocks. ==20156== suppressed: 0 bytes in 0 blocks. Is this problem's cause configuration mistake or freeswitch's bug? Sangwoo Jin
On Jul 30, 2008, at 8:33 AM, Sangwoo Jin wrote:
Hi,
I I'm testing freeswitch with sipp. My test configuration is the following: Sipp(caller) -> freeswitch -> Sipp(callee)s Testing loads are 5 CPS ~ 30 CPS and caller has hanged up a call as soon as receiving 200 OK.
In this testing environment, freeswitch's used memory is growing continuously.
The following is the valgrind's log on testing with 5 CPS 100 calls.
<snip>
Is this problem's cause configuration mistake or freeswitch's bug?
Sangwoo Jin
You will need to compare the valgrind output from about 100 calls to about 1000 calls to see which are actually larger. Also, please make sure you are using current svn trunk. Most of the items in that list appear to be things that we allocate at startup and never bother to free as they are free when the application stops. Those items are supposed to be allocated for the entire life of the switch. If you have reports that are definitely more please report this to our bug tracker at http://jira.freeswitch.org with exact details how you are testing including how you are initiating the call and your dialplan. Mike
I can't use JIRA because I'm waiting for confirmation of creating account. Now, I tested again with the current svn trunk. The lost memory of 1000 calls is 10 times more than 100 calls. The following logs are my filtered valgrind's output. I have removed the lost blocks log which may not have to be free. Could you check this problem? Sangwoo Jin ============================================================================ 100 calls' log ============================================================================ ==29384== 284 bytes in 1 blocks are still reachable in loss record 25 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29384== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c:2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c:276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== ==29384== ==29384== ==29384== 504 bytes in 1 blocks are possibly lost in loss record 30 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c:2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c:276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29384== ==29384== ==29384== 671 bytes in 8 blocks are possibly lost in loss record 32 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D0273D: header_parse (msg_parser.c:1114) ==29384== by 0x7D025E3: extract_header (msg_parser.c:1071) ==29384== by 0x7D02315: msg_extract_header (msg_parser.c:1008) ==29384== by 0x7D05BD2: msg_header_parse_str (msg_parser.c:2801) ==29384== by 0x7D05B1E: msg_header_add_str (msg_parser.c:2764) ==29384== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29384== by 0x7D42EB4: nua_client_init_request (nua_stack.c:2278) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== ==29384== ==29384== 1,072 bytes in 2 blocks are possibly lost in loss record 37 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29384== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29384== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29384== by 0x7D46FF7: nua_invite (nua.c:633) ==29384== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29384== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29384== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29384== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29384== by 0x40FC695: dummy_worker (thread.c:138) ==29384== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29384== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29384== ==29384== ==29384== 1,295 bytes in 21 blocks are still reachable in loss record 38 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D11E7A: msg_header_make (msg_header_make.c:86) ==29384== by 0x7D05A73: msg_header_add_make (msg_parser.c:2729) ==29384== by 0x7D7B503: sip_add_tagis (sip_tag_class.c:256) ==29384== by 0x7D433D8: nua_client_request_template (nua_stack.c:2377) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== ==29384== ==29384== 28,116 bytes in 99 blocks are indirectly lost in loss record 55 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29384== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c:2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c:276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== ==29384== ==29384== 52,528 bytes in 98 blocks are definitely lost in loss record 56 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29384== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29384== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29384== by 0x7D46FF7: nua_invite (nua.c:633) ==29384== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29384== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29384== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29384== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29384== by 0x40FC695: dummy_worker (thread.c:138) ==29384== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29384== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29384== ==29384== ==29384== 57,034 bytes in 871 blocks are indirectly lost in loss record 57 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D11E7A: msg_header_make (msg_header_make.c:86) ==29384== by 0x7D05A73: msg_header_add_make (msg_parser.c:2729) ==29384== by 0x7D7B503: sip_add_tagis (sip_tag_class.c:256) ==29384== by 0x7D42EB4: nua_client_init_request (nua_stack.c:2278) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c:276) ==29384== ==29384== ==29384== 135,046 (49,896 direct, 85,150 indirect) bytes in 99 blocks are definitely lost in loss record 58 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c:2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c:276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29384== ==29384== LEAK SUMMARY: ==29384== definitely lost: 108,035 bytes in 303 blocks. ==29384== indirectly lost: 85,177 bytes in 972 blocks. ==29384== possibly lost: 2,535 bytes in 13 blocks. ==29384== still reachable: 16,325,250 bytes in 524 blocks. ==29384== suppressed: 0 bytes in 0 blocks. ============================================================================ 1000 calls' log ============================================================================ ==29612== ==29612== 3,024 bytes in 6 blocks are still reachable in loss record 39 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c:2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c:276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 3,692 bytes in 13 blocks are possibly lost in loss record 43 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c:2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c:276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 4,322 bytes in 55 blocks are possibly lost in loss record 47 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D9CAA2: su_strdup (su_strdup.c:55) ==29612== by 0x7D05AF3: msg_header_add_str (msg_parser.c:2759) ==29612== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29612== by 0x7D42EB4: nua_client_init_request (nua_stack.c:2278) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c:276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 5,360 bytes in 10 blocks are still reachable in loss record 49 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 5,360 bytes in 10 blocks are possibly lost in loss record 50 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 7,056 bytes in 14 blocks are possibly lost in loss record 51 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c:2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c:276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 9,940 bytes in 35 blocks are still reachable in loss record 54 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c:2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c:276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== ==29612== 43,590 bytes in 663 blocks are still reachable in loss record 57 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D9CAA2: su_strdup (su_strdup.c:55) ==29612== by 0x7DA8FC9: su_vsprintf (su_sprintf.c:80) ==29612== by 0x7DA90FA: su_sprintf (su_sprintf.c:125) ==29612== by 0x7D75737: sip_addr_tag (sip_basic.c:993) ==29612== by 0x7D765F1: sip_from_tag (sip_basic.c:1857) ==29612== by 0x7D43155: nua_client_init_request (nua_stack.c:2322) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== ==29612== ==29612== 55,728 bytes in 1 blocks are still reachable in loss record 58 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0xFCE0A57: sf_open (sndfile.c:285) ==29612== by 0xFCD9FD3: ??? (mod_sndfile.c:174) ==29612== by 0x40A04A1: switch_core_perform_file_open (switch_core_file.c:100) ==29612== by 0xFD3549A: ??? (mod_local_stream.c:178) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 270,368 bytes in 952 blocks are indirectly lost in loss record 59 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c:2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c:276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 542,088 bytes in 8,282 blocks are indirectly lost in loss record 60 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29612== by 0x7D0273D: header_parse (msg_parser.c:1114) ==29612== by 0x7D025E3: extract_header (msg_parser.c:1071) ==29612== by 0x7D02315: msg_extract_header (msg_parser.c:1008) ==29612== by 0x7D05BD2: msg_header_parse_str (msg_parser.c:2801) ==29612== by 0x7D05B1E: msg_header_add_str (msg_parser.c:2764) ==29612== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29612== by 0x7D42EB4: nua_client_init_request (nua_stack.c:2278) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== ==29612== ==29612== 1,305,502 (493,920 direct, 811,582 indirect) bytes in 980 blocks are definitely lost in loss record 62 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c:2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c:276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 526,154 (525,280 direct, 874 indirect) bytes in 980 blocks are definitely lost in loss record 63 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== LEAK SUMMARY: ==29612== definitely lost: 1,024,811 bytes in 2,066 blocks. ==29612== indirectly lost: 812,483 bytes in 9,236 blocks. ==29612== possibly lost: 20,718 bytes in 94 blocks. ==29612== still reachable: 16,441,313 bytes in 1,217 blocks. ==29612== suppressed: 0 bytes in 0 blocks.
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch- users-bounces@lists.freeswitch.org] On Behalf Of Michael Jerris Sent: Wednesday, July 30, 2008 11:26 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Memory Leaks
On Jul 30, 2008, at 8:33 AM, Sangwoo Jin wrote:
Hi,
I I'm testing freeswitch with sipp. My test configuration is the following: Sipp(caller) -> freeswitch -> Sipp(callee)s Testing loads are 5 CPS ~ 30 CPS and caller has hanged up a call as soon as receiving 200 OK.
In this testing environment, freeswitch's used memory is growing continuously.
The following is the valgrind's log on testing with 5 CPS 100 calls.
<snip>
Is this problem's cause configuration mistake or freeswitch's bug?
Sangwoo Jin
You will need to compare the valgrind output from about 100 calls to about 1000 calls to see which are actually larger. Also, please make sure you are using current svn trunk. Most of the items in that list appear to be things that we allocate at startup and never bother to free as they are free when the application stops. Those items are supposed to be allocated for the entire life of the switch. If you have reports that are definitely more please report this to our bug tracker at http://jira.freeswitch.org with exact details how you are testing including how you are initiating the call and your dialplan.
Mike
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Try running 500,000 calls at 100-200 cps with a duration of 1 second. You'll always see something about lost memory on shut down and you can't fully trust that output due to the usage of memory pools. You'll see a running FreeSWITCH hit a high water mark and level off on memory usage. I suspect that if you do this test with that many calls you'll see the same usage at some point or it will be more pronounced. 100 or 1000 calls isn't enough to really tell what is going on. /b On Jul 30, 2008, at 9:25 PM, Sangwoo Jin wrote:
I can't use JIRA because I'm waiting for confirmation of creating account.
Now, I tested again with the current svn trunk. The lost memory of 1000 calls is 10 times more than 100 calls.
The following logs are my filtered valgrind's output. I have removed the lost blocks log which may not have to be free.
Could you check this problem? Sangwoo Jin
= = = = = = ====================================================================== 100 calls' log = = = = = = ====================================================================== ==29384== 284 bytes in 1 blocks are still reachable in loss record 25 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29384== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== ==29384==
==29384== ==29384== 504 bytes in 1 blocks are possibly lost in loss record 30 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29384== ==29384== ==29384== 671 bytes in 8 blocks are possibly lost in loss record 32 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D0273D: header_parse (msg_parser.c:1114) ==29384== by 0x7D025E3: extract_header (msg_parser.c:1071) ==29384== by 0x7D02315: msg_extract_header (msg_parser.c:1008) ==29384== by 0x7D05BD2: msg_header_parse_str (msg_parser.c:2801) ==29384== by 0x7D05B1E: msg_header_add_str (msg_parser.c:2764) ==29384== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29384== by 0x7D42EB4: nua_client_init_request (nua_stack.c:2278) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== ==29384== ==29384== 1,072 bytes in 2 blocks are possibly lost in loss record 37 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29384== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29384== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29384== by 0x7D46FF7: nua_invite (nua.c:633) ==29384== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29384== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29384== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29384== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29384== by 0x40FC695: dummy_worker (thread.c:138) ==29384== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29384== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29384== ==29384== ==29384== 1,295 bytes in 21 blocks are still reachable in loss record 38 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D11E7A: msg_header_make (msg_header_make.c:86) ==29384== by 0x7D05A73: msg_header_add_make (msg_parser.c:2729) ==29384== by 0x7D7B503: sip_add_tagis (sip_tag_class.c:256) ==29384== by 0x7D433D8: nua_client_request_template (nua_stack.c: 2377) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== ==29384== ==29384== 28,116 bytes in 99 blocks are indirectly lost in loss record 55 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29384== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== ==29384== ==29384== 52,528 bytes in 98 blocks are definitely lost in loss record 56 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29384== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29384== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29384== by 0x7D46FF7: nua_invite (nua.c:633) ==29384== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29384== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29384== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29384== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29384== by 0x40FC695: dummy_worker (thread.c:138) ==29384== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29384== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29384== ==29384== ==29384== 57,034 bytes in 871 blocks are indirectly lost in loss record 57 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D11E7A: msg_header_make (msg_header_make.c:86) ==29384== by 0x7D05A73: msg_header_add_make (msg_parser.c:2729) ==29384== by 0x7D7B503: sip_add_tagis (sip_tag_class.c:256) ==29384== by 0x7D42EB4: nua_client_init_request (nua_stack.c:2278) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== ==29384== ==29384== 135,046 (49,896 direct, 85,150 indirect) bytes in 99 blocks are definitely lost in loss record 58 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29384== ==29384== LEAK SUMMARY: ==29384== definitely lost: 108,035 bytes in 303 blocks. ==29384== indirectly lost: 85,177 bytes in 972 blocks. ==29384== possibly lost: 2,535 bytes in 13 blocks. ==29384== still reachable: 16,325,250 bytes in 524 blocks. ==29384== suppressed: 0 bytes in 0 blocks.
= = = = = = ====================================================================== 1000 calls' log = = = = = = ====================================================================== ==29612== ==29612== 3,024 bytes in 6 blocks are still reachable in loss record 39 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 3,692 bytes in 13 blocks are possibly lost in loss record 43 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 4,322 bytes in 55 blocks are possibly lost in loss record 47 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D9CAA2: su_strdup (su_strdup.c:55) ==29612== by 0x7D05AF3: msg_header_add_str (msg_parser.c:2759) ==29612== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29612== by 0x7D42EB4: nua_client_init_request (nua_stack.c:2278) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 5,360 bytes in 10 blocks are still reachable in loss record 49 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 5,360 bytes in 10 blocks are possibly lost in loss record 50 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 7,056 bytes in 14 blocks are possibly lost in loss record 51 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 9,940 bytes in 35 blocks are still reachable in loss record 54 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== ==29612== 43,590 bytes in 663 blocks are still reachable in loss record 57 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D9CAA2: su_strdup (su_strdup.c:55) ==29612== by 0x7DA8FC9: su_vsprintf (su_sprintf.c:80) ==29612== by 0x7DA90FA: su_sprintf (su_sprintf.c:125) ==29612== by 0x7D75737: sip_addr_tag (sip_basic.c:993) ==29612== by 0x7D765F1: sip_from_tag (sip_basic.c:1857) ==29612== by 0x7D43155: nua_client_init_request (nua_stack.c:2322) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== ==29612== ==29612== 55,728 bytes in 1 blocks are still reachable in loss record 58 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0xFCE0A57: sf_open (sndfile.c:285) ==29612== by 0xFCD9FD3: ??? (mod_sndfile.c:174) ==29612== by 0x40A04A1: switch_core_perform_file_open (switch_core_file.c:100) ==29612== by 0xFD3549A: ??? (mod_local_stream.c:178) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 270,368 bytes in 952 blocks are indirectly lost in loss record 59 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 542,088 bytes in 8,282 blocks are indirectly lost in loss record 60 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29612== by 0x7D0273D: header_parse (msg_parser.c:1114) ==29612== by 0x7D025E3: extract_header (msg_parser.c:1071) ==29612== by 0x7D02315: msg_extract_header (msg_parser.c:1008) ==29612== by 0x7D05BD2: msg_header_parse_str (msg_parser.c:2801) ==29612== by 0x7D05B1E: msg_header_add_str (msg_parser.c:2764) ==29612== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29612== by 0x7D42EB4: nua_client_init_request (nua_stack.c:2278) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== ==29612== ==29612== 1,305,502 (493,920 direct, 811,582 indirect) bytes in 980 blocks are definitely lost in loss record 62 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 526,154 (525,280 direct, 874 indirect) bytes in 980 blocks are definitely lost in loss record 63 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== LEAK SUMMARY: ==29612== definitely lost: 1,024,811 bytes in 2,066 blocks. ==29612== indirectly lost: 812,483 bytes in 9,236 blocks. ==29612== possibly lost: 20,718 bytes in 94 blocks. ==29612== still reachable: 16,441,313 bytes in 1,217 blocks. ==29612== suppressed: 0 bytes in 0 blocks.
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch- users-bounces@lists.freeswitch.org] On Behalf Of Michael Jerris Sent: Wednesday, July 30, 2008 11:26 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Memory Leaks
On Jul 30, 2008, at 8:33 AM, Sangwoo Jin wrote:
Hi,
I I'm testing freeswitch with sipp. My test configuration is the following: Sipp(caller) -> freeswitch -> Sipp(callee)s Testing loads are 5 CPS ~ 30 CPS and caller has hanged up a call as soon as receiving 200 OK.
In this testing environment, freeswitch's used memory is growing continuously.
The following is the valgrind's log on testing with 5 CPS 100 calls.
<snip>
Is this problem's cause configuration mistake or freeswitch's bug?
Sangwoo Jin
You will need to compare the valgrind output from about 100 calls to about 1000 calls to see which are actually larger. Also, please make sure you are using current svn trunk. Most of the items in that list appear to be things that we allocate at startup and never bother to free as they are free when the application stops. Those items are supposed to be allocated for the entire life of the switch. If you have reports that are definitely more please report this to our bug tracker at http://jira.freeswitch.org with exact details how you are testing including how you are initiating the call and your dialplan.
Mike
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
i mean how much ram is in use in bytes by FS On Wed, Jul 30, 2008 at 9:37 PM, Brian West <brian@freeswitch.org> wrote:
Try running 500,000 calls at 100-200 cps with a duration of 1 second. You'll always see something about lost memory on shut down and you can't fully trust that output due to the usage of memory pools. You'll see a running FreeSWITCH hit a high water mark and level off on memory usage. I suspect that if you do this test with that many calls you'll see the same usage at some point or it will be more pronounced. 100 or 1000 calls isn't enough to really tell what is going on.
/b
On Jul 30, 2008, at 9:25 PM, Sangwoo Jin wrote:
I can't use JIRA because I'm waiting for confirmation of creating account.
Now, I tested again with the current svn trunk. The lost memory of 1000 calls is 10 times more than 100 calls.
The following logs are my filtered valgrind's output. I have removed the lost blocks log which may not have to be free.
Could you check this problem? Sangwoo Jin
= = = = = = ====================================================================== 100 calls' log = = = = = = ====================================================================== ==29384== 284 bytes in 1 blocks are still reachable in loss record 25 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29384== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== ==29384==
==29384== ==29384== 504 bytes in 1 blocks are possibly lost in loss record 30 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29384== ==29384== ==29384== 671 bytes in 8 blocks are possibly lost in loss record 32 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D0273D: header_parse (msg_parser.c:1114) ==29384== by 0x7D025E3: extract_header (msg_parser.c:1071) ==29384== by 0x7D02315: msg_extract_header (msg_parser.c:1008) ==29384== by 0x7D05BD2: msg_header_parse_str (msg_parser.c:2801) ==29384== by 0x7D05B1E: msg_header_add_str (msg_parser.c:2764) ==29384== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29384== by 0x7D42EB4: nua_client_init_request (nua_stack.c:2278) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== ==29384== ==29384== 1,072 bytes in 2 blocks are possibly lost in loss record 37 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29384== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29384== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29384== by 0x7D46FF7: nua_invite (nua.c:633) ==29384== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29384== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29384== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29384== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29384== by 0x40FC695: dummy_worker (thread.c:138) ==29384== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29384== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29384== ==29384== ==29384== 1,295 bytes in 21 blocks are still reachable in loss record 38 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D11E7A: msg_header_make (msg_header_make.c:86) ==29384== by 0x7D05A73: msg_header_add_make (msg_parser.c:2729) ==29384== by 0x7D7B503: sip_add_tagis (sip_tag_class.c:256) ==29384== by 0x7D433D8: nua_client_request_template (nua_stack.c: 2377) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== ==29384== ==29384== 28,116 bytes in 99 blocks are indirectly lost in loss record 55 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29384== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== ==29384== ==29384== 52,528 bytes in 98 blocks are definitely lost in loss record 56 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29384== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29384== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29384== by 0x7D46FF7: nua_invite (nua.c:633) ==29384== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29384== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29384== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29384== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29384== by 0x40FC695: dummy_worker (thread.c:138) ==29384== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29384== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29384== ==29384== ==29384== 57,034 bytes in 871 blocks are indirectly lost in loss record 57 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D11E7A: msg_header_make (msg_header_make.c:86) ==29384== by 0x7D05A73: msg_header_add_make (msg_parser.c:2729) ==29384== by 0x7D7B503: sip_add_tagis (sip_tag_class.c:256) ==29384== by 0x7D42EB4: nua_client_init_request (nua_stack.c:2278) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== ==29384== ==29384== 135,046 (49,896 direct, 85,150 indirect) bytes in 99 blocks are definitely lost in loss record 58 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29384== ==29384== LEAK SUMMARY: ==29384== definitely lost: 108,035 bytes in 303 blocks. ==29384== indirectly lost: 85,177 bytes in 972 blocks. ==29384== possibly lost: 2,535 bytes in 13 blocks. ==29384== still reachable: 16,325,250 bytes in 524 blocks. ==29384== suppressed: 0 bytes in 0 blocks.
= = = = = = ====================================================================== 1000 calls' log = = = = = = ====================================================================== ==29612== ==29612== 3,024 bytes in 6 blocks are still reachable in loss record 39 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 3,692 bytes in 13 blocks are possibly lost in loss record 43 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 4,322 bytes in 55 blocks are possibly lost in loss record 47 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D9CAA2: su_strdup (su_strdup.c:55) ==29612== by 0x7D05AF3: msg_header_add_str (msg_parser.c:2759) ==29612== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29612== by 0x7D42EB4: nua_client_init_request (nua_stack.c:2278) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 5,360 bytes in 10 blocks are still reachable in loss record 49 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 5,360 bytes in 10 blocks are possibly lost in loss record 50 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 7,056 bytes in 14 blocks are possibly lost in loss record 51 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 9,940 bytes in 35 blocks are still reachable in loss record 54 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== ==29612== 43,590 bytes in 663 blocks are still reachable in loss record 57 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D9CAA2: su_strdup (su_strdup.c:55) ==29612== by 0x7DA8FC9: su_vsprintf (su_sprintf.c:80) ==29612== by 0x7DA90FA: su_sprintf (su_sprintf.c:125) ==29612== by 0x7D75737: sip_addr_tag (sip_basic.c:993) ==29612== by 0x7D765F1: sip_from_tag (sip_basic.c:1857) ==29612== by 0x7D43155: nua_client_init_request (nua_stack.c:2322) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== ==29612== ==29612== 55,728 bytes in 1 blocks are still reachable in loss record 58 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0xFCE0A57: sf_open (sndfile.c:285) ==29612== by 0xFCD9FD3: ??? (mod_sndfile.c:174) ==29612== by 0x40A04A1: switch_core_perform_file_open (switch_core_file.c:100) ==29612== by 0xFD3549A: ??? (mod_local_stream.c:178) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 270,368 bytes in 952 blocks are indirectly lost in loss record 59 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 542,088 bytes in 8,282 blocks are indirectly lost in loss record 60 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29612== by 0x7D0273D: header_parse (msg_parser.c:1114) ==29612== by 0x7D025E3: extract_header (msg_parser.c:1071) ==29612== by 0x7D02315: msg_extract_header (msg_parser.c:1008) ==29612== by 0x7D05BD2: msg_header_parse_str (msg_parser.c:2801) ==29612== by 0x7D05B1E: msg_header_add_str (msg_parser.c:2764) ==29612== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29612== by 0x7D42EB4: nua_client_init_request (nua_stack.c:2278) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== ==29612== ==29612== 1,305,502 (493,920 direct, 811,582 indirect) bytes in 980 blocks are definitely lost in loss record 62 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 526,154 (525,280 direct, 874 indirect) bytes in 980 blocks are definitely lost in loss record 63 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== LEAK SUMMARY: ==29612== definitely lost: 1,024,811 bytes in 2,066 blocks. ==29612== indirectly lost: 812,483 bytes in 9,236 blocks. ==29612== possibly lost: 20,718 bytes in 94 blocks. ==29612== still reachable: 16,441,313 bytes in 1,217 blocks. ==29612== suppressed: 0 bytes in 0 blocks.
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch- users-bounces@lists.freeswitch.org] On Behalf Of Michael Jerris Sent: Wednesday, July 30, 2008 11:26 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Memory Leaks
On Jul 30, 2008, at 8:33 AM, Sangwoo Jin wrote:
Hi,
I I'm testing freeswitch with sipp. My test configuration is the following: Sipp(caller) -> freeswitch -> Sipp(callee)s Testing loads are 5 CPS ~ 30 CPS and caller has hanged up a call as soon as receiving 200 OK.
In this testing environment, freeswitch's used memory is growing continuously.
The following is the valgrind's log on testing with 5 CPS 100 calls.
<snip>
Is this problem's cause configuration mistake or freeswitch's bug?
Sangwoo Jin
You will need to compare the valgrind output from about 100 calls to about 1000 calls to see which are actually larger. Also, please make sure you are using current svn trunk. Most of the items in that list appear to be things that we allocate at startup and never bother to free as they are free when the application stops. Those items are supposed to be allocated for the entire life of the switch. If you have reports that are definitely more please report this to our bug tracker at http://jira.freeswitch.org with exact details how you are testing including how you are initiating the call and your dialplan.
Mike
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:
http://lists.freeswitch.org/mailman/options/freeswitch-users
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
I want to run freeswitch on low memory machine with 128M ram and no swap partition. On testing freeswitch on it, I have always seen the out of memory error. Could I control the memory pools?
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch- users-bounces@lists.freeswitch.org] On Behalf Of Brian West Sent: Thursday, July 31, 2008 11:38 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Memory Leaks
Try running 500,000 calls at 100-200 cps with a duration of 1 second. You'll always see something about lost memory on shut down and you can't fully trust that output due to the usage of memory pools. You'll see a running FreeSWITCH hit a high water mark and level off on memory usage. I suspect that if you do this test with that many calls you'll see the same usage at some point or it will be more pronounced. 100 or 1000 calls isn't enough to really tell what is going on.
/b
On Jul 30, 2008, at 9:25 PM, Sangwoo Jin wrote:
I can't use JIRA because I'm waiting for confirmation of creating account.
Now, I tested again with the current svn trunk. The lost memory of 1000 calls is 10 times more than 100 calls.
The following logs are my filtered valgrind's output. I have removed the lost blocks log which may not have to be free.
Could you check this problem? Sangwoo Jin
= = = = = = ====================================================================== 100 calls' log = = = = = = ====================================================================== ==29384== 284 bytes in 1 blocks are still reachable in loss record 25 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29384== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== ==29384==
==29384== ==29384== 504 bytes in 1 blocks are possibly lost in loss record 30 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29384== ==29384== ==29384== 671 bytes in 8 blocks are possibly lost in loss record 32 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D0273D: header_parse (msg_parser.c:1114) ==29384== by 0x7D025E3: extract_header (msg_parser.c:1071) ==29384== by 0x7D02315: msg_extract_header (msg_parser.c:1008) ==29384== by 0x7D05BD2: msg_header_parse_str (msg_parser.c:2801) ==29384== by 0x7D05B1E: msg_header_add_str (msg_parser.c:2764) ==29384== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29384== by 0x7D42EB4: nua_client_init_request (nua_stack.c:2278) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== ==29384== ==29384== 1,072 bytes in 2 blocks are possibly lost in loss record 37 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29384== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29384== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29384== by 0x7D46FF7: nua_invite (nua.c:633) ==29384== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29384== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29384== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29384== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29384== by 0x40FC695: dummy_worker (thread.c:138) ==29384== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29384== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29384== ==29384== ==29384== 1,295 bytes in 21 blocks are still reachable in loss record 38 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D11E7A: msg_header_make (msg_header_make.c:86) ==29384== by 0x7D05A73: msg_header_add_make (msg_parser.c:2729) ==29384== by 0x7D7B503: sip_add_tagis (sip_tag_class.c:256) ==29384== by 0x7D433D8: nua_client_request_template (nua_stack.c: 2377) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== ==29384== ==29384== 28,116 bytes in 99 blocks are indirectly lost in loss record 55 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29384== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== ==29384== ==29384== 52,528 bytes in 98 blocks are definitely lost in loss record 56 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29384== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29384== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29384== by 0x7D46FF7: nua_invite (nua.c:633) ==29384== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29384== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29384== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29384== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29384== by 0x40FC695: dummy_worker (thread.c:138) ==29384== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29384== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29384== ==29384== ==29384== 57,034 bytes in 871 blocks are indirectly lost in loss record 57 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D11E7A: msg_header_make (msg_header_make.c:86) ==29384== by 0x7D05A73: msg_header_add_make (msg_parser.c:2729) ==29384== by 0x7D7B503: sip_add_tagis (sip_tag_class.c:256) ==29384== by 0x7D42EB4: nua_client_init_request (nua_stack.c:2278) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== ==29384== ==29384== 135,046 (49,896 direct, 85,150 indirect) bytes in 99 blocks are definitely lost in loss record 58 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29384== ==29384== LEAK SUMMARY: ==29384== definitely lost: 108,035 bytes in 303 blocks. ==29384== indirectly lost: 85,177 bytes in 972 blocks. ==29384== possibly lost: 2,535 bytes in 13 blocks. ==29384== still reachable: 16,325,250 bytes in 524 blocks. ==29384== suppressed: 0 bytes in 0 blocks.
= = = = = = ====================================================================== 1000 calls' log = = = = = = ====================================================================== ==29612== ==29612== 3,024 bytes in 6 blocks are still reachable in loss record 39 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 3,692 bytes in 13 blocks are possibly lost in loss record 43 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 4,322 bytes in 55 blocks are possibly lost in loss record 47 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D9CAA2: su_strdup (su_strdup.c:55) ==29612== by 0x7D05AF3: msg_header_add_str (msg_parser.c:2759) ==29612== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29612== by 0x7D42EB4: nua_client_init_request (nua_stack.c:2278) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 5,360 bytes in 10 blocks are still reachable in loss record 49 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 5,360 bytes in 10 blocks are possibly lost in loss record 50 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 7,056 bytes in 14 blocks are possibly lost in loss record 51 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 9,940 bytes in 35 blocks are still reachable in loss record 54 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== ==29612== 43,590 bytes in 663 blocks are still reachable in loss record 57 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D9CAA2: su_strdup (su_strdup.c:55) ==29612== by 0x7DA8FC9: su_vsprintf (su_sprintf.c:80) ==29612== by 0x7DA90FA: su_sprintf (su_sprintf.c:125) ==29612== by 0x7D75737: sip_addr_tag (sip_basic.c:993) ==29612== by 0x7D765F1: sip_from_tag (sip_basic.c:1857) ==29612== by 0x7D43155: nua_client_init_request (nua_stack.c:2322) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== ==29612== ==29612== 55,728 bytes in 1 blocks are still reachable in loss record 58 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0xFCE0A57: sf_open (sndfile.c:285) ==29612== by 0xFCD9FD3: ??? (mod_sndfile.c:174) ==29612== by 0x40A04A1: switch_core_perform_file_open (switch_core_file.c:100) ==29612== by 0xFD3549A: ??? (mod_local_stream.c:178) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 270,368 bytes in 952 blocks are indirectly lost in loss record 59 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 542,088 bytes in 8,282 blocks are indirectly lost in loss record 60 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29612== by 0x7D0273D: header_parse (msg_parser.c:1114) ==29612== by 0x7D025E3: extract_header (msg_parser.c:1071) ==29612== by 0x7D02315: msg_extract_header (msg_parser.c:1008) ==29612== by 0x7D05BD2: msg_header_parse_str (msg_parser.c:2801) ==29612== by 0x7D05B1E: msg_header_add_str (msg_parser.c:2764) ==29612== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29612== by 0x7D42EB4: nua_client_init_request (nua_stack.c:2278) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== ==29612== ==29612== 1,305,502 (493,920 direct, 811,582 indirect) bytes in 980 blocks are definitely lost in loss record 62 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 526,154 (525,280 direct, 874 indirect) bytes in 980 blocks are definitely lost in loss record 63 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== LEAK SUMMARY: ==29612== definitely lost: 1,024,811 bytes in 2,066 blocks. ==29612== indirectly lost: 812,483 bytes in 9,236 blocks. ==29612== possibly lost: 20,718 bytes in 94 blocks. ==29612== still reachable: 16,441,313 bytes in 1,217 blocks. ==29612== suppressed: 0 bytes in 0 blocks.
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch- users-bounces@lists.freeswitch.org] On Behalf Of Michael Jerris Sent: Wednesday, July 30, 2008 11:26 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Memory Leaks
On Jul 30, 2008, at 8:33 AM, Sangwoo Jin wrote:
Hi,
I I'm testing freeswitch with sipp. My test configuration is the following: Sipp(caller) -> freeswitch -> Sipp(callee)s Testing loads are 5 CPS ~ 30 CPS and caller has hanged up a call as soon as receiving 200 OK.
In this testing environment, freeswitch's used memory is growing continuously.
The following is the valgrind's log on testing with 5 CPS 100 calls.
<snip>
Is this problem's cause configuration mistake or freeswitch's bug?
Sangwoo Jin
You will need to compare the valgrind output from about 100 calls to about 1000 calls to see which are actually larger. Also, please make sure you are using current svn trunk. Most of the items in that list appear to be things that we allocate at startup and never bother to free as they are free when the application stops. Those items are supposed to be allocated for the entire life of the switch. If you have reports that are definitely more please report this to our bug tracker at http://jira.freeswitch.org with exact details how you are testing including how you are initiating the call and your dialplan.
Mike
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-
users
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Can you detail the exact callflow, config files and testing methods you used to produce this issue? I suspect that this may be a real issue but we ran sipp testing 2 days ago so your scenario must be hitting an edge case we were not seeing. That being said we have made no efforts to get freeswitch to run in so little memory, in fact we have quite a few things we allocate at switch start that could very well ammount to over 128mb even without calls. You will likely not get it to work reliably with so little memory without some significant modifications. Mike On Jul 31, 2008, at 12:07 AM, "Sangwoo Jin" <swjinjin@volans.kr> wrote:
I want to run freeswitch on low memory machine with 128M ram and no swap partition. On testing freeswitch on it, I have always seen the out of memory error. Could I control the memory pools?
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch- users-bounces@lists.freeswitch.org] On Behalf Of Brian West Sent: Thursday, July 31, 2008 11:38 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Memory Leaks
Try running 500,000 calls at 100-200 cps with a duration of 1 second. You'll always see something about lost memory on shut down and you can't fully trust that output due to the usage of memory pools. You'll see a running FreeSWITCH hit a high water mark and level off on memory usage. I suspect that if you do this test with that many calls you'll see the same usage at some point or it will be more pronounced. 100 or 1000 calls isn't enough to really tell what is going on.
/b
On Jul 30, 2008, at 9:25 PM, Sangwoo Jin wrote:
I can't use JIRA because I'm waiting for confirmation of creating account.
Now, I tested again with the current svn trunk. The lost memory of 1000 calls is 10 times more than 100 calls.
The following logs are my filtered valgrind's output. I have removed the lost blocks log which may not have to be free.
Could you check this problem? Sangwoo Jin
= = = = = = === =================================================================== 100 calls' log = = = = = = === =================================================================== ==29384== 284 bytes in 1 blocks are still reachable in loss record 25 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29384== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== ==29384==
==29384== ==29384== 504 bytes in 1 blocks are possibly lost in loss record 30 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29384== ==29384== ==29384== 671 bytes in 8 blocks are possibly lost in loss record 32 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D0273D: header_parse (msg_parser.c:1114) ==29384== by 0x7D025E3: extract_header (msg_parser.c:1071) ==29384== by 0x7D02315: msg_extract_header (msg_parser.c:1008) ==29384== by 0x7D05BD2: msg_header_parse_str (msg_parser.c:2801) ==29384== by 0x7D05B1E: msg_header_add_str (msg_parser.c:2764) ==29384== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29384== by 0x7D42EB4: nua_client_init_request (nua_stack.c: 2278) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== ==29384== ==29384== 1,072 bytes in 2 blocks are possibly lost in loss record 37 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29384== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29384== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29384== by 0x7D46FF7: nua_invite (nua.c:633) ==29384== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29384== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29384== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29384== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29384== by 0x40FC695: dummy_worker (thread.c:138) ==29384== by 0x41EB191: start_thread (in /lib/ libpthread-2.6.1.so) ==29384== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29384== ==29384== ==29384== 1,295 bytes in 21 blocks are still reachable in loss record 38 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D11E7A: msg_header_make (msg_header_make.c:86) ==29384== by 0x7D05A73: msg_header_add_make (msg_parser.c:2729) ==29384== by 0x7D7B503: sip_add_tagis (sip_tag_class.c:256) ==29384== by 0x7D433D8: nua_client_request_template (nua_stack.c: 2377) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== ==29384== ==29384== 28,116 bytes in 99 blocks are indirectly lost in loss record 55 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29384== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== ==29384== ==29384== 52,528 bytes in 98 blocks are definitely lost in loss record 56 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29384== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29384== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29384== by 0x7D46FF7: nua_invite (nua.c:633) ==29384== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29384== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29384== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29384== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29384== by 0x40FC695: dummy_worker (thread.c:138) ==29384== by 0x41EB191: start_thread (in /lib/ libpthread-2.6.1.so) ==29384== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29384== ==29384== ==29384== 57,034 bytes in 871 blocks are indirectly lost in loss record 57 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D11E7A: msg_header_make (msg_header_make.c:86) ==29384== by 0x7D05A73: msg_header_add_make (msg_parser.c:2729) ==29384== by 0x7D7B503: sip_add_tagis (sip_tag_class.c:256) ==29384== by 0x7D42EB4: nua_client_init_request (nua_stack.c: 2278) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== ==29384== ==29384== 135,046 (49,896 direct, 85,150 indirect) bytes in 99 blocks are definitely lost in loss record 58 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29384== ==29384== LEAK SUMMARY: ==29384== definitely lost: 108,035 bytes in 303 blocks. ==29384== indirectly lost: 85,177 bytes in 972 blocks. ==29384== possibly lost: 2,535 bytes in 13 blocks. ==29384== still reachable: 16,325,250 bytes in 524 blocks. ==29384== suppressed: 0 bytes in 0 blocks.
= = = = = = === =================================================================== 1000 calls' log = = = = = = === =================================================================== ==29612== ==29612== 3,024 bytes in 6 blocks are still reachable in loss record 39 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 3,692 bytes in 13 blocks are possibly lost in loss record 43 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 4,322 bytes in 55 blocks are possibly lost in loss record 47 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D9CAA2: su_strdup (su_strdup.c:55) ==29612== by 0x7D05AF3: msg_header_add_str (msg_parser.c:2759) ==29612== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29612== by 0x7D42EB4: nua_client_init_request (nua_stack.c: 2278) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 5,360 bytes in 10 blocks are still reachable in loss record 49 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/ libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 5,360 bytes in 10 blocks are possibly lost in loss record 50 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/ libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 7,056 bytes in 14 blocks are possibly lost in loss record 51 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 9,940 bytes in 35 blocks are still reachable in loss record 54 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== ==29612== 43,590 bytes in 663 blocks are still reachable in loss record 57 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D9CAA2: su_strdup (su_strdup.c:55) ==29612== by 0x7DA8FC9: su_vsprintf (su_sprintf.c:80) ==29612== by 0x7DA90FA: su_sprintf (su_sprintf.c:125) ==29612== by 0x7D75737: sip_addr_tag (sip_basic.c:993) ==29612== by 0x7D765F1: sip_from_tag (sip_basic.c:1857) ==29612== by 0x7D43155: nua_client_init_request (nua_stack.c: 2322) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== ==29612== ==29612== 55,728 bytes in 1 blocks are still reachable in loss record 58 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0xFCE0A57: sf_open (sndfile.c:285) ==29612== by 0xFCD9FD3: ??? (mod_sndfile.c:174) ==29612== by 0x40A04A1: switch_core_perform_file_open (switch_core_file.c:100) ==29612== by 0xFD3549A: ??? (mod_local_stream.c:178) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/ libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 270,368 bytes in 952 blocks are indirectly lost in loss record 59 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 542,088 bytes in 8,282 blocks are indirectly lost in loss record 60 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29612== by 0x7D0273D: header_parse (msg_parser.c:1114) ==29612== by 0x7D025E3: extract_header (msg_parser.c:1071) ==29612== by 0x7D02315: msg_extract_header (msg_parser.c:1008) ==29612== by 0x7D05BD2: msg_header_parse_str (msg_parser.c:2801) ==29612== by 0x7D05B1E: msg_header_add_str (msg_parser.c:2764) ==29612== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29612== by 0x7D42EB4: nua_client_init_request (nua_stack.c: 2278) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== ==29612== ==29612== 1,305,502 (493,920 direct, 811,582 indirect) bytes in 980 blocks are definitely lost in loss record 62 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 526,154 (525,280 direct, 874 indirect) bytes in 980 blocks are definitely lost in loss record 63 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/ libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== LEAK SUMMARY: ==29612== definitely lost: 1,024,811 bytes in 2,066 blocks. ==29612== indirectly lost: 812,483 bytes in 9,236 blocks. ==29612== possibly lost: 20,718 bytes in 94 blocks. ==29612== still reachable: 16,441,313 bytes in 1,217 blocks. ==29612== suppressed: 0 bytes in 0 blocks.
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch- users-bounces@lists.freeswitch.org] On Behalf Of Michael Jerris Sent: Wednesday, July 30, 2008 11:26 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Memory Leaks
On Jul 30, 2008, at 8:33 AM, Sangwoo Jin wrote:
Hi,
I I'm testing freeswitch with sipp. My test configuration is the following: Sipp(caller) -> freeswitch -> Sipp(callee)s Testing loads are 5 CPS ~ 30 CPS and caller has hanged up a call as soon as receiving 200 OK.
In this testing environment, freeswitch's used memory is growing continuously.
The following is the valgrind's log on testing with 5 CPS 100 calls.
<snip>
Is this problem's cause configuration mistake or freeswitch's bug?
Sangwoo Jin
You will need to compare the valgrind output from about 100 calls to about 1000 calls to see which are actually larger. Also, please make sure you are using current svn trunk. Most of the items in that list appear to be things that we allocate at startup and never bother to free as they are free when the application stops. Those items are supposed to be allocated for the entire life of the switch. If you have reports that are definitely more please report this to our bug tracker at http://jira.freeswitch.org with exact details how you are testing including how you are initiating the call and your dialplan.
Mike
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-
users
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I don't have gotten the same result in testing MOH calls with 15 CPS. The memory usage of freeswitch on testing doesn't grow at some point. But, The memory usage of freeswitch on testing bridged calls with 5CPS and 1 second duration was growing endlessly. I have watched The memory usage of freeswitch becomes 1G bytes. I attached the scripts of my test. Firstly, execute the scripts like uas_10xx.sh in each shells, and execute call.sh. Then, the following call flows is rotated at 5 CPS. 1000 -> freeswitch -> 1011 1000 -> freeswitch -> 1012 1000 -> freeswitch -> 1013 1000 -> freeswitch -> 1014 1000 -> freeswitch -> 1015 1000 -> freeswitch -> 1016 1000 -> freeswitch -> 1017 1000 -> freeswitch -> 1018 1000 -> freeswitch -> 1019 And, please inform me where I can find the memory pre-allocation codes on freeswitch's starting? Sangwoo Jin.
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch- users-bounces@lists.freeswitch.org] On Behalf Of Michael Jerris Sent: Thursday, July 31, 2008 3:45 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Memory Leaks
Can you detail the exact callflow, config files and testing methods you used to produce this issue? I suspect that this may be a real issue but we ran sipp testing 2 days ago so your scenario must be hitting an edge case we were not seeing. That being said we have made no efforts to get freeswitch to run in so little memory, in fact we have quite a few things we allocate at switch start that could very well ammount to over 128mb even without calls. You will likely not get it to work reliably with so little memory without some significant modifications.
Mike
On Jul 31, 2008, at 12:07 AM, "Sangwoo Jin" <swjinjin@volans.kr> wrote:
I want to run freeswitch on low memory machine with 128M ram and no swap partition. On testing freeswitch on it, I have always seen the out of memory error. Could I control the memory pools?
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch- users-bounces@lists.freeswitch.org] On Behalf Of Brian West Sent: Thursday, July 31, 2008 11:38 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Memory Leaks
Try running 500,000 calls at 100-200 cps with a duration of 1 second. You'll always see something about lost memory on shut down and you can't fully trust that output due to the usage of memory pools. You'll see a running FreeSWITCH hit a high water mark and level off on memory usage. I suspect that if you do this test with that many calls you'll see the same usage at some point or it will be more pronounced. 100 or 1000 calls isn't enough to really tell what is going on.
/b
On Jul 30, 2008, at 9:25 PM, Sangwoo Jin wrote:
I can't use JIRA because I'm waiting for confirmation of creating account.
Now, I tested again with the current svn trunk. The lost memory of 1000 calls is 10 times more than 100 calls.
The following logs are my filtered valgrind's output. I have removed the lost blocks log which may not have to be free.
Could you check this problem? Sangwoo Jin
= = = = = = === =================================================================== 100 calls' log = = = = = = === =================================================================== ==29384== 284 bytes in 1 blocks are still reachable in loss record 25 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29384== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== ==29384==
==29384== ==29384== 504 bytes in 1 blocks are possibly lost in loss record 30 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29384== ==29384== ==29384== 671 bytes in 8 blocks are possibly lost in loss record 32 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D0273D: header_parse (msg_parser.c:1114) ==29384== by 0x7D025E3: extract_header (msg_parser.c:1071) ==29384== by 0x7D02315: msg_extract_header (msg_parser.c:1008) ==29384== by 0x7D05BD2: msg_header_parse_str (msg_parser.c:2801) ==29384== by 0x7D05B1E: msg_header_add_str (msg_parser.c:2764) ==29384== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29384== by 0x7D42EB4: nua_client_init_request (nua_stack.c: 2278) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== ==29384== ==29384== 1,072 bytes in 2 blocks are possibly lost in loss record 37 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29384== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29384== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29384== by 0x7D46FF7: nua_invite (nua.c:633) ==29384== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29384== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29384== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29384== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29384== by 0x40FC695: dummy_worker (thread.c:138) ==29384== by 0x41EB191: start_thread (in /lib/ libpthread-2.6.1.so) ==29384== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29384== ==29384== ==29384== 1,295 bytes in 21 blocks are still reachable in loss record 38 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D11E7A: msg_header_make (msg_header_make.c:86) ==29384== by 0x7D05A73: msg_header_add_make (msg_parser.c:2729) ==29384== by 0x7D7B503: sip_add_tagis (sip_tag_class.c:256) ==29384== by 0x7D433D8: nua_client_request_template (nua_stack.c: 2377) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== ==29384== ==29384== 28,116 bytes in 99 blocks are indirectly lost in loss record 55 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29384== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== ==29384== ==29384== 52,528 bytes in 98 blocks are definitely lost in loss record 56 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29384== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29384== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29384== by 0x7D46FF7: nua_invite (nua.c:633) ==29384== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29384== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29384== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29384== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29384== by 0x40FC695: dummy_worker (thread.c:138) ==29384== by 0x41EB191: start_thread (in /lib/ libpthread-2.6.1.so) ==29384== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29384== ==29384== ==29384== 57,034 bytes in 871 blocks are indirectly lost in loss record 57 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D11E7A: msg_header_make (msg_header_make.c:86) ==29384== by 0x7D05A73: msg_header_add_make (msg_parser.c:2729) ==29384== by 0x7D7B503: sip_add_tagis (sip_tag_class.c:256) ==29384== by 0x7D42EB4: nua_client_init_request (nua_stack.c: 2278) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== ==29384== ==29384== 135,046 (49,896 direct, 85,150 indirect) bytes in 99 blocks are definitely lost in loss record 58 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29384== ==29384== LEAK SUMMARY: ==29384== definitely lost: 108,035 bytes in 303 blocks. ==29384== indirectly lost: 85,177 bytes in 972 blocks. ==29384== possibly lost: 2,535 bytes in 13 blocks. ==29384== still reachable: 16,325,250 bytes in 524 blocks. ==29384== suppressed: 0 bytes in 0 blocks.
= = = = = = === =================================================================== 1000 calls' log = = = = = = === =================================================================== ==29612== ==29612== 3,024 bytes in 6 blocks are still reachable in loss record 39 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 3,692 bytes in 13 blocks are possibly lost in loss record 43 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 4,322 bytes in 55 blocks are possibly lost in loss record 47 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D9CAA2: su_strdup (su_strdup.c:55) ==29612== by 0x7D05AF3: msg_header_add_str (msg_parser.c:2759) ==29612== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29612== by 0x7D42EB4: nua_client_init_request (nua_stack.c: 2278) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 5,360 bytes in 10 blocks are still reachable in loss record 49 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/ libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 5,360 bytes in 10 blocks are possibly lost in loss record 50 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/ libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 7,056 bytes in 14 blocks are possibly lost in loss record 51 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 9,940 bytes in 35 blocks are still reachable in loss record 54 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== ==29612== 43,590 bytes in 663 blocks are still reachable in loss record 57 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D9CAA2: su_strdup (su_strdup.c:55) ==29612== by 0x7DA8FC9: su_vsprintf (su_sprintf.c:80) ==29612== by 0x7DA90FA: su_sprintf (su_sprintf.c:125) ==29612== by 0x7D75737: sip_addr_tag (sip_basic.c:993) ==29612== by 0x7D765F1: sip_from_tag (sip_basic.c:1857) ==29612== by 0x7D43155: nua_client_init_request (nua_stack.c: 2322) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== ==29612== ==29612== 55,728 bytes in 1 blocks are still reachable in loss record 58 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0xFCE0A57: sf_open (sndfile.c:285) ==29612== by 0xFCD9FD3: ??? (mod_sndfile.c:174) ==29612== by 0x40A04A1: switch_core_perform_file_open (switch_core_file.c:100) ==29612== by 0xFD3549A: ??? (mod_local_stream.c:178) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/ libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 270,368 bytes in 952 blocks are indirectly lost in loss record 59 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 542,088 bytes in 8,282 blocks are indirectly lost in loss record 60 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29612== by 0x7D0273D: header_parse (msg_parser.c:1114) ==29612== by 0x7D025E3: extract_header (msg_parser.c:1071) ==29612== by 0x7D02315: msg_extract_header (msg_parser.c:1008) ==29612== by 0x7D05BD2: msg_header_parse_str (msg_parser.c:2801) ==29612== by 0x7D05B1E: msg_header_add_str (msg_parser.c:2764) ==29612== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29612== by 0x7D42EB4: nua_client_init_request (nua_stack.c: 2278) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== ==29612== ==29612== 1,305,502 (493,920 direct, 811,582 indirect) bytes in 980 blocks are definitely lost in loss record 62 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 526,154 (525,280 direct, 874 indirect) bytes in 980 blocks are definitely lost in loss record 63 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/ libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== LEAK SUMMARY: ==29612== definitely lost: 1,024,811 bytes in 2,066 blocks. ==29612== indirectly lost: 812,483 bytes in 9,236 blocks. ==29612== possibly lost: 20,718 bytes in 94 blocks. ==29612== still reachable: 16,441,313 bytes in 1,217 blocks. ==29612== suppressed: 0 bytes in 0 blocks.
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-
users-bounces@lists.freeswitch.org] On Behalf Of Michael Jerris Sent: Wednesday, July 30, 2008 11:26 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Memory Leaks
On Jul 30, 2008, at 8:33 AM, Sangwoo Jin wrote:
Hi,
I I'm testing freeswitch with sipp. My test configuration is the following: Sipp(caller) -> freeswitch -> Sipp(callee)s Testing loads are 5 CPS ~ 30 CPS and caller has hanged up a call as soon as receiving 200 OK.
In this testing environment, freeswitch's used memory is growing continuously.
The following is the valgrind's log on testing with 5 CPS 100 calls.
<snip>
Is this problem's cause configuration mistake or freeswitch's bug?
Sangwoo Jin
You will need to compare the valgrind output from about 100 calls to about 1000 calls to see which are actually larger. Also, please make sure you are using current svn trunk. Most of the items in that list appear to be things that we allocate at startup and never bother to free as they are free when the application stops. Those items are supposed to be allocated for the entire life of the switch. If you have reports that are definitely more please report this to our bug tracker at http://jira.freeswitch.org with exact details how you are testing including how you are initiating the call and your dialplan.
Mike
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch- users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch- users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch- users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Can you run FS under valgrind and see if its really leaking? As Brian mentioned Earlier, Memory pooling does not give up memory... I run freeswitch at 1000s of concurrent channels... You might not be able to do 5cps under valgrind (this is due to the extensive memory checks valgrind does) but you should be able with in a minute or two determine exactly what (if anything) is actually leaking
From: Sangwoo Jin <swjinjin@volans.kr> Reply-To: <freeswitch-users@lists.freeswitch.org> Date: Thu, 31 Jul 2008 16:39:22 +0900 To: <freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] Memory Leaks
I don't have gotten the same result in testing MOH calls with 15 CPS. The memory usage of freeswitch on testing doesn't grow at some point. But, The memory usage of freeswitch on testing bridged calls with 5CPS and 1 second duration was growing endlessly. I have watched The memory usage of freeswitch becomes 1G bytes.
I attached the scripts of my test. Firstly, execute the scripts like uas_10xx.sh in each shells, and execute call.sh. Then, the following call flows is rotated at 5 CPS. 1000 -> freeswitch -> 1011 1000 -> freeswitch -> 1012 1000 -> freeswitch -> 1013 1000 -> freeswitch -> 1014 1000 -> freeswitch -> 1015 1000 -> freeswitch -> 1016 1000 -> freeswitch -> 1017 1000 -> freeswitch -> 1018 1000 -> freeswitch -> 1019
And, please inform me where I can find the memory pre-allocation codes on freeswitch's starting?
Sangwoo Jin.
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch- users-bounces@lists.freeswitch.org] On Behalf Of Michael Jerris Sent: Thursday, July 31, 2008 3:45 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Memory Leaks
Can you detail the exact callflow, config files and testing methods you used to produce this issue? I suspect that this may be a real issue but we ran sipp testing 2 days ago so your scenario must be hitting an edge case we were not seeing. That being said we have made no efforts to get freeswitch to run in so little memory, in fact we have quite a few things we allocate at switch start that could very well ammount to over 128mb even without calls. You will likely not get it to work reliably with so little memory without some significant modifications.
Mike
On Jul 31, 2008, at 12:07 AM, "Sangwoo Jin" <swjinjin@volans.kr> wrote:
I want to run freeswitch on low memory machine with 128M ram and no swap partition. On testing freeswitch on it, I have always seen the out of memory error. Could I control the memory pools?
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch- users-bounces@lists.freeswitch.org] On Behalf Of Brian West Sent: Thursday, July 31, 2008 11:38 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Memory Leaks
Try running 500,000 calls at 100-200 cps with a duration of 1 second. You'll always see something about lost memory on shut down and you can't fully trust that output due to the usage of memory pools. You'll see a running FreeSWITCH hit a high water mark and level off on memory usage. I suspect that if you do this test with that many calls you'll see the same usage at some point or it will be more pronounced. 100 or 1000 calls isn't enough to really tell what is going on.
/b
On Jul 30, 2008, at 9:25 PM, Sangwoo Jin wrote:
I can't use JIRA because I'm waiting for confirmation of creating account.
Now, I tested again with the current svn trunk. The lost memory of 1000 calls is 10 times more than 100 calls.
The following logs are my filtered valgrind's output. I have removed the lost blocks log which may not have to be free.
Could you check this problem? Sangwoo Jin
= = = = = = === =================================================================== 100 calls' log = = = = = = === =================================================================== ==29384== 284 bytes in 1 blocks are still reachable in loss record 25 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29384== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== ==29384==
==29384== ==29384== 504 bytes in 1 blocks are possibly lost in loss record 30 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29384== ==29384== ==29384== 671 bytes in 8 blocks are possibly lost in loss record 32 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D0273D: header_parse (msg_parser.c:1114) ==29384== by 0x7D025E3: extract_header (msg_parser.c:1071) ==29384== by 0x7D02315: msg_extract_header (msg_parser.c:1008) ==29384== by 0x7D05BD2: msg_header_parse_str (msg_parser.c:2801) ==29384== by 0x7D05B1E: msg_header_add_str (msg_parser.c:2764) ==29384== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29384== by 0x7D42EB4: nua_client_init_request (nua_stack.c: 2278) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== ==29384== ==29384== 1,072 bytes in 2 blocks are possibly lost in loss record 37 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29384== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29384== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29384== by 0x7D46FF7: nua_invite (nua.c:633) ==29384== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29384== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29384== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29384== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29384== by 0x40FC695: dummy_worker (thread.c:138) ==29384== by 0x41EB191: start_thread (in /lib/ libpthread-2.6.1.so) ==29384== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29384== ==29384== ==29384== 1,295 bytes in 21 blocks are still reachable in loss record 38 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D11E7A: msg_header_make (msg_header_make.c:86) ==29384== by 0x7D05A73: msg_header_add_make (msg_parser.c:2729) ==29384== by 0x7D7B503: sip_add_tagis (sip_tag_class.c:256) ==29384== by 0x7D433D8: nua_client_request_template (nua_stack.c: 2377) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== ==29384== ==29384== 28,116 bytes in 99 blocks are indirectly lost in loss record 55 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29384== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== ==29384== ==29384== 52,528 bytes in 98 blocks are definitely lost in loss record 56 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29384== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29384== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29384== by 0x7D46FF7: nua_invite (nua.c:633) ==29384== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29384== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29384== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29384== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29384== by 0x40FC695: dummy_worker (thread.c:138) ==29384== by 0x41EB191: start_thread (in /lib/ libpthread-2.6.1.so) ==29384== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29384== ==29384== ==29384== 57,034 bytes in 871 blocks are indirectly lost in loss record 57 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D11E7A: msg_header_make (msg_header_make.c:86) ==29384== by 0x7D05A73: msg_header_add_make (msg_parser.c:2729) ==29384== by 0x7D7B503: sip_add_tagis (sip_tag_class.c:256) ==29384== by 0x7D42EB4: nua_client_init_request (nua_stack.c: 2278) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== ==29384== ==29384== 135,046 (49,896 direct, 85,150 indirect) bytes in 99 blocks are definitely lost in loss record 58 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29384== ==29384== LEAK SUMMARY: ==29384== definitely lost: 108,035 bytes in 303 blocks. ==29384== indirectly lost: 85,177 bytes in 972 blocks. ==29384== possibly lost: 2,535 bytes in 13 blocks. ==29384== still reachable: 16,325,250 bytes in 524 blocks. ==29384== suppressed: 0 bytes in 0 blocks.
= = = = = = === =================================================================== 1000 calls' log = = = = = = === =================================================================== ==29612== ==29612== 3,024 bytes in 6 blocks are still reachable in loss record 39 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 3,692 bytes in 13 blocks are possibly lost in loss record 43 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 4,322 bytes in 55 blocks are possibly lost in loss record 47 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D9CAA2: su_strdup (su_strdup.c:55) ==29612== by 0x7D05AF3: msg_header_add_str (msg_parser.c:2759) ==29612== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29612== by 0x7D42EB4: nua_client_init_request (nua_stack.c: 2278) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 5,360 bytes in 10 blocks are still reachable in loss record 49 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/ libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 5,360 bytes in 10 blocks are possibly lost in loss record 50 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397)
Sangwoo Jin wrote:
I don't have gotten the same result in testing MOH calls with 15 CPS. The memory usage of freeswitch on testing doesn't grow at some point. But, The memory usage of freeswitch on testing bridged calls with 5CPS and 1 second duration was growing endlessly. I have watched The memory usage of freeswitch becomes 1G bytes.
I attached the scripts of my test. Firstly, execute the scripts like uas_10xx.sh in each shells, and execute call.sh. Then, the following call flows is rotated at 5 CPS. 1000 -> freeswitch -> 1011 1000 -> freeswitch -> 1012 1000 -> freeswitch -> 1013 1000 -> freeswitch -> 1014 1000 -> freeswitch -> 1015 1000 -> freeswitch -> 1016 1000 -> freeswitch -> 1017 1000 -> freeswitch -> 1018 1000 -> freeswitch -> 1019
And, please inform me where I can find the memory pre-allocation codes on freeswitch's starting?
Take a look at at: libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c If you still think there is a memory leak you should really post on JIRA. As Mike already pointed out this is definitely where you should post when you think you have found a bug. JIRA provides facilities (tar up your sipp scenario + fs config, and valgrind output) so someone that is very familiar with the fs code can take a look. If they tell you that it's not leaking it almost certainly isn't. As Mike said there *might* be a leak...and it's probably doesn't even eat 1k of mem. If you have some embedded requirements you should join the irc channel as there is most certainly someone in there who can explain how to tune-down fs (assuming it's possible).
OK, I'll post this problem, reproduction method and memory usage on JIRA. Thank you very much for your helps. Sangwoo Jin.
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch- users-bounces@lists.freeswitch.org] On Behalf Of John Skopis (Lists) Sent: Thursday, July 31, 2008 9:43 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Memory Leaks
Sangwoo Jin wrote:
I don't have gotten the same result in testing MOH calls with 15 CPS. The memory usage of freeswitch on testing doesn't grow at some point. But, The memory usage of freeswitch on testing bridged calls with 5CPS and 1 second duration was growing endlessly. I have watched The memory usage of freeswitch becomes 1G bytes.
I attached the scripts of my test. Firstly, execute the scripts like uas_10xx.sh in each shells, and execute call.sh. Then, the following call flows is rotated at 5 CPS. 1000 -> freeswitch -> 1011 1000 -> freeswitch -> 1012 1000 -> freeswitch -> 1013 1000 -> freeswitch -> 1014 1000 -> freeswitch -> 1015 1000 -> freeswitch -> 1016 1000 -> freeswitch -> 1017 1000 -> freeswitch -> 1018 1000 -> freeswitch -> 1019
And, please inform me where I can find the memory pre-allocation codes on freeswitch's starting?
Take a look at at: libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c
If you still think there is a memory leak you should really post on JIRA. As Mike already pointed out this is definitely where you should post when you think you have found a bug. JIRA provides facilities (tar up your sipp scenario + fs config, and valgrind output) so someone that is very familiar with the fs code can take a look.
If they tell you that it's not leaking it almost certainly isn't.
As Mike said there *might* be a leak...and it's probably doesn't even eat 1k of mem.
If you have some embedded requirements you should join the irc channel as there is most certainly someone in there who can explain how to tune-down fs (assuming it's possible).
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
don't forget to upgrade to SVN trunk first before you test it and post to jira. On Thu, Jul 31, 2008 at 8:42 PM, Sangwoo Jin <swjinjin@volans.kr> wrote:
OK, I'll post this problem, reproduction method and memory usage on JIRA. Thank you very much for your helps. Sangwoo Jin.
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch- users-bounces@lists.freeswitch.org] On Behalf Of John Skopis (Lists) Sent: Thursday, July 31, 2008 9:43 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Memory Leaks
Sangwoo Jin wrote:
I don't have gotten the same result in testing MOH calls with 15 CPS. The memory usage of freeswitch on testing doesn't grow at some point. But, The memory usage of freeswitch on testing bridged calls with 5CPS and 1 second duration was growing endlessly. I have watched The memory usage of freeswitch becomes 1G bytes.
I attached the scripts of my test. Firstly, execute the scripts like uas_10xx.sh in each shells, and execute call.sh. Then, the following call flows is rotated at 5 CPS. 1000 -> freeswitch -> 1011 1000 -> freeswitch -> 1012 1000 -> freeswitch -> 1013 1000 -> freeswitch -> 1014 1000 -> freeswitch -> 1015 1000 -> freeswitch -> 1016 1000 -> freeswitch -> 1017 1000 -> freeswitch -> 1018 1000 -> freeswitch -> 1019
And, please inform me where I can find the memory pre-allocation codes on freeswitch's starting?
Take a look at at: libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c
If you still think there is a memory leak you should really post on JIRA. As Mike already pointed out this is definitely where you should post when you think you have found a bug. JIRA provides facilities (tar up your sipp scenario + fs config, and valgrind output) so someone that is very familiar with the fs code can take a look.
If they tell you that it's not leaking it almost certainly isn't.
As Mike said there *might* be a leak...and it's probably doesn't even eat 1k of mem.
If you have some embedded requirements you should join the irc channel as there is most certainly someone in there who can explain how to tune-down fs (assuming it's possible).
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
did anyone ask you if you are running the current trunk revision? What is the exact dialplan on FreeSWITCH that these extensions hit? and the exact procedure you took to run the test. You gave us the files but not any instructions. And you still have not given me exact memory usage numbers both resident and virtual. Please address all of the above questions in your reply not just some of them and I will investigate it. On Thu, Jul 31, 2008 at 2:39 AM, Sangwoo Jin <swjinjin@volans.kr> wrote:
I don't have gotten the same result in testing MOH calls with 15 CPS. The memory usage of freeswitch on testing doesn't grow at some point. But, The memory usage of freeswitch on testing bridged calls with 5CPS and 1 second duration was growing endlessly. I have watched The memory usage of freeswitch becomes 1G bytes.
I attached the scripts of my test. Firstly, execute the scripts like uas_10xx.sh in each shells, and execute call.sh. Then, the following call flows is rotated at 5 CPS. 1000 -> freeswitch -> 1011 1000 -> freeswitch -> 1012 1000 -> freeswitch -> 1013 1000 -> freeswitch -> 1014 1000 -> freeswitch -> 1015 1000 -> freeswitch -> 1016 1000 -> freeswitch -> 1017 1000 -> freeswitch -> 1018 1000 -> freeswitch -> 1019
And, please inform me where I can find the memory pre-allocation codes on freeswitch's starting?
Sangwoo Jin.
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch- users-bounces@lists.freeswitch.org] On Behalf Of Michael Jerris Sent: Thursday, July 31, 2008 3:45 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Memory Leaks
Can you detail the exact callflow, config files and testing methods you used to produce this issue? I suspect that this may be a real issue but we ran sipp testing 2 days ago so your scenario must be hitting an edge case we were not seeing. That being said we have made no efforts to get freeswitch to run in so little memory, in fact we have quite a few things we allocate at switch start that could very well ammount to over 128mb even without calls. You will likely not get it to work reliably with so little memory without some significant modifications.
Mike
On Jul 31, 2008, at 12:07 AM, "Sangwoo Jin" <swjinjin@volans.kr> wrote:
I want to run freeswitch on low memory machine with 128M ram and no swap partition. On testing freeswitch on it, I have always seen the out of memory error. Could I control the memory pools?
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch- users-bounces@lists.freeswitch.org] On Behalf Of Brian West Sent: Thursday, July 31, 2008 11:38 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Memory Leaks
Try running 500,000 calls at 100-200 cps with a duration of 1 second. You'll always see something about lost memory on shut down and you can't fully trust that output due to the usage of memory pools. You'll see a running FreeSWITCH hit a high water mark and level off on memory usage. I suspect that if you do this test with that many calls you'll see the same usage at some point or it will be more pronounced. 100 or 1000 calls isn't enough to really tell what is going on.
/b
On Jul 30, 2008, at 9:25 PM, Sangwoo Jin wrote:
I can't use JIRA because I'm waiting for confirmation of creating account.
Now, I tested again with the current svn trunk. The lost memory of 1000 calls is 10 times more than 100 calls.
The following logs are my filtered valgrind's output. I have removed the lost blocks log which may not have to be free.
Could you check this problem? Sangwoo Jin
= = = = = = === =================================================================== 100 calls' log = = = = = = === =================================================================== ==29384== 284 bytes in 1 blocks are still reachable in loss record 25 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29384== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== ==29384==
==29384== ==29384== 504 bytes in 1 blocks are possibly lost in loss record 30 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29384== ==29384== ==29384== 671 bytes in 8 blocks are possibly lost in loss record 32 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D0273D: header_parse (msg_parser.c:1114) ==29384== by 0x7D025E3: extract_header (msg_parser.c:1071) ==29384== by 0x7D02315: msg_extract_header (msg_parser.c:1008) ==29384== by 0x7D05BD2: msg_header_parse_str (msg_parser.c:2801) ==29384== by 0x7D05B1E: msg_header_add_str (msg_parser.c:2764) ==29384== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29384== by 0x7D42EB4: nua_client_init_request (nua_stack.c: 2278) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== ==29384== ==29384== 1,072 bytes in 2 blocks are possibly lost in loss record 37 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29384== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29384== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29384== by 0x7D46FF7: nua_invite (nua.c:633) ==29384== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29384== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29384== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29384== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29384== by 0x40FC695: dummy_worker (thread.c:138) ==29384== by 0x41EB191: start_thread (in /lib/ libpthread-2.6.1.so) ==29384== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29384== ==29384== ==29384== 1,295 bytes in 21 blocks are still reachable in loss record 38 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D11E7A: msg_header_make (msg_header_make.c:86) ==29384== by 0x7D05A73: msg_header_add_make (msg_parser.c:2729) ==29384== by 0x7D7B503: sip_add_tagis (sip_tag_class.c:256) ==29384== by 0x7D433D8: nua_client_request_template (nua_stack.c: 2377) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== ==29384== ==29384== 28,116 bytes in 99 blocks are indirectly lost in loss record 55 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29384== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== ==29384== ==29384== 52,528 bytes in 98 blocks are definitely lost in loss record 56 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29384== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29384== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29384== by 0x7D46FF7: nua_invite (nua.c:633) ==29384== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29384== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29384== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29384== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29384== by 0x40FC695: dummy_worker (thread.c:138) ==29384== by 0x41EB191: start_thread (in /lib/ libpthread-2.6.1.so) ==29384== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29384== ==29384== ==29384== 57,034 bytes in 871 blocks are indirectly lost in loss record 57 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D11E7A: msg_header_make (msg_header_make.c:86) ==29384== by 0x7D05A73: msg_header_add_make (msg_parser.c:2729) ==29384== by 0x7D7B503: sip_add_tagis (sip_tag_class.c:256) ==29384== by 0x7D42EB4: nua_client_init_request (nua_stack.c: 2278) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== ==29384== ==29384== 135,046 (49,896 direct, 85,150 indirect) bytes in 99 blocks are definitely lost in loss record 58 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29384== ==29384== LEAK SUMMARY: ==29384== definitely lost: 108,035 bytes in 303 blocks. ==29384== indirectly lost: 85,177 bytes in 972 blocks. ==29384== possibly lost: 2,535 bytes in 13 blocks. ==29384== still reachable: 16,325,250 bytes in 524 blocks. ==29384== suppressed: 0 bytes in 0 blocks.
= = = = = = === =================================================================== 1000 calls' log = = = = = = === =================================================================== ==29612== ==29612== 3,024 bytes in 6 blocks are still reachable in loss record 39 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 3,692 bytes in 13 blocks are possibly lost in loss record 43 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 4,322 bytes in 55 blocks are possibly lost in loss record 47 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D9CAA2: su_strdup (su_strdup.c:55) ==29612== by 0x7D05AF3: msg_header_add_str (msg_parser.c:2759) ==29612== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29612== by 0x7D42EB4: nua_client_init_request (nua_stack.c: 2278) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 5,360 bytes in 10 blocks are still reachable in loss record 49 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/ libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 5,360 bytes in 10 blocks are possibly lost in loss record 50 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/ libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 7,056 bytes in 14 blocks are possibly lost in loss record 51 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 9,940 bytes in 35 blocks are still reachable in loss record 54 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== ==29612== 43,590 bytes in 663 blocks are still reachable in loss record 57 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D9CAA2: su_strdup (su_strdup.c:55) ==29612== by 0x7DA8FC9: su_vsprintf (su_sprintf.c:80) ==29612== by 0x7DA90FA: su_sprintf (su_sprintf.c:125) ==29612== by 0x7D75737: sip_addr_tag (sip_basic.c:993) ==29612== by 0x7D765F1: sip_from_tag (sip_basic.c:1857) ==29612== by 0x7D43155: nua_client_init_request (nua_stack.c: 2322) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== ==29612== ==29612== 55,728 bytes in 1 blocks are still reachable in loss record 58 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0xFCE0A57: sf_open (sndfile.c:285) ==29612== by 0xFCD9FD3: ??? (mod_sndfile.c:174) ==29612== by 0x40A04A1: switch_core_perform_file_open (switch_core_file.c:100) ==29612== by 0xFD3549A: ??? (mod_local_stream.c:178) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/ libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 270,368 bytes in 952 blocks are indirectly lost in loss record 59 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 542,088 bytes in 8,282 blocks are indirectly lost in loss record 60 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29612== by 0x7D0273D: header_parse (msg_parser.c:1114) ==29612== by 0x7D025E3: extract_header (msg_parser.c:1071) ==29612== by 0x7D02315: msg_extract_header (msg_parser.c:1008) ==29612== by 0x7D05BD2: msg_header_parse_str (msg_parser.c:2801) ==29612== by 0x7D05B1E: msg_header_add_str (msg_parser.c:2764) ==29612== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29612== by 0x7D42EB4: nua_client_init_request (nua_stack.c: 2278) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== ==29612== ==29612== 1,305,502 (493,920 direct, 811,582 indirect) bytes in 980 blocks are definitely lost in loss record 62 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c: 2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 526,154 (525,280 direct, 874 indirect) bytes in 980 blocks are definitely lost in loss record 63 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/ libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== LEAK SUMMARY: ==29612== definitely lost: 1,024,811 bytes in 2,066 blocks. ==29612== indirectly lost: 812,483 bytes in 9,236 blocks. ==29612== possibly lost: 20,718 bytes in 94 blocks. ==29612== still reachable: 16,441,313 bytes in 1,217 blocks. ==29612== suppressed: 0 bytes in 0 blocks.
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-
users-bounces@lists.freeswitch.org] On Behalf Of Michael Jerris Sent: Wednesday, July 30, 2008 11:26 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Memory Leaks
On Jul 30, 2008, at 8:33 AM, Sangwoo Jin wrote:
> Hi, > > I I'm testing freeswitch with sipp. > My test configuration is the following: > Sipp(caller) -> freeswitch -> Sipp(callee)s > Testing loads are 5 CPS ~ 30 CPS and caller has hanged up a call > as > soon as > receiving 200 OK. > > In this testing environment, freeswitch's used memory is growing > continuously. > > The following is the valgrind's log on testing with 5 CPS 100 > calls. > <snip>
> > > Is this problem's cause configuration mistake or freeswitch's bug? > > Sangwoo Jin > >
You will need to compare the valgrind output from about 100 calls to about 1000 calls to see which are actually larger. Also, please make sure you are using current svn trunk. Most of the items in that list appear to be things that we allocate at startup and never bother to free as they are free when the application stops. Those items are supposed to be allocated for the entire life of the switch. If you have reports that are definitely more please report this to our bug tracker at http://jira.freeswitch.org with exact details how you are testing including how you are initiating the call and your dialplan.
Mike
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch- users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch- users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch- users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
I have fs running in a 64MB system, a 450MHz arm with no cache (or hard drive). I have very few calls running at the same time ~5 channels max, and I see a memory usage of about 20-23MB. I have not done any load testing like you describe, but during a bridged call the fs CPU load is not measurable (no transcoding). To get to this I did delete all the optional freeswitch modules that I was not using, that made a noticeable difference. If you don't need the language modules you can also save more space by excluding switch_cpp.cpp from the build. I use mod_sofia, mod_console, mod_syslog, mod_ilbc, mod_event_socket, mod_commands, mod_conference, mod_dptools, mod_expr, mod_limit, mod_esf, mod_fsv, mod_dialplan_xml and a custom module. Edit autoload_configs/modules.conf.xml to exclude the modules you don't need. Simon On 7/30/08 9:07 PM, "Sangwoo Jin" <swjinjin@volans.kr> wrote:
I want to run freeswitch on low memory machine with 128M ram and no swap partition. On testing freeswitch on it, I have always seen the out of memory error. Could I control the memory pools?
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch- users-bounces@lists.freeswitch.org] On Behalf Of Brian West Sent: Thursday, July 31, 2008 11:38 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Memory Leaks
Try running 500,000 calls at 100-200 cps with a duration of 1 second. You'll always see something about lost memory on shut down and you can't fully trust that output due to the usage of memory pools. You'll see a running FreeSWITCH hit a high water mark and level off on memory usage. I suspect that if you do this test with that many calls you'll see the same usage at some point or it will be more pronounced. 100 or 1000 calls isn't enough to really tell what is going on.
/b
On Jul 30, 2008, at 9:25 PM, Sangwoo Jin wrote:
I can't use JIRA because I'm waiting for confirmation of creating account.
Now, I tested again with the current svn trunk. The lost memory of 1000 calls is 10 times more than 100 calls.
The following logs are my filtered valgrind's output. I have removed the lost blocks log which may not have to be free.
Could you check this problem? Sangwoo Jin
= = = = = = ====================================================================== 100 calls' log = = = = = = ====================================================================== ==29384== 284 bytes in 1 blocks are still reachable in loss record 25 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29384== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== ==29384==
==29384== ==29384== 504 bytes in 1 blocks are possibly lost in loss record 30 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29384== ==29384== ==29384== 671 bytes in 8 blocks are possibly lost in loss record 32 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D0273D: header_parse (msg_parser.c:1114) ==29384== by 0x7D025E3: extract_header (msg_parser.c:1071) ==29384== by 0x7D02315: msg_extract_header (msg_parser.c:1008) ==29384== by 0x7D05BD2: msg_header_parse_str (msg_parser.c:2801) ==29384== by 0x7D05B1E: msg_header_add_str (msg_parser.c:2764) ==29384== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29384== by 0x7D42EB4: nua_client_init_request (nua_stack.c:2278) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== ==29384== ==29384== 1,072 bytes in 2 blocks are possibly lost in loss record 37 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29384== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29384== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29384== by 0x7D46FF7: nua_invite (nua.c:633) ==29384== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29384== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29384== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29384== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29384== by 0x40FC695: dummy_worker (thread.c:138) ==29384== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29384== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29384== ==29384== ==29384== 1,295 bytes in 21 blocks are still reachable in loss record 38 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D11E7A: msg_header_make (msg_header_make.c:86) ==29384== by 0x7D05A73: msg_header_add_make (msg_parser.c:2729) ==29384== by 0x7D7B503: sip_add_tagis (sip_tag_class.c:256) ==29384== by 0x7D433D8: nua_client_request_template (nua_stack.c: 2377) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== ==29384== ==29384== 28,116 bytes in 99 blocks are indirectly lost in loss record 55 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29384== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== ==29384== ==29384== 52,528 bytes in 98 blocks are definitely lost in loss record 56 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29384== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29384== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29384== by 0x7D46FF7: nua_invite (nua.c:633) ==29384== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29384== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29384== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29384== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29384== by 0x40FC695: dummy_worker (thread.c:138) ==29384== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29384== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29384== ==29384== ==29384== 57,034 bytes in 871 blocks are indirectly lost in loss record 57 of 60 ==29384== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29384== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29384== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29384== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29384== by 0x7D11E7A: msg_header_make (msg_header_make.c:86) ==29384== by 0x7D05A73: msg_header_add_make (msg_parser.c:2729) ==29384== by 0x7D7B503: sip_add_tagis (sip_tag_class.c:256) ==29384== by 0x7D42EB4: nua_client_init_request (nua_stack.c:2278) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== ==29384== ==29384== 135,046 (49,896 direct, 85,150 indirect) bytes in 99 blocks are definitely lost in loss record 58 of 60 ==29384== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29384== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29384== by 0x7D06390: msg_create (msg.c:61) ==29384== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29384== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29384== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29384== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29384== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29384== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29384== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29384== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29384== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29384== ==29384== LEAK SUMMARY: ==29384== definitely lost: 108,035 bytes in 303 blocks. ==29384== indirectly lost: 85,177 bytes in 972 blocks. ==29384== possibly lost: 2,535 bytes in 13 blocks. ==29384== still reachable: 16,325,250 bytes in 524 blocks. ==29384== suppressed: 0 bytes in 0 blocks.
= = = = = = ====================================================================== 1000 calls' log = = = = = = ====================================================================== ==29612== ==29612== 3,024 bytes in 6 blocks are still reachable in loss record 39 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 3,692 bytes in 13 blocks are possibly lost in loss record 43 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 4,322 bytes in 55 blocks are possibly lost in loss record 47 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D9CAA2: su_strdup (su_strdup.c:55) ==29612== by 0x7D05AF3: msg_header_add_str (msg_parser.c:2759) ==29612== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29612== by 0x7D42EB4: nua_client_init_request (nua_stack.c:2278) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 5,360 bytes in 10 blocks are still reachable in loss record 49 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 5,360 bytes in 10 blocks are possibly lost in loss record 50 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 7,056 bytes in 14 blocks are possibly lost in loss record 51 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 9,940 bytes in 35 blocks are still reachable in loss record 54 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== ==29612== 43,590 bytes in 663 blocks are still reachable in loss record 57 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D9CAA2: su_strdup (su_strdup.c:55) ==29612== by 0x7DA8FC9: su_vsprintf (su_sprintf.c:80) ==29612== by 0x7DA90FA: su_sprintf (su_sprintf.c:125) ==29612== by 0x7D75737: sip_addr_tag (sip_basic.c:993) ==29612== by 0x7D765F1: sip_from_tag (sip_basic.c:1857) ==29612== by 0x7D43155: nua_client_init_request (nua_stack.c:2322) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== ==29612== ==29612== 55,728 bytes in 1 blocks are still reachable in loss record 58 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0xFCE0A57: sf_open (sndfile.c:285) ==29612== by 0xFCD9FD3: ??? (mod_sndfile.c:174) ==29612== by 0x40A04A1: switch_core_perform_file_open (switch_core_file.c:100) ==29612== by 0xFD3549A: ??? (mod_local_stream.c:178) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== ==29612== 270,368 bytes in 952 blocks are indirectly lost in loss record 59 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98B43: su_hash_alloc (su_alloc.c:390) ==29612== by 0x7D98CDE: su_home_new (su_alloc.c:562) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== ==29612== ==29612== 542,088 bytes in 8,282 blocks are indirectly lost in loss record 60 of 64 ==29612== at 0x4022B08: malloc (vg_replace_malloc.c:207) ==29612== by 0x7D989A2: sub_alloc (su_alloc.c:490) ==29612== by 0x7D9929E: su_alloc (su_alloc.c:771) ==29612== by 0x7D04E15: msg_header_alloc (msg_parser.c:2309) ==29612== by 0x7D0273D: header_parse (msg_parser.c:1114) ==29612== by 0x7D025E3: extract_header (msg_parser.c:1071) ==29612== by 0x7D02315: msg_extract_header (msg_parser.c:1008) ==29612== by 0x7D05BD2: msg_header_parse_str (msg_parser.c:2801) ==29612== by 0x7D05B1E: msg_header_add_str (msg_parser.c:2764) ==29612== by 0x7D7B534: sip_add_tagis (sip_tag_class.c:260) ==29612== by 0x7D42EB4: nua_client_init_request (nua_stack.c:2278) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== ==29612== ==29612== 1,305,502 (493,920 direct, 811,582 indirect) bytes in 980 blocks are definitely lost in loss record 62 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D98CC1: su_home_new (su_alloc.c:559) ==29612== by 0x7D06390: msg_create (msg.c:61) ==29612== by 0x7D2490A: nta_msg_create (nta.c:2831) ==29612== by 0x7D4336A: nua_client_request_template (nua_stack.c: 2361) ==29612== by 0x7D42C8E: nua_client_init_request (nua_stack.c:2223) ==29612== by 0x7D4256D: nua_client_create (nua_stack.c:2043) ==29612== by 0x7D55125: nua_stack_invite (nua_session.c:701) ==29612== by 0x7D3EA92: nua_stack_signal (nua_stack.c:592) ==29612== by 0x7DA2FA9: su_base_port_execute_msgs (su_base_port.c: 276) ==29612== by 0x7DA2D50: su_base_port_getmsgs (su_base_port.c:198) ==29612== by 0x7DA3084: su_base_port_run (su_base_port.c:331) ==29612== ==29612== ==29612== 526,154 (525,280 direct, 874 indirect) bytes in 980 blocks are definitely lost in loss record 63 of 64 ==29612== at 0x4021C2E: calloc (vg_replace_malloc.c:397) ==29612== by 0x7D9ABB4: su_zalloc (su_alloc.c:1437) ==29612== by 0x7DA0A84: su_msg_new (su_root.c:901) ==29612== by 0x7D3E4CB: nua_signal (nua_stack.c:495) ==29612== by 0x7D46FF7: nua_invite (nua.c:633) ==29612== by 0x7CEB0DE: sofia_glue_do_invite (sofia_glue.c:1305) ==29612== by 0x7CCA773: sofia_on_init (mod_sofia.c:99) ==29612== by 0x40A630D: switch_core_session_run (switch_core_state_machine.c:415) ==29612== by 0x40A52F4: switch_core_session_thread (switch_core_session.c:787) ==29612== by 0x40FC695: dummy_worker (thread.c:138) ==29612== by 0x41EB191: start_thread (in /lib/libpthread-2.6.1.so) ==29612== by 0x42F502D: clone (in /lib/libc-2.6.1.so) ==29612== ==29612== LEAK SUMMARY: ==29612== definitely lost: 1,024,811 bytes in 2,066 blocks. ==29612== indirectly lost: 812,483 bytes in 9,236 blocks. ==29612== possibly lost: 20,718 bytes in 94 blocks. ==29612== still reachable: 16,441,313 bytes in 1,217 blocks. ==29612== suppressed: 0 bytes in 0 blocks.
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch- users-bounces@lists.freeswitch.org] On Behalf Of Michael Jerris Sent: Wednesday, July 30, 2008 11:26 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Memory Leaks
On Jul 30, 2008, at 8:33 AM, Sangwoo Jin wrote:
Hi,
I I'm testing freeswitch with sipp. My test configuration is the following: Sipp(caller) -> freeswitch -> Sipp(callee)s Testing loads are 5 CPS ~ 30 CPS and caller has hanged up a call as soon as receiving 200 OK.
In this testing environment, freeswitch's used memory is growing continuously.
The following is the valgrind's log on testing with 5 CPS 100 calls.
<snip>
Is this problem's cause configuration mistake or freeswitch's bug?
Sangwoo Jin
You will need to compare the valgrind output from about 100 calls to about 1000 calls to see which are actually larger. Also, please make sure you are using current svn trunk. Most of the items in that list appear to be things that we allocate at startup and never bother to free as they are free when the application stops. Those items are supposed to be allocated for the entire life of the switch. If you have reports that are definitely more please report this to our bug tracker at http://jira.freeswitch.org with exact details how you are testing including how you are initiating the call and your dialplan.
Mike
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-
users
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (7)
-
Anthony Minessale
-
Brian West
-
John Skopis (Lists)
-
Ken Rice
-
Michael Jerris
-
Sangwoo Jin
-
Simon Capper