<p>Frederic LE FOLL <strong>uploaded patch set #3</strong> to this change.</p><p><a href="https://gerrit.asterisk.org/5785">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Core/PBX: Deadlock between dialplan execution and application unregistration.<br><br>Not easy to reproduce, but we have noticed deadlocks when unloading a module<br>while dialplan is handling a request.<br><br>The deadlock is between :<br>1) Dialplan execution: pbx_extension_helper() first taking conlock,<br>then pbx_findapp() [when called] asking for lock on apps list.<br>2) Application unregistration: ast_unregister_application() first taking lock<br>on apps list, then unreference_cached_app() [when called] asking for conlock.<br><br>As a protection, I suggest to modify ast_unregister_application(), so that it<br>anticipates the need of conlock, before taking the lock on apps list.<br>The side effect is a longer unavailability of conlock when unregistering an<br>application.<br><br>ASTERISK-27041<br><br>Change-Id: I0db0f1eb320da6a5758cce3a47d765be1face8e2<br>---<br>M main/pbx_app.c<br>1 file changed, 7 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/85/5785/3</pre><p>To view, visit <a href="https://gerrit.asterisk.org/5785">change 5785</a>. To unsubscribe, 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/5785"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>
<div style="display:none"> Gerrit-Change-Id: I0db0f1eb320da6a5758cce3a47d765be1face8e2 </div>
<div style="display:none"> Gerrit-Change-Number: 5785 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Frederic LE FOLL <frederic.lefoll@c-s.fr> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Matthew Fredrickson <creslin@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>