Opened 8 years ago

Closed 8 years ago

#1371 closed defect (fixed)

Soft deadlock when application query call info of other call inside a callback (Thanks Marcus Froeschl for the report)

Reported by: bennylp Owned by: bennylp
Priority: normal Milestone: release-1.12
Component: pjsua-lib Version: 1.x-branch
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description

A soft deadlock will occur in the following scenario:

Thread 1 Thread 2
1. Call A state has changed, on_call_state() callback is called. 1. Call B state has changed
2. In on_call_state() callback, application calls pjsua_call_get_info() on call B2. Call B is entering PJSUA-LIB
3. Thread 1 is holding call A and PJSUA mutex and attempting to acquire call B mutex3. Thread 2 is holding call B mutex and attempting to acquire PJSUA mutex

Change History (1)

comment:1 Changed 8 years ago by bennylp

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

(In [3751]) Fixed #1371: Soft deadlock when application query call info of other call inside a callback. The following APIs should be safe to be called in this situation:

  • pjsua_call_get_info()
  • pjsua_call_get_conf_port()
Note: See TracTickets for help on using tickets.