Open tsawyer opened 1 year ago
valgrind -s --leak-check=full --show-leak-kinds=all asterisk -g
==2028789== Memcheck, a memory error detector
==2028789== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==2028789== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info
==2028789== Command: asterisk -g
==2028789==
==2028789==
==2028789== HEAP SUMMARY:
==2028789== in use at exit: 3,818 bytes in 18 blocks
==2028789== total heap usage: 64 allocs, 46 frees, 85,741 bytes allocated
==2028789==
==2028789== 40 bytes in 1 blocks are possibly lost in loss record 1 of 3
==2028789== at 0x483AB65: calloc (vg_replace_malloc.c:760)
==2028789== by 0x52046E5: cap_init (in /usr/lib/x86_64-linux-gnu/libcap.so.2.44)
==2028789== by 0x5206060: cap_from_text (in /usr/lib/x86_64-linux-gnu/libcap.so.2.44)
==2028789== by 0x14E441: main (asterisk.c:4025)
==2028789==
==2028789== 93 bytes in 1 blocks are still reachable in loss record 2 of 3
==2028789== at 0x483AB65: calloc (vg_replace_malloc.c:760)
==2028789== by 0x1745E7: __ast_repl_calloc (astmm.c:1537)
==2028789== by 0x1745E7: __ast_calloc (astmm.c:1607)
==2028789== by 0x300310: cfmtime_new (config.c:1664)
==2028789== by 0x300310: config_text_file_load (config.c:2236)
==2028789== by 0x2FEAA5: ast_config_internal_load (config.c:3231)
==2028789== by 0x3018AE: ast_config_load2 (config.c:3252)
==2028789== by 0x231725: load_asterisk_conf (options.c:235)
==2028789== by 0x14E1D4: main (asterisk.c:3610)
==2028789==
==2028789== 3,685 bytes in 16 blocks are still reachable in loss record 3 of 3
==2028789== at 0x483AB65: calloc (vg_replace_malloc.c:760)
==2028789== by 0x21B251: ast_module_register (loader.c:664)
==2028789== by 0x3566C4: __libc_csu_init (in /usr/sbin/asterisk)
==2028789== by 0x53E8C99: (below main) (libc-start.c:264)
==2028789==
==2028789== LEAK SUMMARY:
==2028789== definitely lost: 0 bytes in 0 blocks
==2028789== indirectly lost: 0 bytes in 0 blocks
==2028789== possibly lost: 40 bytes in 1 blocks
==2028789== still reachable: 3,778 bytes in 17 blocks
==2028789== suppressed: 0 bytes in 0 blocks
==2028789==
==2028789== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
When running valgrind with Asterisk in the foreground valgrind -s --leak-check=full --show-leak-kinds=all asterisk -g -f
Asterisk doesn't crash until exit. Here's my ssh terminal session capture.
I think the first thing is an issue with res_rpt_http_registrations
, whenever there's a 5xx error. I've noticed that pattern in a few reports now. I'll try to see what's up with that.
valgrind often results in different behavior so not surprising that it didn't crash, though I'd have expected to see an error, I think the 1 error might be the "possible" leak.
This one is a little old. 2509 is the node here at my house. Runs chan_echolink, chan_voter and chan_simpleusb.
From the log.
There were a number of restarts that day.
core-asterisk-2023-08-03T10-25-55Z-full.txt