Opened 12 years ago

Last modified 12 years ago

#1451 closed defect

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

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

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 (0)

Note: See TracTickets for help on using tickets.