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

Richard Mudgett rmudgett at digium.com
Tue May 6 12:45:27 CDT 2014


On Tue, May 6, 2014 at 5:45 AM, Richard Kenner <kenner at gnat.com> wrote:

> > 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. */
>
> --
>

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140506/f0a60d1f/attachment.html>


More information about the asterisk-users mailing list