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

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Dec 15 18:14:29 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
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:                     feedback
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-15 18:14 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

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

---------------------------------------------------------------------- 
 (0096424) Corydon76 (administrator) - 2008-12-15 18:14
 http://bugs.digium.com/view.php?id=14015#c96424 
---------------------------------------------------------------------- 
Unfortunately, without a backtrace, there is very little I can do.  In
fact, given that it crashes within libodbc, it is very likely either a
UnixODBC crash or a crash of the backend driver.  While this may have taken
down Asterisk, the problem lies in a body of code outside of our control. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-12-15 18:14 Corydon76      Note Added: 0096424                          
======================================================================




More information about the asterisk-bugs mailing list