[Home]

Summary:ASTERISK-14498: Segfault When Trying To Reconnect To MySQL Server Using ODBC
Reporter:Michael L. Young (elguero)Labels:
Date Opened:2009-07-20 09:00:42Date Closed:2011-06-07 14:00:34
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Resources/res_config_odbc
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) backtrace-full.9160
Description:When a soft phone was trying to connect to asterisk server using iax, during the iax realtime db table look up asterisk received the message that it wasn't connected to the database server.  This normally triggers a reconnect.  Today asterisk segfaulted during the reconnect.  This was the message in the log file right before the segfault.

[Jul 20 09:14:44] WARNING[22868] res_odbc.c: SQL Execute returned an error -1: HYT00: [MySQL][ODBC 3.51 Driver][mysqld-4.0.15-standard-log]MySQL server has gone away (79)

I have not tried to reproduce this.  I am not sure if this was just a one time thing but I wanted to have someone take a look at the back trace in case this can be prevented in the future for other users.  

Please find attached to this bug note a back trace.
Comments:By: Tilghman Lesher (tilghman) 2009-07-20 10:34:20

To actually figure this out, you'd need to run valgrind, as specified in doc/valgrind.txt.

However, I've seen this problem before, and it has been due to a MySQL flaw.  There is a workaround in the ODBC layer, if you use res_config_odbc.  The workaround is to set idlecheck for the particular connection.

By: Tilghman Lesher (tilghman) 2009-08-09 02:15:50

Lack of response indicates that the workaround fixed it for the reporter.