[Asterisk-code-review] res pjsip registrar: mitigate blocked threads on reliable tr... (asterisk[13])

Kevin Harwell asteriskteam at digium.com
Tue Jan 22 13:02:03 CST 2019


Hello Friendly Automation, Sean Bright, Joshua C. Colp, 

I'd like you to reexamine a change. Please visit

    https://gerrit.asterisk.org/10906

to look at the new patch set (#2).

Change subject: res_pjsip_registrar: mitigate blocked threads on reliable transport shutdown
......................................................................

res_pjsip_registrar: mitigate blocked threads on reliable transport shutdown

When a reliable transport is shutdown it's possible for the pjsip registrar
resource shutdown handler to get called multiple times. If this happens and one
of the threads is taking "too long" (slow database call for instance) then the
others get blocked waiting to delete.

Since it only takes one to delete the contact then the other threads should be
able to continue on if one of the threads is currently "deleting". This patch
makes it so now when a thread enters the shutdown handler it checks to see if a
thread is currently already "deleting". If so, then the thread does not attempt
to get the lock, and instead continues on thus avoiding the blockage.

ASTERISK-28213 #close

Change-Id: I7563ca596312b1dff4f3ab41483e89fe2862328a
---
M res/res_pjsip_registrar.c
1 file changed, 30 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/06/10906/2
-- 
To view, visit https://gerrit.asterisk.org/10906
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I7563ca596312b1dff4f3ab41483e89fe2862328a
Gerrit-Change-Number: 10906
Gerrit-PatchSet: 2
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Friendly Automation (1000185)
Gerrit-Reviewer: Joshua C. Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190122/0636b677/attachment.html>


More information about the asterisk-code-review mailing list