[asterisk-bugs] [Asterisk 0012307]: Deadlock in chan_local

noreply at bugs.digium.com noreply at bugs.digium.com
Wed Mar 26 10:51:04 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=12307 
====================================================================== 
Reported By:                callguy
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   12307
Category:                   Channels/chan_local
Reproducibility:            always
Severity:                   block
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.18 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 105409 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             03-26-2008 10:46 CDT
Last Modified:              03-26-2008 10:51 CDT
====================================================================== 
Summary:                    Deadlock in chan_local
Description: 
We are seeing in certain situations (mainly a SIP hairpin that redirects a
call on the same server out to another user via the local channel) a
deadlock will occur. Once the deadlock occurs the system will continue to
process calls for a period of time, but will eventually hang completely. 

Console output, core show locks, and output of ast_grab core attached. 
====================================================================== 

---------------------------------------------------------------------- 
 callguy - 03-26-08 10:51  
---------------------------------------------------------------------- 
Here are 2 asterisk log snippets.  In both cases notice the ERROR:

/usr/src/asterisk-trunk/1.4/r105049/asterisk-1.4/include/asterisk/lock.h:
chan_local.c line 179 (local_queue_frame): Error releasing mutex: Operation
not permitted

In both cases it the same person dialing a ten digit local number in their
pbx, which causes a SIP hairpin and creation of a LOCAL channel.  

FIRST EXAMPLE

[Mar 24 12:08:28] VERBOSE[22690] logger.c:     -- Executing
[15555555555 at XXXX:1] Goto("SIP/XXXX-p2533-b6e6b2e8", "5555555555|1") in new
stack
[Mar 24 12:08:28] VERBOSE[22690] logger.c:     -- Goto
(XXXX,5555555555,1)
[Mar 24 12:08:28] VERBOSE[22690] logger.c:     -- Executing
[5555555555 at XXXX:1] Macro("SIP/XXXX-p2533-b6e6b2e8",
"voip-nocongest-out|5555555555|srvr|70") in new stack
[Mar 24 12:08:28] VERBOSE[22690] logger.c:     -- Executing
[s at macro-voip-nocongest-out:1] Dial("SIP/XXXX-p2533-b6e6b2e8",
"SIP/5555555555 at srvr|70") in new stack
[Mar 24 12:08:28] VERBOSE[22690] logger.c:     -- Called 5555555555 at srvr
[Mar 24 12:08:28] VERBOSE[22690] logger.c:     -- Now forwarding
SIP/XXXX-p2533-b6e6b2e8 to 'Local/5555555555 at pstn-in' (thanks to
SIP/srvr-0a6228d0)
[Mar 24 12:08:28] VERBOSE[22690] logger.c:     --
Local/5555555555 at pstn-in-19eb,1 answered SIP/XXXX-p2533-b6e6b2e8
[Mar 24 12:09:34] ERROR[22690]
/usr/src/asterisk-trunk/1.4/r105049/asterisk-1.4/include/asterisk/lock.h:
chan_local.c line 179 (local_queue_frame): mutex '&us->lock' freed more
times than we've locked!
[Mar 24 12:09:34] ERROR[22690]
/usr/src/asterisk-trunk/1.4/r105049/asterisk-1.4/include/asterisk/lock.h:
chan_local.c line 179 (local_queue_frame): Error releasing mutex: Operation
not permitted [Mar 24 12:09:34] ERROR[22690]
/usr/src/asterisk-trunk/1.4/r105049/asterisk-1.4/include/asterisk/lock.h:
channel.c line 1226 (ast_channel_free): Error destroying mutex &chan->lock:
Device or resource busy
[Mar 24 12:09:34] VERBOSE[22690] logger.c:   == Spawn extension
(macro-voip-nocongest-out, s, 1) exited non-zero on
'SIP/XXXX-p2533-b6e6b2e8' in macro 'voip-nocongest-out'
[Mar 24 12:09:34] VERBOSE[22690] logger.c:   == Spawn extension
(macro-voip-nocongest-out, s, 1) exited non-zero on
'SIP/XXXX-p2533-b6e6b2e8'


SECOND EXAMPLE 

[Mar 24 12:52:14] VERBOSE[25184] logger.c:     -- Executing
[15555555555 at XXXX:1] Goto("SIP/XXXX-p2533-b6a98078", "5555555555|1") in new
stack
[Mar 24 12:52:14] VERBOSE[25184] logger.c:     -- Goto
(XXXX,5555555555,1)
[Mar 24 12:52:14] VERBOSE[25184] logger.c:     -- Executing
[5555555555 at XXXX:1] Macro("SIP/XXXX-p2533-b6a98078",
"voip-nocongest-out|5555555555|srvr|70") in new stack
[Mar 24 12:52:14] VERBOSE[25184] logger.c:     -- Executing
[s at macro-voip-nocongest-out:1] Dial("SIP/XXXX-p2533-b6a98078",
"SIP/5555555555 at srvr|70") in new stack
[Mar 24 12:52:14] VERBOSE[25184] logger.c:     -- Called 5555555555 at srvr
[Mar 24 12:52:14] VERBOSE[25184] logger.c:     -- Now forwarding
SIP/XXXX-p2533-b6a98078 to 'Local/5555555555 at pstn-in' (thanks to
SIP/srvr-09505590)
[Mar 24 12:52:14] VERBOSE[25184] logger.c:     --
Local/5555555555 at pstn-in-f751,1 answered SIP/XXXX-p2533-b6a98078
[Mar 24 12:53:32] ERROR[25184]
/usr/src/asterisk-trunk/1.4/r105049/asterisk-1.4/include/asterisk/lock.h:
chan_local.c line 179 (local_queue_frame): mutex '&us->lock' freed more
times than we've locked!
[Mar 24 12:53:32] ERROR[25184]
/usr/src/asterisk-trunk/1.4/r105049/asterisk-1.4/include/asterisk/lock.h:
chan_local.c line 179 (local_queue_frame): Error releasing mutex: Operation
not permitted [Mar 24 12:54:04] ERROR[25184]
/usr/src/asterisk-trunk/1.4/r105049/asterisk-1.4/include/asterisk/lock.h:
channel.c line 1226 (ast_channel_free): Error destroying mutex &chan->lock:
Device or resource busy
[Mar 24 12:54:04] VERBOSE[25184] logger.c:   == Spawn extension
(macro-voip-nocongest-out, s, 1) exited non-zero on
'SIP/XXXX-p2533-b6a98078' in macro 'voip-nocongest-out'
[Mar 24 12:54:04] VERBOSE[25184] logger.c:   == Spawn extension
(macro-voip-nocongest-out, s, 1) exited non-zero on
'SIP/XXXX-p2533-b6a98078' 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
03-26-08 10:51  callguy        Note Added: 0084584                          
======================================================================




More information about the asterisk-bugs mailing list