<p>N A <strong>uploaded patch set #2</strong> to this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18576">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_confbridge: Fix bridge shutdown race condition.<br><br>A race condition exists where if a bridge is left vacant<br>for a split instant, the bridge will shut down and go<br>away at the same instant that somebody else could be trying<br>to join it. The newcomer will find the conference still<br>in conference_bridges and thus take it and run with it.<br>At the same time, shutdown of the bridge completes and it<br>is removed from conference_bridges.<br><br>As a result, the newcomer will end up joining the bridge<br>corresponding to the original conference that is now<br>defunct. When the next party joins the same named bridge,<br>it won't be found in conference_bridges and thus a new<br>bridge gets created. This can happen right afterwards,<br>but in theory it could happen at any point after the first.<br><br>As a result, the newcomer that joined the bridge during<br>the shutdown ends up stranded in a bridge that isn't<br>real and will never get conferenced with anything, since<br>it's been removed from the list of conferences already.<br><br>To prevent this, we now explicitly check during shutdown<br>and abort if the conference status is now empty. Additionally,<br>we set a flag to prevent newcomers from joining the old<br>bridge. On the join side, we ignore bridges that are shutting<br>down to ensure we don't join a dead bridge, and, importantly,<br>do not release the lock between the time the conference is<br>found and the conference state changes, to ensure that<br>an imminent shutdown will abort afterwards.<br><br>ASTERISK-30081 #close<br><br>Change-Id: I2a704dd7dd449bf008a1ee90768ddf95c28bae0d<br>---<br>M apps/app_confbridge.c<br>M apps/confbridge/include/confbridge.h<br>2 files changed, 34 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/76/18576/2</pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18576">change 18576</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/+/18576"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I2a704dd7dd449bf008a1ee90768ddf95c28bae0d </div>
<div style="display:none"> Gerrit-Change-Number: 18576 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>