Opened 16 years ago

Closed 16 years ago

#569 closed defect (fixed)

Non-uniform locking order between SRTP & its member transport (e.g:ICE) may cause deadlock

Reported by: nanang Owned by: nanang
Priority: normal Milestone: release-1.0-rc1
Component: pjmedia Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description (last modified by nanang)

Sample case:

  • Worker thread is receiving an RTP packet, it gets the ICE lock and about to get the SRTP lock, other thread is trying to send an RTP packet, it successfully acquire the SRTP lock, but unable to acquire ICE lock since it is hold by the worker thread, deadlock.

Solution:

  • Make the locking order between SRTP & its member transport uniform or independent.

Change History (2)

comment:1 Changed 16 years ago by nanang

  • Description modified (diff)
  • Summary changed from Non-uniform locking order between SRTP & ICE cause deadlock to Non-uniform locking order between SRTP & its member transport (e.g:ICE) may cause deadlock

In r2144: Updated SRTP locking to not guard member transport when sending packet; added separate tx_buffer for RTCP since tx_buffer is not guarded by SRTP lock anymore.

This should make the locking order between SRTP and its member transport uniform in receiving packet and independent in sending packet.

comment:2 Changed 16 years ago by nanang

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.