[asterisk-bugs] [Asterisk 0013160]: Memory leak in iax2-parser.c
Asterisk Bug Tracker
noreply at bugs.digium.com
Thu Jul 31 07:41:25 CDT 2008
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=13160
======================================================================
Reported By: tavius
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 13160
Category: Channels/chan_iax2
Reproducibility: always
Severity: major
Priority: normal
Status: feedback
Asterisk Version: 1.4.21.2
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 2008-07-25 10:10 CDT
Last Modified: 2008-07-31 07:41 CDT
======================================================================
Summary: Memory leak in iax2-parser.c
Description:
We have found compiling asterisk without LOW_MEMORY has a memory leak in
iax_frame_new. It seems that the AST_LIST_TRAVERSE_SAFE_BEGIN macro is not
traversing the linked list in good way.
We have traced adding some ast_log in the code that iax_frame_free add
buffers in the frame cache linked list and after that iax_frame_new does
not find this free buffer in the list and allocates a new buffer with
ast_calloc_cache.
With the time and with our system, that receives too many calls, asterisk
gets all the available memory in the system and produces an error.
If we compile with LOW_MEMORY, then this piece of code is not compiled and
asterisk does not have memory leaks.
======================================================================
----------------------------------------------------------------------
(0090899) tavius (reporter) - 2008-07-31 07:41
http://bugs.digium.com/view.php?id=13160#c90899
----------------------------------------------------------------------
ops, first call, three seconds and this:
[2008-07-31 13:47:37] ERROR[27861]: iax2-parser.c:1034 iax_frame_free:
Frame cache full for thread 3066825616
[2008-07-31 13:47:37] ERROR[27861]: utils.c:861 ast_log_thread_info:
Thread 'iax2_process_thread started at [ 9130] chan_iax2.c
start_network_thread()' ID '3066825616'
[2008-07-31 13:47:37] ERROR[27861]: iax2-parser.c:1034 iax_frame_free:
Frame cache full for thread 3066825616
[2008-07-31 13:47:37] ERROR[27861]: utils.c:861 ast_log_thread_info:
Thread 'iax2_process_thread started at [ 9130] chan_iax2.c
start_network_thread()' ID '3066825616'
[2008-07-31 13:47:37] ERROR[27861]: iax2-parser.c:1034 iax_frame_free:
Frame cache full for thread 3066825616
[2008-07-31 13:47:37] ERROR[27861]: utils.c:861 ast_log_thread_info:
Thread 'iax2_process_thread started at [ 9130] chan_iax2.c
start_network_thread()' ID '3066825616'
[2008-07-31 13:47:38] ERROR[27861]: iax2-parser.c:1034 iax_frame_free:
Frame cache full for thread 3066825616
[2008-07-31 13:47:38] ERROR[27861]: utils.c:861 ast_log_thread_info:
Thread 'iax2_process_thread started at [ 9130] chan_iax2.c
start_network_thread()' ID '3066825616'
[2008-07-31 13:47:39] ERROR[27861]: iax2-parser.c:1034 iax_frame_free:
Frame cache full for thread 3066825616
[2008-07-31 13:47:39] ERROR[27861]: utils.c:861 ast_log_thread_info:
Thread 'iax2_process_thread started at [ 9130] chan_iax2.c
start_network_thread()' ID '3066825616'
[2008-07-31 13:47:39] ERROR[27861]: iax2-parser.c:1034 iax_frame_free:
Frame cache full for thread 3066825616
[2008-07-31 13:47:39] ERROR[27861]: utils.c:861 ast_log_thread_info:
Thread 'iax2_process_thread started at [ 9130] chan_iax2.c
start_network_thread()' ID '3066825616'
[2008-07-31 13:47:39] ERROR[27861]: iax2-parser.c:1034 iax_frame_free:
Frame cache full for thread 3066825616
[2008-07-31 13:47:39] ERROR[27861]: utils.c:861 ast_log_thread_info:
Thread 'iax2_process_thread started at [ 9130] chan_iax2.c
start_network_thread()' ID '3066825616'
Issue History
Date Modified Username Field Change
======================================================================
2008-07-31 07:41 tavius Note Added: 0090899
======================================================================
More information about the asterisk-bugs
mailing list