[root@localhost tpcc-mysql]# ./tpcc_start -h 127.0.0.1 -P 3306 -d tpcc -u root -p jesse -w 10 -c 64 -r 10 -l 30
***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
option h with value '127.0.0.1'
option P with value '3306'
option d with value 'tpcc'
option u with value 'root'
option p with value 'jesse'
option w with value '10'
option c with value '64'
option r with value '10'
option l with value '30'
<Parameters>
[server]: 127.0.0.1
[port]: 3306
[DBname]: tpcc
[user]: root
[pass]: jesse
[warehouse]: 10
[connection]: 64
[rampup]: 10 (sec.)
[measure]: 30 (sec.)
Segmentation fault (core dumped)
查看操作系统日志信息
[root@localhost tpcc-mysql]# tail -fn 8 /var/log/messages
Jul 30 16:14:48 localhost kernel: tpcc_start[15412]: segfault at 0 ip 00007f830113a03a sp 00007f830104c100 error 6 in libmysqlclient.so.18.1.0[7f8301061000+438000]
Jul 30 16:14:49 localhost abrt[15430]: Saved core dump of pid 15410 (/data/tpcc-mysql/tpcc_start) to /var/spool/abrt/ccpp-2014-07-30-16:14:48-15410 (204091392 bytes)
Jul 30 16:14:49 localhost abrtd: Directory 'ccpp-2014-07-30-mited' creation detected
Jul 30 16:14:50 localhost abrtd: Size of '/var/spool/abrt' >= 1000 MB, deleting 'ccpp-2014-07-30-16:09:00-15371'
Jul 30 16:14:50 localhost abrtd: '/var/spool/abrt/ccpp-2014-07-30-mited' does not exist
Jul 30 16:14:50 localhost abrtd: 'post-create' on '/var/spool/abrt/ccpp-2014-07-30-mited' exited with 1
Jul 30 16:14:50 localhost abrtd: Corrupted or bad directory '/var/spool/abrt/ccpp-2014-07-30-mited', deleting
Jul 30 16:14:50 localhost abrtd: '/var/spool/abrt/ccpp-2014-07-30-mited' does not exist
在tpcc-mysql目录下运行gdb调试
[root@localhost tpcc-mysql]# gdb
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6)
Copyright (C) 2010 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-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) file tpcc
tpcc: No such file or directory.
(gdb) file tpcc_start
Reading symbols from /data/yanghaojie/tpcc/tpcc-mysql/tpcc_start...done.
(gdb) run tpcc_start -h 127.0.0.1 -P 3355 -d tpcc -u root -p jesse -w 10 -c 64 -r 10 -l 30
Starting program: /data/yanghaojie/tpcc/tpcc-mysql/tpcc_start tpcc_start -h 127.0.0.1 -P 3355 -d tpcc -u root -p jesse -w 10 -c 64 -r 10 -l 30
[Thread debugging using libthread_db enabled]
***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
option h with value '127.0.0.1'
option P with value '3306'
option d with value 'tpcc'
option u with value 'root'
option p with value 'jesse'
option w with value '10'
option c with value '64'
option r with value '10'
option l with value '30'
non-option ARGV-elements: tpcc_start
<Parameters>
[server]: 127.0.0.1
[port]: 3306
[DBname]: tpcc
[user]: root
[pass]: jesse
[warehouse]: 10
[connection]: 64
[rampup]: 10 (sec.)
[measure]: 30 (sec.)
[New Thread 0x7ffff7b8d700 (LWP 15587)]
[Thread 0x7ffff7b8d700 (LWP 15587) exited]
[New Thread 0x7ffff7b8d700 (LWP 15588)]
[New Thread 0x7ffff6f72700 (LWP 15589)]
[New Thread 0x7ffff6571700 (LWP 15590)]
[New Thread 0x7fffeffff700 (LWP 15591)]
[New Thread 0x7ffff5b70700 (LWP 15592)]
[New Thread 0x7ffff516f700 (LWP 15593)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7b8d700 (LWP 15588)]
my_stat (path=0x7ffff7b8c4d0 "/usr/local/mysql/share/charsets/Index.xml", stat_area=0x7ffff7b8c3a0, my_flags=0)
at /pb2/build/sb_0-6742818-1346233915.24/mysqlcom-pro-5.5.28/mysys/my_lib.c:413
413 /pb2/build/sb_0-6742818-1346233915.24/mysqlcom-pro-5.5.28/mysys/my_lib.c: No such file or directory.
in /pb2/build/sb_0-6742818-1346233915.24/mysqlcom-pro-5.5.28/mysys/my_lib.c
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.132.el6_5.2.x86_64 libgcc-4.4.7-4.el6.x86_64
tpcc-mysql运行时,文件/usr/local/mysql/share/charsets/Index.xml未找到
解决方法:创建该文件
[root@localhost local]# mkdir -p /usr/local/mysql/share/charsets/
[root@localhost local]# touch /usr/local/mysql/share/charsets/Index.xml
再次执行tpcc-start程序,成功!
--转自