<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 6, 2014 at 5:45 AM, Richard Kenner <span dir="ltr"><<a href="mailto:kenner@gnat.com" target="_blank">kenner@gnat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">> Really, I think we're pretty positive there's a ref leak (since<br>
> otherwise, the CBAnn channel would be long gone). If you can get a<br>
> ref debug log and the standard Asterisk DEBUG log showing the<br>
> problem, that would help a lot in finding out what is going on.<br>
<br>
</div>I think the bug is in conf_handle_talker_cb.  It calls ao2_find but has no<br>
mechanism to decremement the refcount.  It appears that the following is<br>
the best fix.  I looked at all remaining calls to ao2_find in app_confbridge.c<br>
and they look OK.  Do you agree with the below fix?<br>
<br>
*** app_confbridge.c.bug        2014-05-06 06:42:21.000000000 -0400<br>
--- app_confbridge.c    2014-05-06 06:42:05.000000000 -0400<br>
*************** static int conf_handle_talker_cb(struct<br>
*** 1461,1467 ****<br>
        struct pvt_talker_cb *pvt = hook_pvt;<br>
        const char *conf_name = pvt->conf_name;<br>
!       struct confbridge_conference *conference = ao2_find(conference_bridges, conf_name, OBJ_KEY);<br>
        struct ast_json *talking_extras;<br>
<br>
        if (!conference) {<br>
                /* Remove the hook since the conference does not exist. */<br>
--- 1461,1468 ----<br>
        struct pvt_talker_cb *pvt = hook_pvt;<br>
        const char *conf_name = pvt->conf_name;<br>
!       RAII_VAR(struct confbridge_conference *, conference, NULL, ao2_cleanup);<br>
        struct ast_json *talking_extras;<br>
<br>
+       conference = ao2_find(conference_bridges, conf_name, OBJ_KEY);<br>
        if (!conference) {<br>
                /* Remove the hook since the conference does not exist. */<br>
<div class="HOEnZb"><div class="h5"><br>
--<br></div></div></blockquote><div><br></div><div>That is definitely a leak and the fix looks good.  That leak is most likely the<br>one biting you.  There is another leak in handle_cli_confbridge_kick() if the<br></div>
<div>participant to kick is not in the conference.<br><br></div><div>Please go ahead and open an issue so proper credit can be given for the<br>patch.<br></div><br></div>Richard<br></div></div>