Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#2211 closed enhancement (fixed)

Use group lock instead of mutex for SIP dialog which is useful for B2BUA scenarios

Reported by: riza Owned by: riza
Priority: normal Milestone: release-2.10
Component: pjsip Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description (last modified by riza)

On B2BUA scenario (with 2 leg/dialog):

  1. B2BUA receive a BYE on one leg, while the other leg also receive a BYE.
  2. While holding the lock on one leg, the B2BUA will try to forward the BYE it received to the other leg. The same goes for the other leg, however the process will stuck since it's unable to obtain the other's dialog lock.

It will lead to a deadlock scenario.

For this scenario, it is useful for both dialog to use the same lock (e.g: group lock).

The patch will introduce new API which will help for the above scenario.

  • pjsip_dlg_create_uac2() and
  • pjsip_dlg_get_lock()

Thanks to Peter Koletzki for the report.

Change History (3)

comment:1 Changed 5 years ago by riza

  • Owner set to riza
  • Resolution set to fixed
  • Status changed from new to closed

In 6037:

Close #2211: Use group lock for SIP dialog.

comment:2 Changed 5 years ago by riza

  • Description modified (diff)
  • Summary changed from Use group lock for SIP dialog to Use group lock instead of mutex for SIP dialog which is useful for B2BUA scenarios

comment:3 Changed 5 years ago by nanang

In 6042:

Re #2211: Fixed compile error in pjsip_dlg_create_uac() on MSVC2005, var declaration should be at the beginning of function.

Note: See TracTickets for help on using tickets.