<p style="white-space: pre-wrap; word-wrap: break-word;">This should make it slightly easier to troubleshoot MWI state leaks.  See also patch uploaded to ASTERISK-28546 which improves the REF_DEBUG information where stasis state has eids added but not removed.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/12911">View Change</a></p><p>2 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/#/c/12911/1/main/stasis_state.c">File main/stasis_state.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/12911/1/main/stasis_state.c@602">Patch Set #1, Line 602:</a> <code style="font-family:monospace,monospace">                   ao2_ref(state, +1);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">This reference and the matching unref in state_find_and_remove_eid ensure that the object will not free unless state->eids is empty.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/12911/1/main/stasis_state.c@726">Patch Set #1, Line 726:</a> <code style="font-family:monospace,monospace">    struct stasis_state *state = ao2_weakproxy_get_object(obj, 0);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Getting the object from weakproxy here and in handle_stasis_state_subscribed adds some overhead.  It's possible for weakproxy own state->msg and state->num_subscribers but that could potentially shift some of the overhead to the write side and make the code slightly more complex.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/12911">change 12911</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/12911"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 17 </div>
<div style="display:none"> Gerrit-Change-Id: I400e0db4b9afa3d5cb4ac7dad60907897e73f9a9 </div>
<div style="display:none"> Gerrit-Change-Number: 12911 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Fri, 20 Sep 2019 19:12:45 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>