[asterisk-bugs] [Asterisk 0015508]: [patch] Segfault - Perhaps in sig_analog.c

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Jul 15 22:38:59 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15508 
====================================================================== 
Reported By:                elguero
Assigned To:                jpeeler
====================================================================== 
Project:                    Asterisk
Issue ID:                   15508
Category:                   Channels/chan_dahdi
Reproducibility:            random
Severity:                   crash
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 206603 
Request Review:              
====================================================================== 
Date Submitted:             2009-07-15 12:52 CDT
Last Modified:              2009-07-15 22:38 CDT
====================================================================== 
Summary:                    [patch] Segfault - Perhaps in sig_analog.c
Description: 
Asterisk is segfaulting when an incoming call from a PRI span is being sent
(dial) on to analog group.

I will attach a backtrace.  This has happened three times and I was able
to catch it the last time.
====================================================================== 

---------------------------------------------------------------------- 
 (0107833) elguero (reporter) - 2009-07-15 22:38
 https://issues.asterisk.org/view.php?id=15508#c107833 
---------------------------------------------------------------------- 
Unfortunately, it is not advancing the channel at all when trying to
allocate with this patch.  Here is what is happening with that patch
applied.  You will see the first call comes in and is allocated properly. 
The second call comes in and it is sent to channel 120 which is currently
in use.  I hang up and try again and it continues to try and send the call
to channel 120.

-- Accepting call from '9784169999' to '0000' on channel 0/5, span 2
    -- Executing Wait("DAHDI/29-1", "2")
    -- Executing NoOp("DAHDI/29-1", "Setting CallerID")
    -- Executing Set("DAHDI/29-1", "CALLERID(all)="PRI4 Incoming" <(617)
999-9999>")
    -- Executing Dial("DAHDI/29-1", "DAHDI/G25,,")
    -- Called G25
    -- DAHDI/120-1 is ringing
    -- DAHDI/120-1 is ringing
    -- DAHDI/120-1 answered DAHDI/29-1
    -- Native bridging DAHDI/29-1 and DAHDI/120-1
    -- Accepting call from '9785699999' to '0000' on channel 0/3, span 2
    -- Executing Wait("DAHDI/27-1", "2")
    -- Executing NoOp("DAHDI/27-1", "Setting CallerID")
    -- Executing Set("DAHDI/27-1", "CALLERID(all)="PRI4 Incoming" <(617)
999-9999>")
    -- Executing Dial("DAHDI/27-1", "DAHDI/G25,,")
[Jul 15 23:02:36] WARNING[29796]: chan_dahdi.c:3371 alloc_sub: Callwait
subchannel of 120 already in use
[Jul 15 23:02:36] ERROR[29796]: sig_analog.c:598 analog_request: Unable to
alloc subchannel
[Jul 15 23:02:36] WARNING[29796]: app_dial.c:1884 dial_exec_full: Unable
to create channel of type 'DAHDI' (cause 17 - User busy)
  == Everyone is busy/congested at this time (1:1/0/0)
    -- Auto fallthrough, channel 'DAHDI/27-1' status is 'BUSY'
    -- Hungup 'DAHDI/27-1'
    -- Channel 0/5, span 2 got hangup request, cause 16
    -- Hanging up on 'DAHDI/120-1'
    -- Hungup 'DAHDI/120-1'
  == Spawn extension (pbx2_pri2_in, 0000, 4) exited non-zero on
'DAHDI/29-1'
    -- Hungup 'DAHDI/29-1'

Without the patch, you will see that the first call comes in.  The second
call is then sent to channel 120 which is in use.  I hung up and tried
again.  This time the call was sent to 119.  But upon hanging up, asterisk
segfaulted.  I believe that I hung up the first call and then the second. 
I don't remember too well now.

-- Accepting call from '9784169999' to '0000' on channel 0/7, span 2
    -- Executing Wait("DAHDI/31-1", "2")
    -- Executing NoOp("DAHDI/31-1", "Setting CallerID")
    -- Executing Set("DAHDI/31-1", "CALLERID(all)="PRI4 Incoming" <(617)
999-9999>")
    -- Executing Dial("DAHDI/31-1", "DAHDI/G25,,")
    -- Called G25
    -- DAHDI/120-1 is ringing
    -- DAHDI/120-1 is ringing
    -- Accepting call from '9785694921' to '0000' on channel 0/14, span 2
    -- Executing Wait("DAHDI/38-1", "2")
    -- Executing NoOp("DAHDI/38-1", "Setting CallerID")
    -- Executing Set("DAHDI/38-1", "CALLERID(all)="PRI4 Incoming" <(617)
886-0000>")
    -- Executing Dial("DAHDI/38-1", "DAHDI/G25,,")
[Jul 15 23:13:09] WARNING[2827]: chan_dahdi.c:3371 alloc_sub: Callwait
subchannel of 120 already in use
[Jul 15 23:13:09] ERROR[2827]: sig_analog.c:595 analog_request: Unable to
alloc subchannel
[Jul 15 23:13:09] WARNING[2827]: app_dial.c:1884 dial_exec_full: Unable to
create channel of type 'DAHDI' (cause 17 - User busy)
  == Everyone is busy/congested at this time (1:1/0/0)
    -- Auto fallthrough, channel 'DAHDI/38-1' status is 'BUSY'
    -- DAHDI/120-1 answered DAHDI/31-1
    -- Native bridging DAHDI/31-1 and DAHDI/120-1
    -- Channel 0/14, span 2 got hangup request, cause 16
    -- Hungup 'DAHDI/38-1'
    -- Accepting call from '9785699999' to '0000' on channel 0/21, span 2
    -- Executing Wait("DAHDI/45-1", "2")
    -- Executing NoOp("DAHDI/45-1", "Setting CallerID")
    -- Executing Set("DAHDI/45-1", "CALLERID(all)="PRI4 Incoming" <(617)
999-9999>")
    -- Executing Dial("DAHDI/45-1", "DAHDI/G25,,")
    -- Called G25
    -- DAHDI/119-1 is ringing
    -- DAHDI/119-1 is ringing
pbx2*CLI>
JABBER: Keep alive packet
    -- DAHDI/119-1 answered DAHDI/45-1
    -- Native bridging DAHDI/45-1 and DAHDI/119-1
    -- Channel 0/21, span 2 got hangup request, cause 16
    -- Hanging up on 'DAHDI/119-1'
    -- Hungup 'DAHDI/119-1'
  == Spawn extension (pbx2_pri2_in, 0000, 4) exited non-zero on
'DAHDI/45-1'
    -- Hungup 'DAHDI/45-1'
    -- Accepting call from '9785699999' to '0000' on channel 0/12, span 2
    -- Executing Wait("DAHDI/36-1", "2")
    -- Executing NoOp("DAHDI/36-1", "Setting CallerID")
    -- Executing Set("DAHDI/36-1", "CALLERID(all)="PRI4 Incoming" <(617)
999-9999>")
    -- Executing Dial("DAHDI/36-1", "DAHDI/G25,,")
    -- Called G25
    -- DAHDI/119-1 is ringing
    -- DAHDI/119-1 is ringing
    -- Channel 0/12, span 2 got hangup request, cause 16
    -- Hanging up on 'DAHDI/119-1'
    -- Hungup 'DAHDI/119-1'
  == Spawn extension (pbx2_pri2_in, 0000, 4) exited non-zero on
'DAHDI/36-1'
    -- Hungup 'DAHDI/36-1'
    -- Accepting call from '9785699999' to '0000' on channel 0/11, span 2
    -- Executing Wait("DAHDI/35-1", "2")
    -- Executing NoOp("DAHDI/35-1", "Setting CallerID")
    -- Executing Set("DAHDI/35-1", "CALLERID(all)="PRI4 Incoming" <(617)
999-9999>")
    -- Executing Dial("DAHDI/35-1", "DAHDI/G25,,")
    -- Called G25
    -- DAHDI/119-1 is ringing
    -- DAHDI/119-1 is ringing
    -- DAHDI/119-1 answered DAHDI/35-1
    -- Native bridging DAHDI/35-1 and DAHDI/119-1
    -- Channel 0/7, span 2 got hangup request, cause 16
pbx2*CLI>
Disconnected from Asterisk server
/usr/sbin/safe_asterisk: line 117:  2771 Segmentation fault      (core
dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS}
>&/dev/${TTY} </dev/${TTY}
Asterisk ended with exit status 139
Asterisk exited on signal 11. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-07-15 22:38 elguero        Note Added: 0107833                          
======================================================================




More information about the asterisk-bugs mailing list