Segfult in libswift

Integrating the Cepstral engine

Segfult in libswift

Postby allan » Fri Jul 12, 2013 10:20 am

I'm running Asterisk with Swift and after running for a few hours I get a segfault error on libswift which causes asterisk to close.

The exact entry in the syslog for the error is:
Jul 12 10:28:29 dialer kernel: [180682.098942] asterisk[13028]: segfault at 38 ip 00007fe9fab606f7 sp 00007fe9dd0fe120 error 6 in libswift.so.6.0[7fe9faafd000+95000]

Has anyone else faced a similar problem or has an idea on how to fix this?

swift -VV
Code: Select all
Port License Information Detail:

|-------------------------------------------------|
| Port | Status | Started | Avail. | checkin |
| | | sec ago | in secs | sec ago |
|------|------------|---------|---------|---------|
| 0 | IN USE | 0 | 0 | 0 |
| 1 | UNUSED | 0 | 0 | 0 |
|-------------------------------------------------|

Summary: 2 Port(s) Registered
1 Port(s) In Use

Copyright (C) 2000-2012, Cepstral LLC.


swift -V
Code: Select all
Cepstral Swift v6.0.1, March 2012

Default Voice: David-8kHz v6.0.0
Language: US English v5.1.0
Lexicon: unknown v0.0.0

Concurrency: 2 Port(s) Registered
0 Port(s) In Use

Distribution: No audio distribution license was found.
Saving audio to a file is disabled.

Copyright (C) 2000-20012, Cepstral LLC.


swift.conf
Code: Select all
[general]
buffer_size=65535
goto_exten=yes
voice=David-8kHz


It was previously running with only port, which is enough for our current needs. Even so we got another port to make sure that wasn't involved in the error. It persists after the second port was added.

This is Asterisk's log right before the last crash


Code: Select all
-- Executing [s@3_4:9] Set("SIP/alcazarnet-0000115b", "_dialer_threadid=7040") in new stack
-- Executing [s@3_4:10] Set("SIP/alcazarnet-0000115b", "_dialer_phoneid=204207") in new stack
-- Executing [s@3_4:11] Set("SIP/alcazarnet-0000115b", "_dialer_campaignid=41") in new stack
-- Executing [s@3_4:12] Set("SIP/alcazarnet-0000115b", "_dialer_poolid=1") in new stack
-- Executing [s@3_4:13] Set("SIP/alcazarnet-0000115b", "_result=Answered") in new stack
-- Executing [s@3_4:14] AGI("SIP/alcazarnet-0000115b", ""dialer_callresult.jar",,3132,maybe,started,agentphone_,phone_,firstname_<REMOVED> R,lastname_<REMOVED>,threadid_7040,phoneid_204207,campaignid_41,options_,result_Answered,poolid_1") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/dialer_callresult.jar
-- AGI Script dialer_callresult.jar completed, returning 0
-- Executing [s@3_4:15] AMD("SIP/alcazarnet-0000115b", "") in new stack
-- AMD: SIP/alcazarnet-0000115b 7142029822 (N/A) (Fmt: ulaw)
-- AMD: initialSilence [2500] greeting [1500] afterGreetingSilence [800] totalAnalysisTime [5000] minimumWordLength [100] betweenWordsSilence [50] maximumNumberOfWords [5] silenceThreshold [256] maximumWordLength [5000]
-- AMD: Channel [SIP/alcazarnet-0000115b]. Changed state to STATE_IN_SILENCE
-- AMD: Channel [SIP/alcazarnet-0000115d]. HUMAN: silenceDuration:800 afterGreetingSilence:800
== Manager 'manager' logged off from 96.243.17.228
-- Executing [s@3_4:16] GotoIf("SIP/alcazarnet-0000115d", "0?machine:begin") in new stack
-- Goto (3_4,s,26)
-- Executing [s@3_4:26] Set("SIP/alcazarnet-0000115d", "stage=0") in new stack
-- Executing [s@3_4:27] BackGround("SIP/alcazarnet-0000115d", "/etc/asterisk/dialer_extensions/2_2/message1") in new stack
-- Playing '/etc/asterisk/dialer_extensions/2_2/message1.slin' (language 'en')
-- Executing [s@3_4:24] WaitExten("SIP/alcazarnet-00001158", "10") in new stack
-- Executing [s@3_4:21] Swift("SIP/alcazarnet-00001161", "CARRIE L,1,1") in new stack
-- AMD: Channel [SIP/alcazarnet-0000115b]. Word detected. iWordsCount:1
-- AMD: Channel [SIP/alcazarnet-0000115b]. Detected Talk, previous silence duration: 1100
[Jul 12 10:28:28] NOTICE[13062][C-00001141]: app_swift.c:586 app_exec: DTMF =
[Jul 12 10:28:28] NOTICE[13062][C-00001141]: app_swift.c:593 app_exec: GoTo(3_4||1) : [Jul 12 10:28:28] NOTICE[13062][C-00001141]: app_swift.c:614 app_exec: FAILED
-- Executing [s@3_4:22] Swift("SIP/alcazarnet-00001162", "MILLER,1,1") in new stack
-- AMD: Channel [SIP/alcazarnet-0000115b]. Detected Talk, previous silence duration: 40
-- AMD: Channel [SIP/alcazarnet-0000115b]. Changed state to STATE_IN_SILENCE
-- AMD: Channel [SIP/alcazarnet-0000115b]. Detected Talk, previous silence duration: 80
-- AMD: Channel [SIP/alcazarnet-0000115b]. Word detected. iWordsCount:2
-- AMD: Channel [SIP/alcazarnet-0000115b]. Changed state to STATE_IN_SILENCE
-- AMD: Channel [SIP/alcazarnet-0000115b]. Detected Talk, previous silence duration: 80
-- Got SIP response 503 "Service Unavailable - Route Advance" back from 199.96.248.143:5060
> Channel SIP/alcazarnet-00001154 was never answered.
== Manager 'manager' logged off from 96.243.17.228
-- AMD: Channel [SIP/alcazarnet-0000115b]. Word detected. iWordsCount:3
== Manager 'manager' logged on from 96.243.17.228
== Using SIP RTP CoS mark 5
-- AMD: Channel [SIP/alcazarnet-0000115b]. Changed state to STATE_IN_SILENCE
-- Executing [s@3_4:21] Swift("SIP/alcazarnet-00001159", "JENNIFER D,1,1") in new stack
== Manager 'manager' logged on from 96.243.17.228
== Using SIP RTP CoS mark 5
-- AMD: Channel [SIP/alcazarnet-0000115b]. Detected Talk, previous silence duration: 80
-- AMD: Channel [SIP/alcazarnet-0000115b]. Word detected. iWordsCount:4
> Channel SIP/alcazarnet-0000115c was answered
-- Executing [s@3_4:1] Set("SIP/alcazarnet-0000115c", "options=") in new stack
-- Executing [s@3_4:2] Set("SIP/alcazarnet-0000115c", "result=Answered") in new stack
-- Executing [s@3_4:3] Set("SIP/alcazarnet-0000115c", "_dialer_dialerip=") in new stack
-- Executing [s@3_4:4] Set("SIP/alcazarnet-0000115c", "_dialer_dialerport=3132") in new stack
-- Executing [s@3_4:5] Set("SIP/alcazarnet-0000115c", "_dialer_dialersecret=maybe") in new stack
-- Executing [s@3_4:6] Set("SIP/alcazarnet-0000115c", "_dialer_phone=") in new stack
-- Executing [s@3_4:7] Set("SIP/alcazarnet-0000115c", "_dialer_firstname=<REMOVED>") in new stack
-- Executing [s@3_4:8] Set("SIP/alcazarnet-0000115c", "_dialer_lastname=<REMOVED>") in new stack
-- Executing [s@3_4:9] Set("SIP/alcazarnet-0000115c", "_dialer_threadid=7042") in new stack
-- Executing [s@3_4:10] Set("SIP/alcazarnet-0000115c", "_dialer_phoneid=204341") in new stack
-- Executing [s@3_4:11] Set("SIP/alcazarnet-0000115c", "_dialer_campaignid=41") in new stack
-- Executing [s@3_4:12] Set("SIP/alcazarnet-0000115c", "_dialer_poolid=1") in new stack
-- Executing [s@3_4:13] Set("SIP/alcazarnet-0000115c", "_result=Answered") in new stack
-- Executing [s@3_4:14] AGI("SIP/alcazarnet-0000115c", ""dialer_callresult.jar",,3132,maybe,started,agentphone_,phone_,firstname_<REMOVED> R,lastname_<REMOVED>,threadid_7042,phoneid_204341,campaignid_41,options_,result_Answered,poolid_1") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/dialer_callresult.jar
== Manager 'manager' logged off from 96.243.17.228
-- AGI Script dialer_callresult.jar completed, returning 0
-- Executing [s@3_4:15] AMD("SIP/alcazarnet-0000115c", "") in new stack
-- AMD: SIP/alcazarnet-0000115c 7142029822 (N/A) (Fmt: ulaw)
-- AMD: initialSilence [2500] greeting [1500] afterGreetingSilence [800] totalAnalysisTime [5000] minimumWordLength [100] betweenWordsSilence [50] maximumNumberOfWords [5] silenceThreshold [256] maximumWordLength [5000]
-- AMD: Channel [SIP/alcazarnet-0000115c]. Changed state to STATE_IN_SILENCE
-- AMD: Channel [SIP/alcazarnet-0000115b]. Changed state to STATE_IN_SILENCE
-- AMD: Channel [SIP/alcazarnet-0000115b]. Detected Talk, previous silence duration: 60
[Jul 12 10:28:29] NOTICE[13028][C-00001140]: app_swift.c:586 app_exec: DTMF =
[Jul 12 10:28:29] NOTICE[13028][C-00001140]: app_swift.c:593 app_exec: GoTo(3_4||1) : [Jul 12 10:28:29] NOTICE[13028][C-00001140]: app_swift.c:614 app_exec: FAILED
-- Executing [s@3_4:22] Swift("SIP/alcazarnet-00001161", "NYVOLD,1,1") in new stack
[Jul 12 10:28:29] NOTICE[13062][C-00001141]: app_swift.c:586 app_exec: DTMF =
[Jul 12 10:28:29] NOTICE[13062][C-00001141]: app_swift.c:593 app_exec: GoTo(3_4||1) : [Jul 12 10:28:29] NOTICE[13062][C-00001141]: app_swift.c:614 app_exec: FAILED
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups
root@dialer:~# asterisk -r
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)


These are the specific lines that call Swift
Code: Select all
-- Executing [s@3_4:21] Swift("SIP/alcazarnet-00001161", "CARRIE L,1,1") in new stack
-- Executing [s@3_4:22] Swift("SIP/alcazarnet-00001162", "MILLER,1,1") in new stack
-- Executing [s@3_4:21] Swift("SIP/alcazarnet-00001159", "JENNIFER D,1,1") in new stack
-- Executing [s@3_4:22] Swift("SIP/alcazarnet-00001161", "NYVOLD,1,1") in new stack


These log entries are called with:
Code: Select all
Swift(CARRIE L,1,1)
Swift(MILLER,1,1)
Swift(JENNIFER D,1,1)
Swift(NYVOLD,1,1)


The lines in the dialplan that executes this are:
Code: Select all
exten => s,n,Swift(${dialer_firstname},1,1)
exten => s,n,Swift(${dialer_lastname},1,1)


I'd gladly provide any other information that may help debug this.
allan
 
Posts: 1
Joined: Fri Jul 12, 2013 10:03 am

Re: Segfult in libswift

Postby AdamW » Mon Jul 15, 2013 8:28 am

Hi,

Like I replied in your ticket, I have not been able to reproduce this issue. What we need is a backtrace from you that will hopefully point us to the place where the crash is occurring.

These instructions for using gdb to generate a backtrace are about as thorough as you could hope for
https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace

Adam
-- The Cepstral Support Team
User avatar
AdamW
Administrator
 
Posts: 19
Joined: Tue Oct 11, 2011 10:16 am


Return to Asterisk

Who is online

Users browsing this forum: No registered users and 3 guests

cron