[OpenSIPS-Devel] [ opensips-Patches-3545138 ] [tm] fix a race condition cancelling a processed invite

SourceForge.net noreply at sourceforge.net
Tue Jan 22 16:24:26 CET 2013


Patches item #3545138, was opened at 2012-07-17 10:23
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=3545138&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: trunk
Status: Open
>Resolution: Fixed
Priority: 8
Private: No
Submitted By: Christophe Sollet (csollet)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: [tm] fix a race condition cancelling a processed invite

Initial Comment:
Hi,

I'm facing a race condition when a CANCEL is received when cancelled INVITE is not yet completely processed:

* When t_forward_nonack() start, transaction is still not cancelled.
* When cancel_invite() process transaction, not all branches are created yet.

Result : cancel_invite() process correctly created branches but not ones created later. This is ending with never cancelled branches.

Attached patch flag branch to be cancelled on reply just after sending it.
It's more a safeguard : it's may be better, in addition, to not send branch at all if detected before sending.

Regards,
Christophe.



----------------------------------------------------------------------

>Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2013-01-22 07:24

Message:
Hi Christophe,

I uploaded your fix on SVN, but changed - your patch was still not covering
some races between CANCEL being sent out by the CANCEL req proc and by and
INVITE reply proc (as a result of a flag) -> you were ending up with 2
CANCELs :).

So, I actually expended the cancelling condition when a reply is received.
See #9618 -
http://opensips.svn.sourceforge.net/opensips/?rev=9616&view=rev

I would love if you could validate the fix.

Thanks and regards,
Bogdan

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=3545138&group_id=232389



More information about the Devel mailing list