#233 [tm] fix a race condition cancelling a processed invite

trunk
closed-fixed
modules (179)
8
2013-01-28
2012-07-17
No

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.

Discussion

  • Christophe Sollet

     
  • Bogdan-Andrei Iancu

    • priority: 5 --> 8
    • assigned_to: nobody --> bogdan_iancu
     
  • Bogdan-Andrei Iancu

    • status: open --> open-fixed
     
  • Bogdan-Andrei Iancu

    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

     
  • Bogdan-Andrei Iancu

    • status: open-fixed --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks