[asterisk-bugs] [Asterisk 0012512]: Deadlock during processing of IAM

noreply at bugs.digium.com noreply at bugs.digium.com
Thu Apr 24 10:15:29 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=12512 
====================================================================== 
Reported By:                arnd
Assigned To:                mattf
====================================================================== 
Project:                    Asterisk
Issue ID:                   12512
Category:                   Channels/chan_zap
Reproducibility:            sometimes
Severity:                   block
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.0 
SVN Revision (number only!): 114560 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             04-24-2008 06:00 CDT
Last Modified:              04-24-2008 10:15 CDT
====================================================================== 
Summary:                    Deadlock during processing of IAM
Description: 
During high call volumes, the SS7 Link goes down. 
The reason is, that there is a potenial Deadlock Situation in chan_zap.

Below is the relevant (as I can see) part of the CLI commando core show
locks.

Afer some looks inside the Code i came to teh opinion, that there is a
race-condition in the function ss7_start_call.

In the function, a new channel gets created with the flag, to start pbx on
that channel.
c = zt_new(p, AST_STATE_RING, 1, SUB_REAL, law, 0);

After that, the Channel gets a log of SS7 related Variables set. During
these operations, the deadlock happens.

So, may it help, to create the channel, without starting the pbx on it,
and call ast_pbx_run(c) after setting the variables ?




====================================================================== 

---------------------------------------------------------------------- 
 russell - 04-24-08 10:15  
---------------------------------------------------------------------- 
Matt, the fix here is that in channel drivers, you always _must_ grab the
channel lock before a channel pvt lock.  You probably have to do some weird
stuff here to unlock the pvt, lock the channel, and then lock the pvt
again. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
04-24-08 10:15  russell        Note Added: 0085947                          
======================================================================




More information about the asterisk-bugs mailing list