Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] "CBAnn" channel not going away in Asterisk 12

Goto page 1, 2  Next
 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
kenner at gnat.com
Guest





PostPosted: Tue Apr 29, 2014 5:10 pm    Post subject: [asterisk-users] "CBAnn" channel not going away in Reply with quote

After an upgrade to Asterisk 12, I'm "collecting" channels. When I enter
and then exit a conference room, I see:

-- <CBAnn/207-0000067f;1> Playing 'confbridge-leave.slin' (language 'en')
-- Channel CBAnn/207-0000067f;2 joined 'softmix' base-bridge <5edb1920-3774-4ba3-8c4d-23e8fd04519c>
-- Channel CBAnn/207-0000067f;2 left 'softmix' base-bridge <5edb1920-3774-4ba3-8c4d-23e8fd04519c>

I'd expect those channel to immediately go away, but they just stay around:

asterisk*CLI> core show channel CBAnn/207-0000067f;1
-- General --
Name: CBAnn/207-0000067f;1
Type: CBAnn
UniqueID: 1398809161.20186
LinkedID: 1398809161.20186
Caller ID: (N/A)
Caller ID Name: (N/A)
Connected Line ID: (N/A)
Connected Line ID Name: (N/A)
Eff. Connected Line ID: (N/A)
Eff. Connected Line ID Name: (N/A)
DNID Digits: (N/A)
Language: en
State: Up (6)
NativeFormats: (nothing)
WriteFormat: unknown
ReadFormat: unknown
WriteTranscode: No
ReadTranscode: No
Time to Hangup: 0
Elapsed Time: 0h1m3s
Bridge ID: (Not bridged)
-- PBX --
Context: default
Extension: s
Priority: 1
Call Group: 0
Pickup Group: 0
Application: (N/A)
Data: (Empty)
Call Identifer: (None)
Variables:
[Apr 29 18:07:04] ERROR[21102]: cdr.c:3106 ast_cdr_serialize_variables: Unable to find CDR for channel CBAnn/207-0000067f;1

asterisk*CLI> core show channel CBAnn/207-0000067f;2
-- General --
Name: CBAnn/207-0000067f;2
Type: CBAnn
UniqueID: 1398809161.20187
LinkedID: 1398809161.20186
Caller ID: (N/A)
Caller ID Name: (N/A)
Connected Line ID: (N/A)
Connected Line ID Name: (N/A)
Eff. Connected Line ID: (N/A)
Eff. Connected Line ID Name: (N/A)
DNID Digits: (N/A)
Language: en
State: Up (6)
NativeFormats: (slin)
WriteFormat: slin
ReadFormat: slin
WriteTranscode: No
ReadTranscode: No
Time to Hangup: 0
Elapsed Time: 0h3m30s
Bridge ID: (Not bridged)
-- PBX --
Context: default
Extension: s
Priority: 1
Call Group: 0
Pickup Group: 0
Application: (N/A)
Data: (Empty)
Call Identifer: (None)
Variables:
[Apr 29 18:09:31] ERROR[21102]: cdr.c:3106 ast_cdr_serialize_variables: Unable to find CDR for channel CBAnn/207-0000067f;2

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
rmudgett at digium.com
Guest





PostPosted: Tue Apr 29, 2014 5:39 pm    Post subject: [asterisk-users] "CBAnn" channel not going away in Reply with quote

On Tue, Apr 29, 2014 at 5:10 PM, Richard Kenner <kenner@gnat.com (kenner@gnat.com)> wrote:
Quote:
After an upgrade to Asterisk 12, I'm "collecting" channels.  When I enter
and then exit a conference room, I see:

    -- <CBAnn/207-0000067f;1> Playing 'confbridge-leave.slin' (language 'en')
    -- Channel CBAnn/207-0000067f;2 joined 'softmix' base-bridge <5edb1920-3774-4ba3-8c4d-23e8fd04519c>
    -- Channel CBAnn/207-0000067f;2 left 'softmix' base-bridge <5edb1920-3774-4ba3-8c4d-23e8fd04519c>

I'd expect those channel to immediately go away, but they just stay around:

asterisk*CLI> core show channel CBAnn/207-0000067f;1
 -- General --
           Name: CBAnn/207-0000067f;1
           Type: CBAnn
       UniqueID: 1398809161.20186
       LinkedID: 1398809161.20186
      Caller ID: (N/A)
 Caller ID Name: (N/A)
Connected Line ID: (N/A)
Connected Line ID Name: (N/A)
Eff. Connected Line ID: (N/A)
Eff. Connected Line ID Name: (N/A)
    DNID Digits: (N/A)
       Language: en
          State: Up (6)
  NativeFormats: (nothing)
    WriteFormat: unknown
     ReadFormat: unknown
 WriteTranscode: No
  ReadTranscode: No
 Time to Hangup: 0
   Elapsed Time: 0h1m3s
      Bridge ID: (Not bridged)
 --   PBX   --
        Context: default
      Extension: s
       Priority: 1
     Call Group: 0
   Pickup Group: 0
    Application: (N/A)
           Data: (Empty)
 Call Identifer: (None)
      Variables:
[Apr 29 18:07:04] ERROR[21102]: cdr.c:3106 ast_cdr_serialize_variables: Unable to find CDR for channel CBAnn/207-0000067f;1

asterisk*CLI> core show channel CBAnn/207-0000067f;2
 -- General --
           Name: CBAnn/207-0000067f;2
           Type: CBAnn
       UniqueID: 1398809161.20187
       LinkedID: 1398809161.20186
      Caller ID: (N/A)
 Caller ID Name: (N/A)
Connected Line ID: (N/A)
Connected Line ID Name: (N/A)
Eff. Connected Line ID: (N/A)
Eff. Connected Line ID Name: (N/A)
    DNID Digits: (N/A)
       Language: en
          State: Up (6)
  NativeFormats: (slin)
    WriteFormat: slin
     ReadFormat: slin
 WriteTranscode: No
  ReadTranscode: No
 Time to Hangup: 0
   Elapsed Time: 0h3m30s
      Bridge ID: (Not bridged)
 --   PBX   --
        Context: default
      Extension: s
       Priority: 1
     Call Group: 0
   Pickup Group: 0
    Application: (N/A)
           Data: (Empty)
 Call Identifer: (None)
      Variables:
[Apr 29 18:09:31] ERROR[21102]: cdr.c:3106 ast_cdr_serialize_variables: Unable to find CDR for channel CBAnn/207-0000067f;2


The announcer channel is not supposed to go away while the conference exists
so it can be reused for the next sound to play into the conference.  The announcer
channel joins/leaves the conference as it has sounds to play.  If the channel still
hangs around after the conference is destroyed then there is a problem.


Richard
Back to top
kenner at gnat.com
Guest





PostPosted: Tue Apr 29, 2014 5:42 pm    Post subject: [asterisk-users] "CBAnn" channel not going away in Reply with quote

Quote:
The announcer channel joins/leaves the conference as it has sounds
to play. If the channel still hangs around after the conference is
destroyed then there is a problem.

There's a problem. Wink

But thanks for pointing to how that's supposed to be handled.

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
kenner at gnat.com
Guest





PostPosted: Tue Apr 29, 2014 6:03 pm    Post subject: [asterisk-users] "CBAnn" channel not going away in Reply with quote

Quote:
If the channel still hangs around after the conference is destroyed
then there is a problem.

Am I missing something obvious: I'm looking in the confbridge_exec
function. I see a "conference = NULL" line, but no attempt to free
that structure, which is what I understand will destroy the playback
channel. So where it is freed?

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
mjordan at digium.com
Guest





PostPosted: Wed Apr 30, 2014 8:07 am    Post subject: [asterisk-users] "CBAnn" channel not going away in Reply with quote

On Tue, Apr 29, 2014 at 6:03 PM, Richard Kenner <kenner@gnat.com (kenner@gnat.com)> wrote:
Quote:
> If the channel still hangs around after the conference is destroyed
Quote:
then there is a problem.


Am I missing something obvious: I'm looking in the confbridge_exec
function.  I see a "conference = NULL" line, but no attempt to free
that structure, which is what I understand will destroy the playback
channel.  So where it is freed?


Conferences are reference counted objects. When the reference count reaches 0 on the conference object, its destructor is automatically called. The destructor, in this case, is destroy_conference_bridge. That is where the CBAnn channel should be hung up.

        /* Try to allocate memory for a new conference bridge, if we fail... this won't end well. */
        if (!(conference = ao2_alloc(sizeof(*conference), destroy_conference_bridge))) {
            ao2_unlock(conference_bridges);
            ast_log(LOG_ERROR, "Conference '%s' could not be created.\n", conference_name);
            return NULL;
        }




If the reference count on the bridge is off, you should see the conference bridge 'hanging around' after the last participant has left. If so, please file a bug report. We'll need a REF_DEBUG log to figure out who the guilty party is in holding onto a reference. The easiest way to get that is to reproduce the problem using the latest from the 12 branch (as we made reference count debugging easier just recently). Enable REF_DEBUG in menuselect under Compiler Flags, make/make install, and re-run the scenario that reproduces the result. A refs file will be created in your Asterisk log directory - attach that to the issue along with DEBUG log.

Thanks!


--
Matthew Jordan

Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
Back to top
kenner at gnat.com
Guest





PostPosted: Wed Apr 30, 2014 8:21 am    Post subject: [asterisk-users] "CBAnn" channel not going away in Reply with quote

Quote:
If the reference count on the bridge is off, you should see the conference
bridge 'hanging around' after the last participant has left.

And how would I be sure this is the case? I did "core set debug 1" and
didn't see the debug line about destroying the conference, but it doesn't
show up in "confbridge list".

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
mjordan at digium.com
Guest





PostPosted: Wed Apr 30, 2014 9:20 am    Post subject: [asterisk-users] "CBAnn" channel not going away in Reply with quote

On Wed, Apr 30, 2014 at 8:20 AM, Richard Kenner <kenner@gnat.com (kenner@gnat.com)> wrote:
Quote:
> If the reference count on the bridge is off, you should see the conference
Quote:
bridge 'hanging around' after the last participant has left.


And how would I be sure this is the case?  I did "core set debug 1" and
didn't see the debug line about destroying the conference, but it doesn't
show up in "confbridge list".





That's not terribly surprising, as the bridge is typically removed from the list of active conferences prior to the destructor being called (the destructor being the thing that releases memory, not the thing that notifies everyone that this thing *should* be destroyed). It may show up in 'bridge show all' - but I'd actually expect it not to show up there either.


Really, I think we're pretty positive there's a ref leak (since otherwise, the CBAnn channel would be long gone). If you can get a ref debug log and the standard Asterisk DEBUG log showing the problem, that would help a lot in finding out what is going on.


--
Matthew Jordan

Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
Back to top
kenner at gnat.com
Guest





PostPosted: Wed Apr 30, 2014 10:01 pm    Post subject: [asterisk-users] "CBAnn" channel not going away in Reply with quote

Quote:
Really, I think we're pretty positive there's a ref leak (since
otherwise, the CBAnn channel would be long gone). If you can get a
ref debug log and the standard Asterisk DEBUG log showing the
problem, that would help a lot in finding out what is going on.

That can't be done in the 12.2.0 release, just the current SVN, right?
Clearly this occurs for me and not in the simple case. So I think what
I'll do is see exactly what I have that's causing it and hopefully
code inspection of that piece will show the missing ref decrement.
I'm away for a few days and so may not be able to get to this until
I get back. Thanks for the pointers.

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
kenner at gnat.com
Guest





PostPosted: Thu May 01, 2014 7:19 am    Post subject: [asterisk-users] "CBAnn" channel not going away in Reply with quote

Quote:
It may show up in 'bridge show all' - but I'd actually expect it not
to show up there either.

Actually, it does. I have a screen full of bridges with 0 channels.

I just tried an experiment where all I have is

exten => 329,1,Answer(1000)
same => n,Confbridge(1234)

with absolutely nothing else going on and those leak too. I need to understand
why I'm seeing this and nobody else is.

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
mjordan at digium.com
Guest





PostPosted: Thu May 01, 2014 9:19 am    Post subject: [asterisk-users] "CBAnn" channel not going away in Reply with quote

On Thu, May 1, 2014 at 7:18 AM, Richard Kenner <kenner@gnat.com (kenner@gnat.com)> wrote:
Quote:
> It may show up in 'bridge show all' - but I'd actually expect it not
Quote:
to show up there either.


Actually, it does.  I have a screen full of bridges with 0 channels.

I just tried an experiment where all I have is

exten => 329,1,Answer(1000)
 same => n,Confbridge(1234)

with absolutely nothing else going on and those leak too.  I need to understand
why I'm seeing this and nobody else is.





Please go ahead and open an issue and attach the refs log and the full DEBUG log. That will allow us to understand what's occurring here.

Thanks -

Matt


--
Matthew Jordan

Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
Back to top
kenner at gnat.com
Guest





PostPosted: Thu May 01, 2014 9:38 am    Post subject: [asterisk-users] "CBAnn" channel not going away in Reply with quote

Quote:
Please go ahead and open an issue and attach the refs log and the full DEBUG
log. That will allow us to understand what's occurring here.

I need to wait until I'm sure this isn't something I caused somehow,
so I need to first understand why I'm seeing this and nobody else is.

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
james at fivecats.org
Guest





PostPosted: Thu May 01, 2014 6:30 pm    Post subject: [asterisk-users] "CBAnn" channel not going away in Reply with quote

On 5/1/2014 10:38 AM, Richard Kenner wrote:
Quote:
Quote:
Please go ahead and open an issue and attach the refs log and the full DEBUG
log. That will allow us to understand what's occurring here.

I need to wait until I'm sure this isn't something I caused somehow,
so I need to first understand why I'm seeing this and nobody else is.


I had seen it as well but just chalked it up to not grokking how the
CBAnn channels worked.


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
kenner at gnat.com
Guest





PostPosted: Tue May 06, 2014 5:46 am    Post subject: [asterisk-users] "CBAnn" channel not going away in Reply with quote

Quote:
Really, I think we're pretty positive there's a ref leak (since
otherwise, the CBAnn channel would be long gone). If you can get a
ref debug log and the standard Asterisk DEBUG log showing the
problem, that would help a lot in finding out what is going on.

I think the bug is in conf_handle_talker_cb. It calls ao2_find but has no
mechanism to decremement the refcount. It appears that the following is
the best fix. I looked at all remaining calls to ao2_find in app_confbridge.c
and they look OK. Do you agree with the below fix?

*** app_confbridge.c.bug 2014-05-06 06:42:21.000000000 -0400
--- app_confbridge.c 2014-05-06 06:42:05.000000000 -0400
*************** static int conf_handle_talker_cb(struct
*** 1461,1467 ****
struct pvt_talker_cb *pvt = hook_pvt;
const char *conf_name = pvt->conf_name;
! struct confbridge_conference *conference = ao2_find(conference_bridges, conf_name, OBJ_KEY);
struct ast_json *talking_extras;

if (!conference) {
/* Remove the hook since the conference does not exist. */
--- 1461,1468 ----
struct pvt_talker_cb *pvt = hook_pvt;
const char *conf_name = pvt->conf_name;
! RAII_VAR(struct confbridge_conference *, conference, NULL, ao2_cleanup);
struct ast_json *talking_extras;

+ conference = ao2_find(conference_bridges, conf_name, OBJ_KEY);
if (!conference) {
/* Remove the hook since the conference does not exist. */

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
rmudgett at digium.com
Guest





PostPosted: Tue May 06, 2014 12:45 pm    Post subject: [asterisk-users] "CBAnn" channel not going away in Reply with quote

On Tue, May 6, 2014 at 5:45 AM, Richard Kenner <kenner@gnat.com (kenner@gnat.com)> wrote:
Quote:
> Really, I think we're pretty positive there's a ref leak (since
Quote:
otherwise, the CBAnn channel would be long gone). If you can get a
ref debug log and the standard Asterisk DEBUG log showing the
problem, that would help a lot in finding out what is going on.


I think the bug is in conf_handle_talker_cb.  It calls ao2_find but has no
mechanism to decremement the refcount.  It appears that the following is
the best fix.  I looked at all remaining calls to ao2_find in app_confbridge.c
and they look OK.  Do you agree with the below fix?

*** app_confbridge.c.bug        2014-05-06 06:42:21.000000000 -0400
--- app_confbridge.c    2014-05-06 06:42:05.000000000 -0400
*************** static int conf_handle_talker_cb(struct
*** 1461,1467 ****
        struct pvt_talker_cb *pvt = hook_pvt;
        const char *conf_name = pvt->conf_name;
!       struct confbridge_conference *conference = ao2_find(conference_bridges, conf_name, OBJ_KEY);
        struct ast_json *talking_extras;

        if (!conference) {
                /* Remove the hook since the conference does not exist. */
--- 1461,1468 ----
        struct pvt_talker_cb *pvt = hook_pvt;
        const char *conf_name = pvt->conf_name;
!       RAII_VAR(struct confbridge_conference *, conference, NULL, ao2_cleanup);
        struct ast_json *talking_extras;

+       conference = ao2_find(conference_bridges, conf_name, OBJ_KEY);
        if (!conference) {
                /* Remove the hook since the conference does not exist. */

--




That is definitely a leak and the fix looks good.  That leak is most likely the
one biting you.  There is another leak in handle_cli_confbridge_kick() if the

participant to kick is not in the conference.


Please go ahead and open an issue so proper credit can be given for the
patch.



Richard
Back to top
kenner at gnat.com
Guest





PostPosted: Tue May 06, 2014 1:01 pm    Post subject: [asterisk-users] "CBAnn" channel not going away in Reply with quote

Quote:
That is definitely a leak and the fix looks good.

Thanks.

Quote:
That leak is most likely the one biting you.

It definitely is.

Quote:
There is another leak in handle_cli_confbridge_kick() if the
participant to kick is not in the conference.

Confirmed. I missed that one in my code reading. I just fixed it the
same way.

Quote:
Please go ahead and open an issue so proper credit can be given for the
patch.

I'm not concerned about "credit", but would like to get it fixed. I need
to figure out what has to happen for me to be able to submit patches, but
then I'll have some others to submit too.

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services