[asterisk-bugs] [Asterisk 0013300]: Asterisk crashes, leaving a voicemail message stored on pgsql DB via ODBC

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Aug 20 23:38:21 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13300 
====================================================================== 
Reported By:                moliveras
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13300
Category:                   Applications/app_voicemail/ODBC
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     feedback
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 137188 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-08-13 12:32 CDT
Last Modified:              2008-08-20 23:38 CDT
====================================================================== 
Summary:                    Asterisk crashes, leaving a voicemail message stored
on pgsql DB via ODBC
Description: 
I compiled asterisk 2.4.21.1 for ODBC voicemail using a PGSQL DB. Every
time I left a voicemail message, asterisk would get a segmentation fault
and restart.  

I also tried this with the 1.4 branch and got the same result
(branch1.4-r137188).

The odd thing is that after compiling a NON OPTIMIZED build to get a
backtrace the crash no longer occurs.  I left over 150 messages with the
non optimized build and saw no problems.  Using the OPTIMIZED build crashes
asterisk ever time after the first voicemail message is left.  I will
attach the OPTIMIZED backtrace as that was all I could get.  Let me know
what additional data you would like to see and I will also attach it.

Best Regards,

Mike Oliveras


====================================================================== 

---------------------------------------------------------------------- 
 (0091618) moliveras (reporter) - 2008-08-20 23:38
 http://bugs.digium.com/view.php?id=13300#c91618 
---------------------------------------------------------------------- 
It seems that the driver in the /etc/odbcinst.ini file is specifying the
unixODBC driver.  I changed this to use the postgresql-odbc driver and the
crashes are no longer occurring.

Below is step 3 from voicemail_odbc_postgresql.txt

3) Make sure you have the PostgreSQL odbc driver setup in
/etc/odbcinst.ini.
Mine looks like:

[PostgreSQL]
Description     = ODBC for PostgreSQL
Driver          = /usr/lib/libodbcpsql.so 
Setup           = /usr/lib/libodbcpsqlS.so
FileUsage       = 1

I no longer get the crashes once I changed the Driver to:
Driver  =  /usr/lib/psqlodbc.so

I did notice that I get an error message using 1.4.21.1 but not with the
SVN version of the 1.4 branch.

  == Parsing '/var/spool/asterisk/voicemail/cust1/100/INBOX/msg0000.txt':
Length is 6950
Found
mikeo_asterisk1*CLI> [Aug 21 00:42:23] WARNING[11536]:
app_voicemail.c:1131 retrieve_file: SQL Get Data error!
[SELECT * FROM voicemessages WHERE dir=? AND msgnum=?]

[Aug 21 00:42:23] WARNING[11536]: app_voicemail.c:1131 retrieve_file: SQL
Get Data error!
[SELECT * FROM voicemessages WHERE dir=? AND msgnum=?]

 

It does seem to be working as expected however 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-08-20 23:38 moliveras      Note Added: 0091618                          
======================================================================




More information about the asterisk-bugs mailing list