[Home]

Summary:ASTERISK-24938: ARI Snoop Channel results in excessive escalating CPU usage
Reporter:George Ladoff (georgeladoff)Labels:
Date Opened:2015-04-03 15:17:51Date Closed:2015-05-07 09:19:10
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_stasis_snoop
Versions:13.2.0 13.3.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Ubuntu Linux 14.04.2, Asterisk built from source, Realtime with MySQLAttachments:( 0) issue_24938_full_log.txt
Description:When I create a Snoop Channel with ARI, the thread immediately begins to consume an additional 2-3% CPU per minute. By about 40 minutes, an entire 3Ghz CPU is consumed.

To recreate this, simply have any channel in Stasis then create a Snoop channel from the original channel. CPU usage will start escalating right away.

I'm specifically creating channels with Spy Out but I've tried both directions and Whisper with the same result.

This happens every time a Snoop channel is created. The Stasis application and all of the channels are still usable, but only until all of the CPU is consumed. Then of course nothing works.

Once the Snoop channel is deleted, the usage goes immediately back to normal (sustained 1-2% per thread).

I've tried snooping channels that are using a variety of codecs: ulaw, gsm, g.729. All have the same result.

This happens whether the Snoop channel is then bridged or recorded or neither.

I've tried with both Timerfd and pthread.
Comments:By: Rusty Newton (rnewton) 2015-04-03 16:27:03.581-0500

We require additional debug to continue with triage of your issue. Please follow the instructions on the wiki [1] for how to collect debugging information from Asterisk. For expediency, where possible, attach the debug with a '.txt' file extension so that the debug will be usable for further analysis.

Thanks!

[1] https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information



By: Rusty Newton (rnewton) 2015-04-03 16:28:13.222-0500

Press 'Send Back' or 'Enter Feedback' when responding to make sure we see the response. Thanks!

By: George Ladoff (georgeladoff) 2015-04-03 18:01:12.101-0500

Debug log attached.

I started the logger, called into the extension that sends to Stasis, used a REST client to list the channel ID, use the REST client to start Snoop, let it run for 10 minutes, used the REST client delete the Snoop channel, rotated the log.

By: Rusty Newton (rnewton) 2015-04-08 17:57:43.438-0500

Thanks George!