Procedure for Debugging?
am 29.03.2005 17:45:22 von Matthew BoehmHello,
I hope this is the right list for this. The developers list isn't very
active and seems more for patch notifications.
I've got a module for an app (all RedHat9 btw) and the module links against
the libmysqlclient. The module connectes to mysql and provides mysql
database connectivity for the main app.
My app recently crashed when I issued a "mysql status" command. That
command was passed to the module and what "should" have happened was that
the module should have ping'd the mysql server (using mysql_ping) and
responded back with the time that the module has been connected. Well,
instead it seg faulted.
Thankfully I compiled the libmysqlclient with --with-debug and got some
info:
#0 0x404fffa6 in my_strcasecmp_8bit (cs=0x4051ad80, s=0x1
#1 0x404f565a in get_charset_number (charset_name=0x8134038 "latin1",
cs_flags=32) at charset.c:444
#2 0x404f5aa9 in get_charset_by_csname (cs_name=0x8134038 "latin1",
cs_flags=32, flags=16) at charset.c:551
#3 0x4050bb28 in mysql_real_connect (mysql=0x40e1c3fc, host=0x813a600
"64.88.47.55", user=0x813a668 "astdev",
passwd=0x813a698 "devast", db=0x813a6c8 "ast", port=3306,
unix_socket=0x0, client_flag=2147525261) at client.c:1854
#4 0x4050c694 in mysql_reconnect (mysql=0x404cea00) at client.c:2154
#5 0x405093ea in cli_advanced_command (mysql=0x404cea00, command=COM_PING,
header=0x0, header_length=0, arg=0x0, arg_length=0,
skip_check=0 '\0') at client.c:674
#6 0x404e4726 in mysql_ping (mysql=0x404cea00) at libmysql.c:1378
#7 0x404cc08d in key () from /usr/lib/ast/modules/res_config_mysql.so
#8 0x404cc1c6 in key () from /usr/lib/ast/modules/res_config_mysql.so
How can I identify this (if it truly is) as a bug? It seems that my module
(at #8) is correctly calling the mysql_ping command and then somewhere
inside all the MySQL-coded code something is being screwed up.
The true problem here is that this crash is random. I don't have steps to
reproduce it. In fact, I just relaunched the app, loaded the module and
issued the status command it worked correctly.
Hopefully what I have pasted above is a "good start" for someone.
Let me know if anyone needs anything.
Cheers,
Matthew
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org