[asterisk-bugs] [Asterisk 0017610]: [patch] Deadlock is happended.( between channel and sip_pvt lock)

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Aug 12 13:28:05 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17610 
====================================================================== 
Reported By:                warmguy
Assigned To:                tilghman
====================================================================== 
Project:                    Asterisk
Issue ID:                   17610
Category:                   Channels/chan_sip/General
Reproducibility:            have not tried
Severity:                   major
Priority:                   normal
Status:                     ready for testing
Target Version:             1.6.2.12
Asterisk Version:           SVN 
JIRA:                       SWP-1839 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 274052 
Request Review:              
====================================================================== 
Date Submitted:             2010-07-08 23:36 CDT
Last Modified:              2010-08-12 13:28 CDT
====================================================================== 
Summary:                    [patch] Deadlock is happended.( between channel and
sip_pvt lock)
Description: 
I have been testing asterisk. (Trunk version)
When testing more than 4cps asterisk does not work.

I am confirmed reason for using GDB.
The reason is estimated to deadlock. Help needed.

Between thread ID 24 and thread ID 5 the circular Deadlock occurs.
Thread 24 (Thread 0x8cc8b90 (LWP 1886)):   chan lock(waiting) <-
sip_pvt_lock(acquired) <- monlock(acquired) 
Thread 5 (Thread 0x648ab90 (LWP 1948)): sip_pvt lock(waiting) <- chan
lock(acquired) 

Here is the debugging information.
<removed> pabelanger
====================================================================== 

---------------------------------------------------------------------- 
 (0125907) schmidts (reporter) - 2010-08-12 13:28
 https://issues.asterisk.org/view.php?id=17610#c125907 
---------------------------------------------------------------------- 
i´ve tried this patch cause of another issue and after some deep debuging
of the do_monitor function which includes the callback for many sip_pvt
locks i think going up to 1ms just slow down the entire send/receive part
of do_monitor. the problem is that the ast_io_wait function which polls for
incoming events only read one single packet when its recevied and maybe
send up to 10 or more packets.
if its happens that the sip_pvt structure is locked, 1ms sleep time is
longer than the scheduler time frame to exec events on the scheduler heap.
this would cause slowing down the sending procedure which will cause to
reading less packets in the polling time frame. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-08-12 13:28 schmidts       Note Added: 0125907                          
======================================================================




More information about the asterisk-bugs mailing list