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

Asterisk Bug Tracker noreply at bugs.digium.com
Thu May 27 10:20:31 CDT 2010


The following issue has been CLOSED 
====================================================================== 
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:                     closed
Asterisk Version:           1.6.2.6 
JIRA:                       SWP-1176 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
Resolution:                 duplicate
Duplicate:                  0
Fixed in Version:           
====================================================================== 
Date Submitted:             2010-03-26 09:23 CDT
Last Modified:              2010-05-27 10:20 CDT
====================================================================== 
Summary:                    [patch] 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. 

 


======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
duplicate of        0017245 [patch] segfault caused by error in SQL
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-05-27 10:20 tilghman       Status                   confirmed => closed 
2010-05-27 10:20 tilghman       Resolution               open => duplicate   
2010-05-27 10:20 tilghman       Description Updated                          
2010-05-27 10:20 tilghman       Additional Information Updated                  
 
======================================================================




More information about the asterisk-bugs mailing list