Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1451 closed defect (fixed)

Deadlock caused by conflicting locking order in ICE and ioqueue (thanks Claudio De Angelis for the report)

Reported by: nanang Owned by: bennylp
Priority: normal Milestone: release-1.14
Component: pjnath Version: 1.x-branch
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description (last modified by nanang)

Deadlock scenario:

Thread 1:

  1. packet arrived
  2. ioqueue_dispatch_read_event() acquires stunsock key mutex
  3. pj_ice_sess_on_rx_pkt() is about to acquire ICE session mutex

Thread 2:

  1. about to send packet
  2. pj_ice_sess_send_data() acquires ICE session mutex
  3. in pj_ioqueue_sendto(), pj_sock_sendto() fails with EWOULDBLOCK
  4. to save the sending state, pj_ioqueue_sendto() needs to acquire stunsock key mutex.

Change History (2)

comment:1 Changed 12 years ago by nanang

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

(In [3951]) Fix #1451: Don't hold the ICE session's mutex when calling pj_ice_sess_cb::on_tx_pkt() callback to avoid deadlock.

comment:2 Changed 12 years ago by nanang

  • Description modified (diff)
Note: See TracTickets for help on using tickets.