segfault

Asked by Arnaud Gadal

Hi,

I was trying the 0.2.3 version :

mysql:/data/tmp/mydumper-0.2.3# make
Scanning dependencies of target mydumper
[ 25%] Building C object CMakeFiles/mydumper.dir/mydumper.c.o
[ 50%] Building C object CMakeFiles/mydumper.dir/binlog.c.o
[ 75%] Building C object CMakeFiles/mydumper.dir/server_detect.c.o
Linking C executable mydumper
[ 75%] Built target mydumper
Scanning dependencies of target myloader
[100%] Building C object CMakeFiles/myloader.dir/myloader.c.o
Linking C executable myloader
[100%] Built target myloader

mysql:/data/tmp/mydumper-0.2.3# /data/tmp/mydumper-0.2.3/mydumper --user=root --password=xxx --socket=/tmp/mysql.sock arnaud_item
Segmentation fault
mysql:/data/tmp/mydumper-0.2.3# ulimit -c unlimited
mysql:/data/tmp/mydumper-0.2.3# /data/tmp/mydumper-0.2.3/mydumper --user=root --password=xxx --socket=/tmp/mysql.sock arnaud_item
Segmentation fault (core dumped)

mysql:/data/tmp/mydumper-0.2.3# gdb -c core /data/tmp/mydumper-0.2.3/mydumper
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /usr/lib/libmysqlclient_r.so.15...done.
Loaded symbols for /usr/lib/libmysqlclient_r.so.15
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/libpthread.so.0...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /usr/lib/libglib-2.0.so.0...done.
Loaded symbols for /usr/lib/libglib-2.0.so.0
Reading symbols from /usr/lib/libgthread-2.0.so.0...done.
Loaded symbols for /usr/lib/libgthread-2.0.so.0
Reading symbols from /usr/lib/libpcre.so.3...done.
Loaded symbols for /usr/lib/libpcre.so.3
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux-x86-64.so.2...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib/librt.so.1...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Core was generated by `/data/tmp/mydumper-0.2.3/mydumper --user=root --password=xxx --socket=/tmp'.
Program terminated with signal 11, Segmentation fault.
[New process 31106]
#0 0x00007f1d8a64ada0 in strcasecmp () from /lib/libc.so.6
(gdb) bt
#0 0x00007f1d8a64ada0 in strcasecmp () from /lib/libc.so.6
#1 0x0000000000404f50 in main (argc=2, argv=0x7fff49dfb2c8) at /data/tmp/mydumper-0.2.3/mydumper.c:458

Any idea ?

Thanks,

Regards,
Arnaud

Question information

Language:
English Edit question
Status:
Answered
For:
MySQL Data Dumper Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Arnaud Gadal (arnaud-gadal) said :
#1

it seems related to the strcasecmp on show processlist's fields, mines look normal...

mysql> show processlist;
+----+------+-----------+------+---------+------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+------+-----------+------+---------+------+-------+------------------+
| 45 | root | localhost | NULL | Query | 0 | NULL | show processlist |
+----+------+-----------+------+---------+------+-------+------------------+
1 row in set (0.00 sec)

mysql> select version();
+------------+
| version() |
+------------+
| 5.5.13-log |
+------------+
1 row in set (0.00 sec)

Revision history for this message
Andrew Hutchings (linuxjedi) said :
#2

This appears to be identical to bug #813388. I'll try and look into it early next week.

Revision history for this message
Andrew Hutchings (linuxjedi) said :
#3

also can you provide the results of:

ls -l /usr/lib/libmysql*
ldd mydumper
mysqlconfig --libs_r

Revision history for this message
Andrew Hutchings (linuxjedi) said :
#4

sorry, that last one should be:

mysql_config --libs_r

Revision history for this message
Andrew Hutchings (linuxjedi) said :
#5

sorry, that last one should be:

mysql_config --libs_r

Revision history for this message
Arnaud Gadal (arnaud-gadal) said :
#6

hi Andrew,

ls -l /usr/lib/libmysql*
-rw-r--r-- 1 root root 3179604 Dec 30 2010 /usr/lib/libmysqlclient.a
-rw-r--r-- 1 root root 941 Dec 30 2010 /usr/lib/libmysqlclient.la
lrwxrwxrwx 1 root root 20 Jun 14 17:36 /usr/lib/libmysqlclient.so -> libmysqlclient.so.15
lrwxrwxrwx 1 root root 24 Jun 14 17:36 /usr/lib/libmysqlclient.so.15 -> libmysqlclient.so.15.0.0
-rw-r--r-- 1 root root 2138416 Dec 30 2010 /usr/lib/libmysqlclient.so.15.0.0
-rw-r--r-- 1 root root 3195014 Dec 30 2010 /usr/lib/libmysqlclient_r.a
-rw-r--r-- 1 root root 995 Dec 30 2010 /usr/lib/libmysqlclient_r.la
lrwxrwxrwx 1 root root 22 Jun 14 17:36 /usr/lib/libmysqlclient_r.so -> libmysqlclient_r.so.15
lrwxrwxrwx 1 root root 26 Jun 14 17:36 /usr/lib/libmysqlclient_r.so.15 -> libmysqlclient_r.so.15.0.0
-rw-r--r-- 1 root root 2147984 Dec 30 2010 /usr/lib/libmysqlclient_r.so.15.0.0

ldd mydumper
 linux-vdso.so.1 => (0x00007fff05b81000)
 libmysqlclient_r.so.15 => /usr/lib/libmysqlclient_r.so.15 (0x00007f761ade5000)
 libz.so.1 => /usr/lib/libz.so.1 (0x00007f761abce000)
 libpthread.so.0 => /lib/libpthread.so.0 (0x00007f761a9b2000)
 libcrypt.so.1 => /lib/libcrypt.so.1 (0x00007f761a77a000)
 libnsl.so.1 => /lib/libnsl.so.1 (0x00007f761a562000)
 libm.so.6 => /lib/libm.so.6 (0x00007f761a2df000)
 libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f761a01c000)
 libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x00007f7619e18000)
 libpcre.so.3 => /usr/lib/libpcre.so.3 (0x00007f7619bf0000)
 libc.so.6 => /lib/libc.so.6 (0x00007f761989d000)
 /lib64/ld-linux-x86-64.so.2 (0x00007f761b1f3000)
 librt.so.1 => /lib/librt.so.1 (0x00007f7619694000)

mysql_config --libs_r
-rdynamic -L/usr/local/lib/mysql -lmysqlclient_r -lz -lpthread -lcrypt -lnsl -lm -lpthread

Thanks,
Arnaud

Revision history for this message
Andrew Hutchings (linuxjedi) said :
#7

I *think* there is an incompatibility between MySQL 5.0's client library (which you are using) and 5.5 server. But I need to do some research into this.

Revision history for this message
Andrew Hutchings (linuxjedi) said :
#8

ah, I missed something before... Did you provide -DMYSQL_CONFIG to cmake to choose an alternative executable? If not then then mydumper's build system appears to have linked against MySQL 5.5 and then set the rpath to the MySQL 5.0 library.

Revision history for this message
Arnaud Gadal (arnaud-gadal) said :
#9

Hi Andrew,

I didn't provide any flag to cmake.
I've read your answer for the related bug https://bugs.launchpad.net/bugs/813388 so I guess you found what you were looking for.

Regards,
Arnaud

Revision history for this message
Andrew Hutchings (linuxjedi) said :
#10

I have fixed this in trunk, I'll try and make a release this week.

Revision history for this message
Andrew Hutchings (linuxjedi) said :
#11

Also note: if you are currently working from bzr and do a "bzr pull" you will need to remove CMakeCache.txt and re-run cmake for this fix to work.

Can you help with this problem?

Provide an answer of your own, or ask Arnaud Gadal for more information if necessary.

To post a message you must log in.