2 messages in com.mysql.lists.perlRe: MySQL segmentation faults...
FromSent OnAttachments
Dave Howorth18 Sep 2003 05:35 
Jochen Wiedmann18 Sep 2003 11:59 
Subject:Re: MySQL segmentation faults...
From:Dave Howorth (dhow@mrc-lmb.cam.ac.uk)
Date:09/18/2003 05:35:19 AM
List:com.mysql.lists.perl

On the mysqlcc list Adam Hooper just wrote:

In general, running "strace <program>" will give some useful output; it'll give developers a good idea of where the problem is. Beyond that, a backtrace is useful. To produce one:

1. Run gdb <program> (gdb is available for EVERY distribution) 2. Type 'run' 3. Get a segfault. The window won't close, and gdb will pop up a warning of sorts. 4. Type 'bt' and email the output here :).

This seems like it might be relevant to diagnosing my DBD::mysql::db::_login crash, so in the hope it may help ...

The strace output is:

open("/var/lib/mysql/my.cnf", O_RDONLY|O_LARGEFILE) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=48, ...}) = 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4001a000 read(3, "# This file must exist - CAN-200"..., 4096) = 48 read(3, "", 4096) = 0 close(3) = 0 munmap(0x4001a000, 4096) = 0 open("/home/dhoworth/.my.cnf", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) --- SIGSEGV (Segmentation fault) --- +++ killed by SIGSEGV +++

The gdb output is:

Program received signal SIGSEGV, Segmentation fault. 0x401cc030 in strcend () from /usr/lib/libmysqlclient.so.10 (gdb) bt #0 0x401cc030 in strcend () from /usr/lib/libmysqlclient.so.10 #1 0x401bd922 in simple_command () from /usr/lib/libmysqlclient.so.10 #2 0x401be31d in mysql_real_connect () from /usr/lib/libmysqlclient.so.10 #3 0x4019ebd4 in mysql_dr_connect () from /usr/lib/perl5/auto/DBD/mysql/mysql.so #4 0x4019ef40 in mysql_dr_connect () from /usr/lib/perl5/auto/DBD/mysql/mysql.so #5 0x4019efb3 in mysql_db_login () from /usr/lib/perl5/auto/DBD/mysql/mysql.so #6 0x401a3114 in XS_DBD__mysql__db__login () from /usr/lib/perl5/auto/DBD/mysql/mysql.so #7 0x0809c70c in Perl_pp_entersub () #8 0x08097090 in Perl_runops_standard () #9 0x0805cdca in perl_call_sv () #10 0x0805c981 in perl_call_sv () #11 0x401910d1 in XS_DBI_dispatch () from /usr/lib/perl5/auto/DBI/DBI.so #12 0x0809c70c in Perl_pp_entersub () #13 0x08097090 in Perl_runops_standard () #14 0x0805c565 in perl_run () #15 0x0805c2cb in perl_run () #16 0x08059ca0 in main () #17 0x4005b0bf in __libc_start_main () from /lib/libc.so.6

HTH, Dave