[asterisk-bugs] [Asterisk 0015090]: [patch] chan_sip random deadlock

Asterisk Bug Tracker noreply at bugs.digium.com
Thu May 14 14:21:20 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15090 
====================================================================== 
Reported By:                ktsaou
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   15090
Category:                   Channels/chan_sip/General
Reproducibility:            random
Severity:                   crash
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           1.6.1.0 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-05-12 16:53 CDT
Last Modified:              2009-05-14 14:21 CDT
====================================================================== 
Summary:                    [patch] chan_sip random deadlock
Description: 
I have asterisk installed on a 64-bit debian 5.0, with realtime config for
sip peers.

Asterisk randomly stops processing SIP calls. I cannot find a pattern of
external events triggering it.

When this happens chan_sip appears totally frozen and even established
calls stop routing RTP.

I have compiled asterisk with all debuging input enabled. When this
happers 'core show locks' presents this:

=======================================================================
=== Currently Held Locks ==============================================
=======================================================================
===
=== <pending> <lock#> (<file>): <lock type> <line num> <function> <lock
name> <lock addr> (times locked)
===
=== Thread ID: 1091053904 (do_monitor           started at [20435]
chan_sip.c restart_monitor())
=== ---> Lock https://issues.asterisk.org/view.php?id=0 (chan_sip.c): MUTEX
19947 handle_request_do &netlock
0x7f9b9e2e6c00 (1)
	/opt/voip/asterisk-1.6.1.0/sbin/asterisk(ast_bt_get_addresses+0x1a)
[0x4c6870]
	/opt/voip/asterisk-1.6.1.0//lib/asterisk/modules/chan_sip.so
[0x7f9b9e0655b7]
	/opt/voip/asterisk-1.6.1.0//lib/asterisk/modules/chan_sip.so
[0x7f9b9e0ba9d8]
	/opt/voip/asterisk-1.6.1.0//lib/asterisk/modules/chan_sip.so
[0x7f9b9e0ba79e]
	/opt/voip/asterisk-1.6.1.0/sbin/asterisk(ast_io_wait+0x1ba) [0x4bbf30]
	/opt/voip/asterisk-1.6.1.0//lib/asterisk/modules/chan_sip.so
[0x7f9b9e0bc18d]
	/opt/voip/asterisk-1.6.1.0/sbin/asterisk [0x53f973]
	/lib/libpthread.so.0 [0x7f9b9f63ffc7]
	/lib/libc.so.6(clone+0x6d) [0x7f9b9fb285ad]
=== ---> Lock https://issues.asterisk.org/view.php?id=1 (chan_sip.c): MUTEX 6464
find_call sip_pvt_ptr
0x7f9b984a1460 (1)
	/opt/voip/asterisk-1.6.1.0/sbin/asterisk(ast_bt_get_addresses+0x1a)
[0x4c6870]
	/opt/voip/asterisk-1.6.1.0/sbin/asterisk [0x442f79]
	/opt/voip/asterisk-1.6.1.0/sbin/asterisk(_ao2_lock+0x53) [0x442e15]
	/opt/voip/asterisk-1.6.1.0//lib/asterisk/modules/chan_sip.so
[0x7f9b9e078d60]
	/opt/voip/asterisk-1.6.1.0//lib/asterisk/modules/chan_sip.so
[0x7f9b9e0ba9ec]
	/opt/voip/asterisk-1.6.1.0//lib/asterisk/modules/chan_sip.so
[0x7f9b9e0ba79e]
	/opt/voip/asterisk-1.6.1.0/sbin/asterisk(ast_io_wait+0x1ba) [0x4bbf30]
	/opt/voip/asterisk-1.6.1.0//lib/asterisk/modules/chan_sip.so
[0x7f9b9e0bc18d]
	/opt/voip/asterisk-1.6.1.0/sbin/asterisk [0x53f973]
	/lib/libpthread.so.0 [0x7f9b9f63ffc7]
	/lib/libc.so.6(clone+0x6d) [0x7f9b9fb285ad]
=== -------------------------------------------------------------------
===
=======================================================================

Please advice...

======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0015023 [patch] Bad locking logic on res_config...
====================================================================== 

---------------------------------------------------------------------- 
 (0104775) svnbot (reporter) - 2009-05-14 14:21
 https://issues.asterisk.org/view.php?id=15090#c104775 
---------------------------------------------------------------------- 
Repository: asterisk-addons
Revision: 914

_U  branches/1.6.2/
U   branches/1.6.2/res/res_config_mysql.c

------------------------------------------------------------------------
r914 | tilghman | 2009-05-14 14:21:20 -0500 (Thu, 14 May 2009) | 14 lines

Merged revisions 910 via svnmerge from 
https://origsvn.digium.com/svn/asterisk-addons/trunk

........
  r910 | tilghman | 2009-05-14 14:16:53 -0500 (Thu, 14 May 2009) | 7 lines
  
  Change database list to be rwlist locks, to avoid a potential deadlock
between 2 readers.
  (closes issue https://issues.asterisk.org/view.php?id=15023, related to issue
https://issues.asterisk.org/view.php?id=15090)
   Reported by: cristiandimache
   Patches: 
         20090514__issue15090.diff.txt uploaded by tilghman (license 14)
   Tested by: cristiandimache
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk-addons?view=rev&revision=914 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-05-14 14:21 svnbot         Checkin                                      
2009-05-14 14:21 svnbot         Note Added: 0104775                          
======================================================================




More information about the asterisk-bugs mailing list