[Home]

Summary:DAHLIN-00040: Reference counts on dahdi_echocan_mg2 can be corrupted and prevent unloading dahdi
Reporter:Shaun Ruffell (sruffell)Labels:
Date Opened:2008-09-17 10:09:43Date Closed:2009-06-28 23:47:27
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:dahdi (the module)
Versions:2.0.0-rc4 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:The reference count on the dahdi_echocan_mg2 appears to go negative sometimes when chan_dahdi.so fails to load which can then prevent reloading the DAHDI modules until system restart.

****** STEPS TO REPRODUCE ******

I do not have access to the machine with the exact configuration currently, but with this /etc/dahdi/system.conf

# Span 1: TE4/2/1 "T4XXP (PCI) Card 2 Span 1" B8ZS/ESF RED
span=1,1,0,esf,b8zs
# termtype: te
bchan=1-23
dchan=24
echocanceller=mg2,1-23

# Span 2: TE4/2/2 "T4XXP (PCI) Card 2 Span 2" B8ZS/ESF RED
span=2,2,0,esf,b8zs
# termtype: te
bchan=25-47
dchan=48
echocanceller=mg2,25-47

# Span 3: TE4/2/3 "T4XXP (PCI) Card 2 Span 3" B8ZS/ESF RED
span=3,3,0,esf,b8zs
# termtype: te
bchan=49-71
dchan=72
echocanceller=mg2,49-71

# Span 4: TE4/2/4 "T4XXP (PCI) Card 2 Span 4" B8ZS/ESF RED
span=4,4,0,esf,b8zs
# termtype: te
bchan=73-95
dchan=96
echocanceller=mg2,73-95

# Span 5: TE4/0/1 "T4XXP (PCI) Card 0 Span 1" B8ZS/ESF RED
span=5,5,0,esf,b8zs
# termtype: te
bchan=97-119
dchan=120
echocanceller=mg2,97-119

# Span 6: TE4/0/2 "T4XXP (PCI) Card 0 Span 2" B8ZS/ESF RED
span=6,6,0,esf,b8zs
# termtype: te
bchan=121-143
dchan=144
echocanceller=mg2,121-143

# Span 7: TE4/0/3 "T4XXP (PCI) Card 0 Span 3" B8ZS/ESF RED
span=7,7,0,esf,b8zs
# termtype: te
bchan=145-167
dchan=168
echocanceller=mg2,145-167

# Span 8: TE4/0/4 "T4XXP (PCI) Card 0 Span 4" B8ZS/ESF RED
span=8,8,0,esf,b8zs
# termtype: te
bchan=169-191
dchan=192
echocanceller=mg2,169-191

# Span 9: TE4/1/1 "T4XXP (PCI) Card 1 Span 1" B8ZS/ESF RED
span=9,9,0,esf,b8zs
# termtype: te
bchan=193-215
dchan=216
echocanceller=mg2,193-215

# Span 10: TE4/1/2 "T4XXP (PCI) Card 1 Span 2" B8ZS/ESF RED
span=10,10,0,esf,b8zs
# termtype: te
bchan=217-239
dchan=240
echocanceller=mg2,217-239

# Span 11: TE4/1/3 "T4XXP (PCI) Card 1 Span 3" B8ZS/ESF RED
span=11,11,0,esf,b8zs
# termtype: te
bchan=241-263
dchan=264
echocanceller=mg2,241-263

# Span 12: TE4/1/4 "T4XXP (PCI) Card 1 Span 4" (MASTER) B8ZS/ESF
span=12,12,0,esf,b8zs
# termtype: te
bchan=265-287
dchan=288
echocanceller=mg2,265-287

# Global data

loadzone = us
defaultzone = us




and /etc/asterisk/chan_dahdi.conf configured to use group 12 with fxo_ks  signalling, chan_dahdi.so would fail to load and then the reference count on the echo canceler module would be negative                      
Comments:By: Digium Subversion (svnbot) 2008-09-17 10:16:21

Repository: dahdi
Revision: 4917

U   linux/trunk/drivers/dahdi/dahdi-base.c

------------------------------------------------------------------------
r4917 | sruffell | 2008-09-17 10:16:19 -0500 (Wed, 17 Sep 2008) | 9 lines

Turn off reference counting on the echo canceller modules in order to prevent
misconfigurations from preventing the drivers from unloading.  

NOTE: This is only a temporary workaround, since it also means that the
echocanceller can be unloaded by an administrator while in use, which would
most likely result in a kernel oops.

Related to issue DAHLIN-40.

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

http://svn.digium.com/view/dahdi?view=rev&revision=4917

By: Digium Subversion (svnbot) 2009-06-28 23:47:27

Repository: dahdi
Revision: 6785

U   linux/trunk/drivers/dahdi/dahdi-base.c

------------------------------------------------------------------------
r6785 | sruffell | 2009-06-28 23:47:26 -0500 (Sun, 28 Jun 2009) | 5 lines

echocan: Properly keep the reference counts for the echocan modules.

(closes issue DAHLIN-40)
(closes issue DAHLIN-117)
Reported by: sruffell, tzafrir
------------------------------------------------------------------------

http://svn.digium.com/view/dahdi?view=rev&revision=6785