[Asterisk-Users] app_dbodbc segfault

Mike Machado mike at homelandtel.com
Fri Apr 30 12:39:37 MST 2004


bt = Back trace?

My gdb experience is limited. I tried to do 

gdb
run -vvvvvvvvv

but it took like 10 minutes for asterisk to fully start, and even then,
it did not seem to be starting correctly.

What is the best way to get a back trace from asterisk?


On Fri, 2004-04-30 at 12:19, brian wrote:
> Ya that one is not the latest one... I'll dig up the one that works! If you
> can provide me a bt I can fix it!
> 
> :)
> 
> bkw
> 
> > -----Original Message-----
> > From: asterisk-users-admin at lists.digium.com [mailto:asterisk-users-
> > admin at lists.digium.com] On Behalf Of Mike Machado
> > Sent: Friday, April 30, 2004 2:05 PM
> > To: asterisk-users at lists.digium.com
> > Subject: [Asterisk-Users] app_dbodbc segfault
> >
> >
> > Is anyone out there using app_dbodbc
> > (http://www.bkw.org/~brian/app_dbodbc.c)? Any problems with it?
> >
> > I was able to get it all working, but it causes * to segfault every now
> > and then. It does not appear to be related to any specific function
> > (ODBCget,ODBCput,ODBCdel,ODBCdelltree). It is 100% repeatable. If I
> > noload the module, everything works fine, but when its running, after
> > calls to any of the applications, * will randomly segfault. The data is
> > going in and out of the database with no problems. I compared the code
> > to app_db.c, and its very similar. I cannot see anything that would be
> > causing it.
> >
> > I am using latest CVS as of an hour ago. ODBC connection is to a mysql
> > database.
> >
> > For what its worth, I ported app_dbodbc.c to a new app_dbmysql.c and
> > created MySQLget, MySQLput, MySQLdel and MySQLdeltree, and experience
> > the exact same problem. If anyone wants the app_dbmysql.c, let me know.
> >
> >
> > I am using this to implement the call forward examples found at
> > voip-info.org. extensions.conf snippit:
> >
> >
> > [macro-sipexten]
> >
> > exten => s,1,SetVar(OrigNum=${ARG1})
> >
> > exten => s,2,ODBCput(CallReturn/${ARG1}=${CALLERIDNUM})
> > exten => s,3,ODBCget(temp=CFIM/${ARG1}) ; Get CFIM key, if not existing,
> > goto 104
> > exten => s,4,Goto(default|${temp}|1)   ; Unconditional forward
> > exten => s,5,Dial(SIP/${ARG1},20) ; 20sec timeout
> > exten => s,6,ODBCget(temp2=CFBS/${ARG1})  ; Get CFBS key, if not
> > existing, goto 107
> > exten => s,7,Goto(default|${temp2}|1) ; Forward on busy or unavailable
> >
> > ; No CFIM key
> > exten => s,104,Goto(s,5)
> >
> > ; No CFBS key - voicemail
> > exten => s,107,Voicemail(u${ARG1}) ; If no voicemail box for this user,
> > goto 208
> > exten => s,108,Hangup
> >
> > exten => s,208,Playback(ss-noservice) ; Play no service message
> > exten => s,209,SayDigits(${ARG1})     ; and say back the number they
> > called
> > exten => s,210,Hangup
> >
> >
> >
> >
> > At startup:
> >
> >  [app_dbodbc.so] => (Database access functions for Asterisk extension
> > logic)
> >   == Parsing '/etc/asterisk/odbc.conf': Found
> >        > app_dbodbc: dsn is MySQL-asterisk
> >        > app_dbodbc: username is asterisk
> >        > app_dbodbc: password is [secret]
> >        > app_dbodbc: Connected to MySQL-asterisk
> >   == Registered application 'ODBCget'
> >   == Registered application 'ODBCput'
> >   == Registered application 'ODBCdel'
> >   == Registered application 'ODBCdeltree'
> >
> >
> >
> > Sample crash:
> >
> >
> >  -- Starting simple switch on 'Zap/23-1'
> >     -- Executing Macro("Zap/23-1", "sipexten|9161111111") in new stack
> >     -- Executing SetVar("Zap/23-1", "OrigNum=9161111111") in new stack
> >     -- Executing ODBCput("Zap/23-1", "CallReturn/9161111111=9162222222")
> > in new stack
> >     -- odbcput: family=CallReturn, key=9161111111, value=9162222222
> >        > app_dbodbc: Query Successful!
> >        > app_dbodbc: Query Successful!
> >     -- Executing ODBCget("Zap/23-1", "temp=CFIM/9161111111") in new
> > stack
> >     -- odbcget: varname=temp, family=CFIM, key=9161111111
> >        > app_dbodbc: Query Successful!
> >     -- odbcget: Value not found in database.
> >     -- Executing Goto("Zap/23-1", "s|5") in new stack
> >     -- Goto (macro-sipexten,s,5)
> >     -- Executing Dial("Zap/23-1", "SIP/9161111111|20") in new stack
> > Segmentation fault
> > smf-ast1:~# Ouch ... error while writing audio data: : Broken pipe
> >
> >
> >
> > As I said, if I change these back to DBxxx, and noload app_dbodbc.so, no
> > problems at all. 100% repeatable. When I look in the astdb mysql table,
> > all the data that was ODBCput is there.
> >
> > Thoughts?
> >
> > _______________________________________________
> > Asterisk-Users mailing list
> > Asterisk-Users at lists.digium.com
> > http://lists.digium.com/mailman/listinfo/asterisk-users
> > To UNSUBSCRIBE or update options visit:
> >    http://lists.digium.com/mailman/listinfo/asterisk-users
> 
> 
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list