[Home]

Summary:ASTERISK-28633: stasis bridge topic leak
Reporter:Joeran Vinzens (jvinzens)Labels:
Date Opened:2019-11-26 00:40:22.000-0600Date Closed:2020-01-08 08:58:11.000-0600
Priority:MinorRegression?
Status:Closed/CompleteComponents:Resources/res_stasis
Versions:17.0.1 Frequency of
Occurrence
Constant
Related
Issues:
Environment:We are running Asterisk 17 on Debian Buster. The asterisk is hadling only basic calls by AGI and FastAGI. Dial is done only by app_dial.Attachments:( 0) asterisk_output_2.txt
( 1) asterisk_output.txt
Description:It seems after a call had been cleared up there is no cleanup of the bridge topic within the stasis bus. After starting the asterisk there is no bridge topic according "stasis show topics". When running normal call load with us at the end of a day we collected as many Bridge topics as we have processed calls. "show topics" after a day shows about 48000 open bridge topics but only 150 channel topics according the ongoing calls.
It seems there is nothing deleting the bridge topics.

So far we have no negative side effects like load or memory but we are restarting the asterisk frequently.
Comments:By: Asterisk Team (asteriskteam) 2019-11-26 00:40:23.779-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

By: Benjamin Keith Ford (bford) 2019-11-26 09:30:01.155-0600

Can you attach the output of "show topics", "core show channels", and "bridge show all" on Asterisk start and before a restart to show the allocations?

By: Joeran Vinzens (jvinzens) 2019-11-27 07:15:11.995-0600

asterisk_output is directly after restarting the Asterisk
asterisk_output is same after 1h+ after restarting

both
"core show uptime"
"core chow channels"
"stasis show topics"

By: Joeran Vinzens (jvinzens) 2019-11-27 07:17:37.849-0600

I tried to get stasis topics after 2 Weeks of running the asterisk and it did not go out well. Astersk cleared all calls during the process but did not crash. After this my console got all output it was about 85000 topics open but then my terminal crashed.

Then i restarted the asterisk and took the logs attached.

By: Benjamin Keith Ford (bford) 2019-11-27 09:04:29.290-0600

I'm going to go ahead and open an issue for this, as it does look like it's a valid issue. When a developer starts working on it, they may need more information, and will ask here. Until then, can you describe the general use of the system to help determine which paths the code might be taking to help narrow down where the topic is not being cleaned up? Is it just the dials you mentioned? Are the AGI scripts doing anything else?

By: Joeran Vinzens (jvinzens) 2019-11-27 09:09:04.417-0600

We are using the asterisk as a basic Call router. There are some hundred lines of dialplan and several FastAGI and AGI Calls. It all ends up within a simple Dial Command. There are no enduser connected to the Systems so PJSIP conf is quite small for the amount of Calls running through the system.
Our Dial Command looks like this
{noformat}
Dial(PJSIP/${DIALPREFIX}${EXTEN}@${DOMAIN},120,gL(${MAXDURATION}000)b(sub-post_dial_hook_out_channel^${EXTEN}^1))
{noformat}

it feels like this is nothing very special. If someone needs any further data please ask, so we will provide it.

By: George Joseph (gjoseph) 2020-01-02 14:45:44.391-0600

Joeran, I was able to reproduce the issue and I've uploaded fix patches for Asterisk 17 to Gerrit.  Can you test and make sure that it really fixes your issue?

The links to the patches are just above the issue comments.


By: Joeran Vinzens (jvinzens) 2020-01-03 05:32:39.395-0600

We put it in production on the basis of Asterisk 17.1 and it looks good. It is running now for some hours and we do not see any bridge topics leaked.

thanks!

By: Friendly Automation (friendly-automation) 2020-01-08 08:58:11.808-0600

Change 13507 merged by Friendly Automation:
stasis.c:  Use correct topic name in stasis_topic_pool_delete_topic

[https://gerrit.asterisk.org/c/asterisk/+/13507|https://gerrit.asterisk.org/c/asterisk/+/13507]

By: Friendly Automation (friendly-automation) 2020-01-08 08:59:57.087-0600

Change 13567 merged by Friendly Automation:
stasis.c:  Use correct topic name in stasis_topic_pool_delete_topic

[https://gerrit.asterisk.org/c/asterisk/+/13567|https://gerrit.asterisk.org/c/asterisk/+/13567]

By: Friendly Automation (friendly-automation) 2020-01-08 09:41:56.581-0600

Change 13566 merged by Joshua Colp:
stasis.c:  Use correct topic name in stasis_topic_pool_delete_topic

[https://gerrit.asterisk.org/c/asterisk/+/13566|https://gerrit.asterisk.org/c/asterisk/+/13566]

By: Friendly Automation (friendly-automation) 2020-01-08 09:42:13.635-0600

Change 13539 merged by Joshua Colp:
stasis.c:  Use correct topic name in stasis_topic_pool_delete_topic

[https://gerrit.asterisk.org/c/asterisk/+/13539|https://gerrit.asterisk.org/c/asterisk/+/13539]