[asterisk-bugs] [Asterisk 0017101]: Asterisk Crashes With Core Dump When FUNC_ODBC Processes SQL Statements With Errors

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Mar 26 10:47:44 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17101 
====================================================================== 
Reported By:                David Elliott
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17101
Category:                   Functions/func_odbc
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     new
Asterisk Version:           1.6.2.6 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-03-26 09:23 CDT
Last Modified:              2010-03-26 10:47 CDT
====================================================================== 
Summary:                    Asterisk Crashes With Core Dump When FUNC_ODBC
Processes SQL Statements With Errors
Description: 
When func_odbc /res_odbc processes SQL with table name, column name or
variables missing it generates a segmentation violation and subsequent core
dump.  

This latest set of issues were generated by Asterisk 1.6.2.6 running on a
fully upgraded Centos 5.4 (2.6.18-164.15.1.el5
https://issues.asterisk.org/view.php?id=1 SMP).  The same issue
occurs across a range of Asterisk versions and Linux distributions.  I am
pretty sure the issue is caused by the way ODBC driver errors are handled
by func_odbc / res_odbc.  

The res_odbc / func_odbc reports a syntax error to the console which is
ignored.  Instead of re-acting to the valid ODBC error,   func_odbc /
res_odbc does a DISCONNECT / CONNECT followed by a re-execution of the same
faulty SQL statement.  The software has assumed that the original error was
caused by a connection time out and seeks to fix the problem by
disconnecting and re-connecting to the database.  Needless to say quite
simple, SQL syntax error will stop Asterisk in its tracks. 

 


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

---------------------------------------------------------------------- 
 (0119934) David Elliott (reporter) - 2010-03-26 10:47
 https://issues.asterisk.org/view.php?id=17101#c119934 
---------------------------------------------------------------------- 
I had to leave out the --suppressions section because valgrind did not like
the valgrind.supp file. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-03-26 10:47 David Elliott  Note Added: 0119934                          
======================================================================




More information about the asterisk-bugs mailing list