[asterisk-bugs] [Asterisk 0012766]: Failure of resetting of a PRI B-Channel causes deadlock in process

noreply at bugs.digium.com noreply at bugs.digium.com
Sat May 31 01:41:06 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=12766 
====================================================================== 
Reported By:                mavetju
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   12766
Category:                   Channels/chan_zap
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.19 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             05-31-2008 01:31 CDT
Last Modified:              05-31-2008 01:41 CDT
====================================================================== 
Summary:                    Failure of resetting of a PRI B-Channel causes
deadlock in process
Description: 
By default, once every hour, the Asterisk system resets the channels of a
PRI. This workflow is based on "reset the first channel"; when the reset
gets acknowledged "let's reset the next channel" until all channels are
done. This works fine if all channels get acknowledged, but when an
acknowledgment isn't received, the whole system is deadlocked for that
PRI.

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

---------------------------------------------------------------------- 
 mavetju - 05-31-08 01:41  
---------------------------------------------------------------------- 
To overcome this deadlock I have made the following changes:

- Added the field "resettimeout" to the struct pri.
- Changed the format of resetting in struct zt_pvt from int:1 to time_t.
- In the function pri_check_restart(), the pri->pvt->resetting now gets
the time it was resetted instead of a flag.
- In the function pri_dchannel() where it checks if the PRI needs to be
restarted, check if the time between the reset of the last channel and the
current time is bigger than resettimeout. If so, print a warning, stop the
current channel from being reset and reset the next channel. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
05-31-08 01:41  mavetju        Note Added: 0087599                          
======================================================================




More information about the asterisk-bugs mailing list