[asterisk-bugs] [Asterisk 0015458]: [patch] mISDN rejects calls - NO FREE CHAN IN STACK

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Oct 1 18:21:21 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15458 
====================================================================== 
Reported By:                FabienToune
Assigned To:                rmudgett
====================================================================== 
Project:                    Asterisk
Issue ID:                   15458
Category:                   Channels/chan_misdn
Reproducibility:            random
Severity:                   major
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.6.0.9 
JIRA:                        
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-07-07 10:36 CDT
Last Modified:              2009-10-01 18:21 CDT
====================================================================== 
Summary:                    [patch] mISDN rejects calls - NO FREE CHAN IN STACK
Description: 
This issue is similar to 0013488 but somehow different because of the
version used.
I use a Beronet 4 BRI ports card, with only 3 ports configured, 
mISDN-1_1_9.1

Randomly, with an average frequence of once every two weeks, but sometimes
two days in a row, mISDN starts to be able to use one port only (2 calls).
The rest of the calls are rejected with :

Tue Jul  7 16:47:47 2009: P[ 1]  handle_frm: frm->addr:42000103
frm->prim:3f082
Tue Jul  7 16:47:47 2009: P[ 1]  channel with stid:0 not in use!
Tue Jul  7 16:47:47 2009: P[ 1]  handle_frm: frm->addr:42000103
frm->prim:30582
Tue Jul  7 16:47:47 2009: P[ 1]  set_channel: bc->channel:0 channel:1
Tue Jul  7 16:47:47 2009: P[ 1]  I IND :NEW_CHANNEL oad:488235625
dad:65714545 pid:1974 state:none
Tue Jul  7 16:47:47 2009: P[ 1]   --> channel:1 mode:TE cause:16 ocause:16
rad: cad:
Tue Jul  7 16:47:47 2009: P[ 1]   --> info_dad: onumplan:2 dnumplan:2
rnumplan:  cpnnumplan:0
Tue Jul  7 16:47:47 2009: P[ 1]   --> caps:Speech pi:0 keypad:
sending_complete:1
Tue Jul  7 16:47:47 2009: P[ 1]   --> screen:0 --> pres:0
Tue Jul  7 16:47:47 2009: P[ 1]   --> addr:0 l3id:2013c b_stid:0
layer_id:50020180
Tue Jul  7 16:47:47 2009: P[ 1]   --> facility:Fac_None
out_facility:Fac_None
Tue Jul  7 16:47:47 2009: P[ 1]   --> bc_state:BCHAN_CLEANED
Tue Jul  7 16:47:47 2009: P[ 1]  Chan not existing at the moment
bc->l3id:2013c bc:0x82001d4 event:NEW_CHANNEL port:1 channel:1
Tue Jul  7 16:47:47 2009: P[ 1]  NO USERUESRINFO
Tue Jul  7 16:47:47 2009: P[ 1]   !! NO FREE CHAN IN STACK
Tue Jul  7 16:47:47 2009: P[ 1]  Requested Channel Already in Use
releasing this call with cause 34!!!!
Tue Jul  7 16:47:47 2009: P[ 1]  I SEND:RELEASE_COMPLETE oad:488235625
dad:65714545 pid:1974
Tue Jul  7 16:47:47 2009: P[ 1]   --> bc_state:BCHAN_CLEANED
Tue Jul  7 16:47:47 2009: P[ 1]   --> channel:0 mode:TE cause:16 ocause:34
rad: cad:
Tue Jul  7 16:47:47 2009: P[ 1]   --> info_dad: onumplan:2 dnumplan:2
rnumplan:  cpnnumplan:0
Tue Jul  7 16:47:47 2009: P[ 1]   --> caps:Speech pi:3 keypad:
sending_complete:1
Tue Jul  7 16:47:47 2009: P[ 1]   --> screen:0 --> pres:0
Tue Jul  7 16:47:47 2009: P[ 1]   --> addr:0 l3id:2013c b_stid:0
layer_id:50020180
Tue Jul  7 16:47:47 2009: P[ 1]   --> facility:Fac_None
out_facility:Fac_None
Tue Jul  7 16:47:47 2009: P[ 1]  $$$ CLEANUP CALLED pid:1974
Tue Jul  7 16:47:47 2009: P[ 1]  couldn't handle event
Tue Jul  7 16:47:47 2009: P[ 1]  Sending msg, prim:35a80 addr:41000104
dinfo:2013c
Tue Jul  7 16:47:47 2009: P[ 1]  handle_frm: frm->addr:42000103
frm->prim:35a81
Tue Jul  7 16:47:47 2009: P[ 1]  CC_RELEASE_COMPLETE|CONFIRM [TE] 
Tue Jul  7 16:47:47 2009: P[ 1]  I IND :RELEASE_COMPLETE oad: dad:
pid:1974 state:none
Tue Jul  7 16:47:47 2009: P[ 1]   --> channel:0 mode:TE cause:16 ocause:34
rad: cad:
Tue Jul  7 16:47:47 2009: P[ 1]   --> info_dad: onumplan:0 dnumplan:0
rnumplan:0 cpnnumplan:0
Tue Jul  7 16:47:47 2009: P[ 1]   --> caps:Speech pi:0 keypad:
sending_complete:0
Tue Jul  7 16:47:47 2009: P[ 1]   --> screen:0 --> pres:0
Tue Jul  7 16:47:47 2009: P[ 1]   --> addr:0 l3id:2013c b_stid:0
layer_id:50020180
Tue Jul  7 16:47:47 2009: P[ 1]   --> facility:Fac_None
out_facility:Fac_None
Tue Jul  7 16:47:47 2009: P[ 1]   --> bc_state:BCHAN_CLEANED
Tue Jul  7 16:47:47 2009: P[ 1]   --> no Ch, so we've already released.
Tue Jul  7 16:47:47 2009: P[ 0]  Cannot hangup chan, no ch
Tue Jul  7 16:47:47 2009: P[ 1]  release_chan: Ch not found!
Tue Jul  7 16:47:47 2009: P[ 1]  $$$ CLEANUP CALLED pid:1974
Tue Jul  7 16:47:47 2009: P[ 1]  handle_frm: frm->addr:42000103
frm->prim:3f182
Tue Jul  7 16:47:47 2009: P[ 1]   --> lib: RELEASE_CR Ind with l3id:2013c
Tue Jul  7 16:47:47 2009: P[ 1]   --> lib: CLEANING UP l3id: 2013c
Tue Jul  7 16:47:47 2009: P[ 1]  $$$ CLEANUP CALLED pid:1974

Other ports are free, but mISDN seems to focus only on port 1...

I usually try to reload mISDN, to restart port 1, port 2, port 3, and
somehow, it works. Today, I restarted ports, but the problem came back very
fast/was not solved... If I restart the server, it's ok, but can't do that
during use...

This is a production server, and it's getting harder to manage...

I'm now trying to change method from round-robin to standard_desc (first
try was standard...)

Here is my misdn.conf

[general]
misdn_init=/etc/misdn-init.conf
debug=4
stop_tone_after_first_digit=yes
bridging=yes
tracefile=/var/log/asterisk/misdn.log

[default]
context=mISDN
language=fr
senddtmf=yes
allowed_bearers=all
nationalprefix=0
internationalprefix=00
rxgain=0
txgain=0

echocancel=yes

te_choose_channel=no

pmp_l1_check=yes
method=standard_dec
dialplan=0
localdialplan=0
cpndialplan=0
early_bconnect=yes
always_immediate=no
immediate=no
hdlc=yes

astdtmf=yes

presentation=-1
screen=-1

block_on_alarm=no
need_more_infos=no

[mISDN]
ports=1,2,3
context=mISDN
msns=*

======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0015490 [patch] mISDN rejects incoming calls (r...
====================================================================== 

---------------------------------------------------------------------- 
 (0111766) svnbot (reporter) - 2009-10-01 18:21
 https://issues.asterisk.org/view.php?id=15458#c111766 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 221769

U   branches/1.4/channels/misdn/isdn_lib.c
U   branches/1.4/channels/misdn/isdn_lib_intern.h

------------------------------------------------------------------------
r221769 | rmudgett | 2009-10-01 18:21:19 -0500 (Thu, 01 Oct 2009) | 26
lines

Occasionally losing use of B channels in chan_misdn.

I have not been able to reproduce the problem of losing channels.
However, I have seen in the code a reentrancy problem that might give
these symptoms.

The reentrancy patch does several things:
1) Guards B channel and B channel structure allocation.
2) Makes the B channel structure find routines more precise in locating
records.
3) Never leave a B channel allocated if we received cause 44.

The last item may cause temporary outgoing call problems, but they should
clear when the line becomes idle.

(closes issue https://issues.asterisk.org/view.php?id=15490)
Reported by: slutec18
Patches:
      issue15490_channel_alloc_reentrancy.patch uploaded by rmudgett
(license 664)
Tested by: rmudgett, slutec18

(closes issue https://issues.asterisk.org/view.php?id=15458)
Reported by: FabienToune
Patches:
      issue15458_channel_alloc_reentrancy.patch uploaded by rmudgett
(license 664)
Tested by: FabienToune, rmudgett, slutec18

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

http://svn.digium.com/view/asterisk?view=rev&revision=221769 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-10-01 18:21 svnbot         Checkin                                      
2009-10-01 18:21 svnbot         Note Added: 0111766                          
======================================================================




More information about the asterisk-bugs mailing list