[asterisk-bugs] [Asterisk 0014015]: Asterisk can crash when database schema is changed

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Dec 3 10:35:42 CST 2008


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.digium.com/view.php?id=14015 
====================================================================== 
Reported By:                amorsen
Assigned To:                Corydon76
====================================================================== 
Project:                    Asterisk
Issue ID:                   14015
Category:                   CDR/cdr_adaptive_odbc
Reproducibility:            have not tried
Severity:                   crash
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.6.0.1 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-12-03 10:35 CST
Last Modified:              2008-12-03 10:35 CST
====================================================================== 
Summary:                    Asterisk can crash when database schema is changed
Description: 
I had a CDR database on MySQL with a column userfield, which I wanted to
change to be called hangupcause. I did this in MySQL:

alter table cdr change column userfield hangupcause varchar(255) NOT NULL
default '';

I got this:
[Dec  3 17:20:12] WARNING[21039] res_odbc.c: SQL Execute returned an error
-1: 42S22: [MySQL][ODBC 3.51 Driver][mysqld-5.0.51a-log]Unknown column
'userfield' in 'field list' (87)
[Dec  3 17:20:12] WARNING[21039] res_odbc.c: SQL Execute error -1!
Attempting a reconnect...
[Dec  3 17:20:12] WARNING[21039] res_odbc.c: Connection is down attempting
to reconnect...
[Dec  3 17:20:12] DEBUG[21039] res_odbc.c: Disconnected 0 from cdr [cdr]

And then this:
Dec  3 17:20:12 lpbx02 kernel: asterisk[20978]: segfault at 430 ip
0013f9d9 sp b55e47f0 error 4 in libodbc.so.1.0.0[126000+70000]

Having it as severity "crash" is perhaps overkill, since noone sane will
change database schema while keeping asterisk running, but it DID crash...

Fedora 10 with:
asterisk-1.6.0.1-2.fc10.i386
asterisk-dahdi-1.6.0.1-2.fc10.i386
asterisk-odbc-1.6.0.1-2.fc10.i386

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-12-03 10:35 amorsen        New Issue                                    
2008-12-03 10:35 amorsen        Status                   new => assigned     
2008-12-03 10:35 amorsen        Assigned To               => Corydon76       
2008-12-03 10:35 amorsen        Asterisk Version          => 1.6.0.1         
2008-12-03 10:35 amorsen        SVN Branch (only for SVN checkouts, not tarball
releases) => N/A             
======================================================================




More information about the asterisk-bugs mailing list