[Home]

Summary:ASTERISK-09446: With odbc realtime use for mailbox, crash when loss bbdd connection
Reporter:german aracil boned (tecnoxarxa)Labels:
Date Opened:2007-05-15 05:07:29Date Closed:2011-06-07 14:08:13
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) app_voicemail.patch
Description:Some times, asterisk crash with voicemail with res_odbc support:

[May 14 07:41:58] ERROR[12456] res_config_mysql.c: MySQL RealTime: Ping failed (2006).  Trying an explicit reconnect.
[May 14 07:41:58] WARNING[13261] res_odbc.c: SQL Execute returned an error -1: HYT00: [MySQL][ODBC 3.51 Driver][mysqld-5.0.37]MySQL server has gone away (66)
[May 14 07:41:58] WARNING[13261] app_voicemail.c: SQL Execute error!
[SELECT * FROM voicemessages WHERE dir=? AND msgnum=?]

[May 14 07:41:58] WARNING[13261] res_odbc.c: SQL Execute returned an error -1: HYT00: [MySQL][ODBC 3.51 Driver][mysqld-5.0.37]MySQL server has gone away (66)
[May 14 07:41:58] WARNING[13261] app_voicemail.c: SQL Execute error!
[SELECT * FROM voicemessages WHERE dir=? AND msgnum=?]

[May 14 07:41:58] WARNING[13261] res_odbc.c: SQL Execute returned an error -1: HYT00: [MySQL][ODBC 3.51 Driver][mysqld-5.0.37]MySQL server has gone away (66)
[May 14 07:41:58] WARNING[13261] app_voicemail.c: SQL Execute error!
[SELECT * FROM voicemessages WHERE dir=? AND msgnum=?]

[May 14 07:42:01] ERROR[13261] cdr_addon_mysql.c: cdr_mysql: Unknown connection error: (2006) MySQL server has gone away
[May 14 08:32:55] WARNING[13279] res_odbc.c: SQL Execute returned an error -1: HYT00: [MySQL][ODBC 3.51 Driver][mysqld-5.0.37]MySQL server has gone away (66)


****** ADDITIONAL INFORMATION ******

app_voicemail.c call ast_odbc_request_obj(const char *name, int check) in res_odbc.c with check=0

I change this for call to this function with check=1. Now, asterisk no crash, becouse connection with data base is checked before.

regards.......
Comments:By: Tilghman Lesher (tilghman) 2007-05-17 18:24:26

I cannot make this change, because it does not work on other databases.  The only method which works currently to rebuild lost connections in a way that works with other databases is to use the ast_odbc_prepare_and_execute() API.  There is a change in trunk, though, that will allow a change to the correct sanity SQL, that will work with other databases.

By: Tilghman Lesher (tilghman) 2007-05-17 18:26:04

Also, this is not a crash, because it did not dump a core file.

By: german aracil boned (tecnoxarxa) 2007-05-17 19:03:49

Yes, I can submit core file. I put now system for make it.
Wait for make please.. I send later..

By: Tilghman Lesher (tilghman) 2007-05-18 08:11:32

If this is the crash that I think it is, you may want to upgrade the MyODBC connector to the most recent code.  There was a bug in the MyODBC connector which caused a crash awhile back, but it's fixed in the most recent code from MySQL.

By: Tilghman Lesher (tilghman) 2007-05-23 21:06:19

Ping.  Do you have a stack backtrace to upload yet, or are you checking on your MyODBC version?

By: Tilghman Lesher (tilghman) 2007-06-05 10:23:08

No response from reporter.