<p>Alexei Gradinari <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/5919">View Change</a></p><p>Patch set 1:</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Are sure that "passing all incoming SIP messages into a new<br>master<br>distributor serializer" can not cause bottleneck effect?</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">I'm not thrilled with this fix because of the inherent inefficiency<br>of switching the work to another thread.  However, it is the only<br>way to eliminate the deadlock.  We need to get the dialog lock to<br>acquire the associated searializer safely from the dialog.  The TCP<br>transport disables the concurrency option so it won't let go of the<br>transport lock because of some unspecified race condition in the<br>pjproject code.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I can only see the websocket transport using different threads to<br>call the distributor() function.  All other transports use the<br>single monitor thread created in res_pjsip.c.  So sending all the<br>packets to another thread isn't going to create a bottleneck for<br>most cases.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">May be we can use pjsip_dlg_try_inc_lock and if we can't lock then pass to a new distributor serializer?</p><ul style="list-style: none; padding-left: 20px;"></ul><p>To view, visit <a href="https://gerrit.asterisk.org/5919">change 5919</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/5919"/><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: comment </div>
<div style="display:none"> Gerrit-Change-Id: I9ed63f4da9649e9db6ed4be29c360968917a89bd </div>
<div style="display:none"> Gerrit-Change-Number: 5919 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Alexei Gradinari <alex2grad@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 29 Jun 2017 20:41:47 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>