Opened 12 years ago
Closed 12 years ago
#1578 closed defect (fixed)
Possible deadlock when call is adding new media with ICE and STUN enabled
Reported by: | bennylp | Owned by: | bennylp |
---|---|---|---|
Priority: | normal | Milestone: | release-2.1 |
Component: | pjsua-lib | Version: | trunk |
Keywords: | Cc: | ||
Backport to 1.x milestone: | Backported: | no |
Description
Deadlock may happen if call is adding new media (e.g. adding video) with ICE enabled and more than one worker threads are used. The flow is below:
- Call is established with audio only.
- Re-INVITE with video is received, on_call_rx_offer() is called, which eventually calls create_ice_media_transport() which works synchronously. The dialog mutex is held by current thread at this point. The current thread then runs pjsua_handle_events() in a loop.
- on_ice_complete() is called called with PJ_ICE_STRANS_OP_INIT, which posts the job as timer event.
- another thread picks up the timer event, med_tp_timer_cb() is called, which calls acquire_call() and got stuck when acquiring dialog mutex which is being held by the polling thread above.
Thanks Itay Bianco for the report!
Change History (1)
comment:1 Changed 12 years ago by bennylp
- Resolution set to fixed
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
In 4242: