Description:
mysql version: mysql-pro-4.1.10a-pc-linux-gnu-i686
We use perl DBI to access mysql from our application. Application is a a long daemon. Once in a while it segfault inside mysql. This seems to only happen since we upgrade mysql. We have been using mysql since early 4.1.
Based on stack trace, segfault seems to be in CBI connect. Here is how we usually make such call:
DBI->connect_cached($args->{datasource},$args->{database_login},$args->{database_password},
{ RaiseError => 1, PrintError => 0, AutoCommit => $args->{AutoCommit}});
(gdb) bt
#0 0xb9db1b53 in my_stat () from /opt/proofpoint/pps-3.1.0.30/opt/perl/lib/site_perl/5.8.6/i686-linux-thread-multi/auto/DBD/mysql/mysql.so
#1 0xb9db07d9 in my_read_charset_file ()
from /opt/proofpoint/pps-3.1.0.30/opt/perl/lib/site_perl/5.8.6/i686-linux-thread-multi/auto/DBD/mysql/mysql.so
#2 0xb9db09ff in init_available_charsets ()
from /opt/proofpoint/pps-3.1.0.30/opt/perl/lib/site_perl/5.8.6/i686-linux-thread-multi/auto/DBD/mysql/mysql.so
#3 0xb9db0d98 in get_charset_by_csname ()
from /opt/proofpoint/pps-3.1.0.30/opt/perl/lib/site_perl/5.8.6/i686-linux-thread-multi/auto/DBD/mysql/mysql.so
#4 0xb9dbecad in mysql_real_connect ()
from /opt/proofpoint/pps-3.1.0.30/opt/perl/lib/site_perl/5.8.6/i686-linux-thread-multi/auto/DBD/mysql/mysql.so
#5 0xb9d9a9f5 in mysql_dr_connect ()
from /opt/proofpoint/pps-3.1.0.30/opt/perl/lib/site_perl/5.8.6/i686-linux-thread-multi/auto/DBD/mysql/mysql.so
#6 0xb9d9b901 in _MyLogin () from /opt/proofpoint/pps-3.1.0.30/opt/perl/lib/site_perl/5.8.6/i686-linux-thread-multi/auto/DBD/mysql/mysql.so
#7 0xb9d9bbef in mysql_db_login () from /opt/proofpoint/pps-3.1.0.30/opt/perl/lib/site_perl/5.8.6/i686-linux-thread-multi/auto/DBD/mysql/mysql.so
#8 0xb9da07f9 in XS_DBD__mysql__db__login ()
from /opt/proofpoint/pps-3.1.0.30/opt/perl/lib/site_perl/5.8.6/i686-linux-thread-multi/auto/DBD/mysql/mysql.so
#9 0x08109f76 in Perl_pp_entersub ()
#10 0x08102b89 in Perl_runops_standard ()
#11 0x080abad9 in S_call_body ()
#12 0x080ab9f5 in Perl_call_sv ()
#13 0xbd873fb4 in XS_DBI_dispatch () from /opt/proofpoint/pps-3.1.0.30/opt/perl/lib/site_perl/5.8.6/i686-linux-thread-multi/auto/DBI/DBI.so
#14 0x08109f76 in Perl_pp_entersub ()
#15 0x08102b89 in Perl_runops_standard ()
#16 0x080abad9 in S_call_body ()
#17 0x080ab9f5 in Perl_call_sv ()
#18 0xbd873fb4 in XS_DBI_dispatch () from /opt/proofpoint/pps-3.1.0.30/opt/perl/lib/site_perl/5.8.6/i686-linux-thread-multi/auto/DBI/DBI.so
#19 0x08109f76 in Perl_pp_entersub ()
#20 0x08102b89 in Perl_runops_standard ()
#21 0x080abad9 in S_call_body ()
#22 0x080ab8d4 in Perl_call_sv ()
#23 0x0807ff90 in Perl::call (this=0x0, fmt=0x8176157 "", ret=0x128abf6c) at PerlEmbed.cpp:192
#24 0x08073829 in InputHandler::headers_gotperl (this=0x128abf80) at Filter.cpp:166
#25 0xbefb8a84 in Dispatcher::exec (this=0xbdcc1c30, aobj=@0xbdcc1a0c) at Dispatch.cpp:116
#26 0xbefb8c0f in Dispatcher::run (this=0xbfffe65c) at Dispatch.cpp:147
#27 0xbefb8c6f in Dispatcher::worker (parm=0x2) at Dispatch.cpp:156
#28 0xbefda43b in Thread::threadInit (pArgs=0x81a0500) at Thread.cpp:291
#29 0xbef42dec in start_thread () from /lib/tls/libpthread.so.0
#30 0xbedeea2a in clone () from /lib/tls/libc.so.6
How to repeat:
There is sure way to repeat it. I have this reproduced in a stress test environment where our application is heavily tested. I can be sure of getting one or two core files in one day out of the three installations we have.