[asterisk-bugs] [Asterisk 0009327]: Manager Dropping Events Under Moderate Call Load

noreply at bugs.digium.com noreply at bugs.digium.com
Tue Nov 6 15:31:57 CST 2007


The following issue has been RESOLVED. 
====================================================================== 
http://bugs.digium.com/view.php?id=9327 
====================================================================== 
Reported By:                dgarstang
Assigned To:                bweschke
====================================================================== 
Project:                    Asterisk
Issue ID:                   9327
Category:                   Core/ManagerInterface
Reproducibility:            sometimes
Severity:                   minor
Priority:                   normal
Status:                     resolved
Asterisk Version:           1.4.1 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        No 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             03-20-2007 13:28 CDT
Last Modified:              11-06-2007 15:31 CST
====================================================================== 
Summary:                    Manager Dropping Events Under Moderate Call Load
Description: 
Asterisk 1.4.1.

The Manager interface seems to drop events under moderate call load.

I am initiating calls to Asterisk with SIPP:
sipp tp-test5 -sn uac -m 200 -s 1xxx2423021 -d 65000 -l 200 -r 7 -rp 1

At the same time I am running an ngrep on the manager port:
ngrep -d eth1 port 5038 > foo

Seven calls per second is not an extremely high number. However, the
manager interface seems to be dropping or missing sending NewChannel
events. 

Specifically, I am monitoring Newchannnel and Hangup events. When
initiating new calls, if the number of calls per second, reaches some
thresh-hold (around 7), then the manager interface does not send all the
events over the socket. This is evidenced by the ouput of the ngrep
command.

When calls are being disconnected, SIPP always disconnects at about 10
calls per second, which just about always results in the manager interface
not sending Hangup events over the socket. In one example, I started new
calls at 5 per second, and the manager interface sent all of those.
However, on call teardown, it did not send 11 hangup events.

Under load the events should be delayed, not dropped!

The system is a single CPU 2.0Ghz machine.

====================================================================== 

---------------------------------------------------------------------- 
 russell - 11-06-07 15:31  
---------------------------------------------------------------------- 
It is likely that the changes in the following two commits fixed this
problem.  However, if anyone still experiences the issue after running a
version that includes these fixes (at least 1.4.12), then I'd like to know
about it.

Thanks!

------------------------------------------------------------------------
r83121 | russell | 2007-09-19 10:10:14 -0500 (Wed, 19 Sep 2007) | 4 lines

Fix up another potential race condition.  Do the loop decrementing use
count
on events with the eventq protected from being changed.
(reported on IRC by Ivan)

------------------------------------------------------------------------
------------------------------------------------------------------------
r82867 | russell | 2007-09-18 15:56:43 -0500 (Tue, 18 Sep 2007) | 10
lines

Fix a memory leak that can occur on systems under higher load.  The issue
is
that when events are appended to the master event queue, they use the
number
of active sessions as a use count so it will know when all active
sessions
at the time the event happened have consumed it.  However, the handling
of
the number of sessions was not properly synchronized, so the use count
was
not always correct, causing an event to disappear early, or get stuck in
the event queue for forever.

(closes issue http://bugs.digium.com/view.php?id=9238, reported by bweschke,
patch from Ivan, modified by
me)

------------------------------------------------------------------------ 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-06-07 15:31  russell        Note Added: 0073245                          
======================================================================




More information about the asterisk-bugs mailing list