[Asterisk-code-review] pjsip distributor.c: Fix deadlock with TCP type transports. (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Thu Jun 29 11:42:11 CDT 2017


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/5919 )

Change subject: pjsip_distributor.c: Fix deadlock with TCP type transports.
......................................................................


Patch Set 1:

> Are sure that "passing all incoming SIP messages into a new master
 > distributor serializer" can not cause bottleneck effect?

I'm not thrilled with this fix because of the inherent inefficiency of switching the work to another thread.  However, it is the only way to eliminate the deadlock.  We need to get the dialog lock to acquire the associated searializer safely from the dialog.  The TCP transport disables the concurrency option so it won't let go of the transport lock because of some unspecified race condition in the pjproject code.

I can only see the websocket transport using different threads to call the distributor() function.  All other transports use the single monitor thread created in res_pjsip.c.  So sending all the packets to another thread isn't going to create a bottleneck for most cases.


-- 
To view, visit https://gerrit.asterisk.org/5919
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: I9ed63f4da9649e9db6ed4be29c360968917a89bd
Gerrit-Change-Number: 5919
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Thu, 29 Jun 2017 16:42:11 +0000
Gerrit-HasComments: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170629/64a00441/attachment.html>


More information about the asterisk-code-review mailing list