TPCC对mysql 5.5.27做一次性能测试时遭遇 Segmentation fault,gdb调试记录之:

[root@db-81 ~]# uname -a 
Linux db-81 2.6.18-194.el5 #1 SMP Mon Mar 29 22:10:29 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
[root@db-81 ~]# more /proc/meminfo |grep Total
MemTotal:     49455412 kB
HighTotal:           0 kB
LowTotal:     49455412 kB
SwapTotal:    65537156 kB
VmallocTotal: 34359738367 kB
HugePages_Total:     0
[root@db-81 ~]# more /proc/cpuinfo |grep "processor" |wc -l
16
[root@db-81 ~]# more /proc/cpuinfo |grep  "model name"
model name	: AMD Opteron(tm) Processor 6128
[root@db-13 src]# export C_INCLUDE_PATH=/data/mysql/include:/lib/:lib64:$LD_LIBRARY_PATH:$PATH
[root@db-13 src]# export PATH=/data/mysql/bin:/lib:/lib64:$LD_LIBRARY_PATH:$PATH:$PATH
[root@db-13 src]# export LD_LIBRARY_PATH=/data/mysql/lib:$PATH
[root@db-13 src]# make all
cc -w -O2 -g -I. `mysql_config --include`  -c load.c
cc -w -O2 -g -I. `mysql_config --include`  -c support.c
cc load.o support.o `mysql_config --libs_r` -lrt -o ../tpcc_load
cc -w -O2 -g -I. `mysql_config --include`  -c main.c
cc -w -O2 -g -I. `mysql_config --include`  -c spt_proc.c
cc -w -O2 -g -I. `mysql_config --include`  -c driver.c
cc -w -O2 -g -I. `mysql_config --include`  -c sequence.c
cc -w -O2 -g -I. `mysql_config --include`  -c rthist.c
cc -w -O2 -g -I. `mysql_config --include`  -c neword.c
cc -w -O2 -g -I. `mysql_config --include`  -c payment.c
cc -w -O2 -g -I. `mysql_config --include`  -c ordstat.c
cc -w -O2 -g -I. `mysql_config --include`  -c delivery.c
cc -w -O2 -g -I. `mysql_config --include`  -c slev.c
cc main.o spt_proc.o driver.o support.o sequence.o rthist.o neword.o payment.o ordstat.o delivery.o slev.o `mysql_config --libs_r` -lrt -o ../tpcc_start

[root@db-13 tpcc-mysql]# ./tpcc_start -h 127.0.0.1 -d test -u root -p ‘yihaodian’ -w 30 -c 60 -r 60 -l 1000 -f mysql_tpcc_20130319
***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
option h with value ‘127.0.0.1’
option d with value ‘test’
option u with value ‘root’
option p with value ‘yihaodian’
option w with value ’30’
option c with value ’60’
option r with value ’60’
option l with value ‘1000’
option f with value ‘mysql_tpcc_20130319’

[server]: 127.0.0.1
[port]: 3306
[DBname]: test
[user]: root
[pass]: yihaodian
[warehouse]: 30
[connection]: 60
[rampup]: 60 (sec.)
[measure]: 1000 (sec.)
Segmentation fault
[root@db-13 tpcc-mysql]# ./tpcc_start
***************************************
*** ###easy### TPC-C Load Generator ***
***************************************

[server]:
[port]: 3306
[DBname]: tpcc
[user]:
[pass]:
[warehouse]: 1
[connection]: 10
[rampup]: 10 (sec.)
[measure]: 20 (sec.)

RAMP-UP TIME.(10 sec.)
Segmentation fault

[root@db-13 tpcc-mysql]# strace ./tpcc_start
execve("./tpcc_start", ["./tpcc_start"], [/* 29 vars */]) = 0
brk(0)                                  = 0xddce000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac29d63a000
uname({sys="Linux", node="db-13", ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac29d63b000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/data/mysql/lib/tls/x86_64/libmysqlclient.so.18", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/data/mysql/lib/tls/x86_64", 0x7fff4f83cf60) = -1 ENOENT (No such file or directory)
open("/data/mysql/lib/tls/libmysqlclient.so.18", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/data/mysql/lib/tls", 0x7fff4f83cf60) = -1 ENOENT (No such file or directory)
open("/data/mysql/lib/x86_64/libmysqlclient.so.18", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/data/mysql/lib/x86_64", 0x7fff4f83cf60) = -1 ENOENT (No such file or directory)
open("/data/mysql/lib/libmysqlclient.so.18", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\345\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=6870358, ...}) = 0
mmap(NULL, 4577240, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2ac29d63c000
mprotect(0x2ac29d911000, 1048576, PROT_NONE) = 0
mmap(0x2ac29da11000, 540672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2d5000) = 0x2ac29da11000
mmap(0x2ac29da95000, 18392, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ac29da95000
close(3)                                = 0
open("/data/mysql/lib/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/data/mysql/bin/tls/x86_64/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/data/mysql/bin/tls/x86_64", 0x7fff4f83cf30) = -1 ENOENT (No such file or directory)
open("/data/mysql/bin/tls/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/data/mysql/bin/tls", 0x7fff4f83cf30) = -1 ENOENT (No such file or directory)
open("/data/mysql/bin/x86_64/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/data/mysql/bin/x86_64", 0x7fff4f83cf30) = -1 ENOENT (No such file or directory)
open("/data/mysql/bin/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/data/mysql/bin", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/lib/tls/x86_64/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/tls/x86_64", 0x7fff4f83cf30) = -1 ENOENT (No such file or directory)
open("/lib/tls/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/tls", 0x7fff4f83cf30)        = -1 ENOENT (No such file or directory)
open("/lib/x86_64/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64", 0x7fff4f83cf30)     = -1 ENOENT (No such file or directory)
open("/lib/libpthread.so.0", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\230X\0004\0\0\0"..., 832) = 832
close(3)                                = 0
stat("/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/lib64/tls/x86_64/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib64/tls/x86_64", 0x7fff4f83cf30) = -1 ENOENT (No such file or directory)
open("/lib64/tls/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib64/tls", 0x7fff4f83cf30)      = -1 ENOENT (No such file or directory)
open("/lib64/x86_64/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib64/x86_64", 0x7fff4f83cf30)   = -1 ENOENT (No such file or directory)
open("/lib64/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240W\340\253?\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=145824, ...}) = 0
mmap(0x3fabe00000, 2204528, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3fabe00000
mprotect(0x3fabe16000, 2093056, PROT_NONE) = 0
mmap(0x3fac015000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x3fac015000
mmap(0x3fac017000, 13168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x3fac017000
close(3)                                = 0
open("/data/mysql/lib/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/data/mysql/bin/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libm.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20$Z\0004\0\0\0"..., 832) = 832
close(3)                                = 0
open("/lib64/libm.so.6", O_RDONLY)      = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`>`\253?\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=615136, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac29da9a000
mmap(0x3fab600000, 2629848, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3fab600000
mprotect(0x3fab682000, 2093056, PROT_NONE) = 0
mmap(0x3fab881000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x81000) = 0x3fab881000
close(3)                                = 0
open("/data/mysql/lib/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/data/mysql/bin/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/librt.so.1", O_RDONLY)       = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200H\230\0004\0\0\0"..., 832) = 832
close(3)                                = 0
open("/lib64/librt.so.1", O_RDONLY)     = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \"\340\257?\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=53448, ...}) = 0
mmap(0x3fafe00000, 2132936, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3fafe00000
mprotect(0x3fafe07000, 2097152, PROT_NONE) = 0
mmap(0x3fb0007000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x3fb0007000
close(3)                                = 0
open("/data/mysql/lib/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/data/mysql/bin/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libdl.so.2", O_RDONLY)       = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\372W\0004\0\0\0"..., 832) = 832
close(3)                                = 0
open("/lib64/libdl.so.2", O_RDONLY)     = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\16\240\253?\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=23360, ...}) = 0
mmap(0x3faba00000, 2109696, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3faba00000
mprotect(0x3faba02000, 2097152, PROT_NONE) = 0
mmap(0x3fabc02000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x3fabc02000
close(3)                                = 0
open("/data/mysql/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/data/mysql/bin/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\317D\0004\0\0\0"..., 832) = 832
close(3)                                = 0
open("/lib64/libc.so.6", O_RDONLY)      = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\332!\253?\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1717800, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac29da9b000
mmap(0x3fab200000, 3498328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3fab200000
mprotect(0x3fab34e000, 2093056, PROT_NONE) = 0
mmap(0x3fab54d000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14d000) = 0x3fab54d000
mmap(0x3fab552000, 16728, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x3fab552000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac29da9c000
arch_prctl(ARCH_SET_FS, 0x2ac29da9c6d0) = 0
mprotect(0x3fab54d000, 16384, PROT_READ) = 0
mprotect(0x3fabc02000, 4096, PROT_READ) = 0
mprotect(0x3fb0007000, 4096, PROT_READ) = 0
mprotect(0x3fab881000, 4096, PROT_READ) = 0
mprotect(0x3fac015000, 4096, PROT_READ) = 0
mprotect(0x3fab01b000, 4096, PROT_READ) = 0
set_tid_address(0x2ac29da9c760)         = 25524
set_robust_list(0x2ac29da9c770, 0x18)   = 0
futex(0x7fff4f83da8c, FUTEX_WAKE_PRIVATE, 1) = 0
rt_sigaction(SIGRTMIN, {0x3fabe05380, [], SA_RESTORER|SA_SIGINFO, 0x3fabe0eb10}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x3fabe052b0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x3fabe0eb10}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM_INFINITY}) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 6), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac29da9d000
write(1, "********************************"..., 40***************************************
) = 40
write(1, "*** ###easy### TPC-C Load Genera"..., 40*** ###easy### TPC-C Load Generator ***
) = 40
write(1, "********************************"..., 40***************************************
) = 40
write(1, "<Parameters>\n", 13<Parameters>
)          = 13
write(1, "     [server]: \n", 16     [server]: 
)       = 16
write(1, "     [port]: 3306\n", 18     [port]: 3306
)     = 18
write(1, "     [DBname]: tpcc\n", 20     [DBname]: tpcc
)   = 20
write(1, "       [user]: \n", 16       [user]: 
)       = 16
write(1, "       [pass]: \n", 16       [pass]: 
)       = 16
write(1, "  [warehouse]: 1\n", 17  [warehouse]: 1
)      = 17
write(1, " [connection]: 10\n", 18 [connection]: 10
)     = 18
write(1, "     [rampup]: 10 (sec.)\n", 25     [rampup]: 10 (sec.)
) = 25
write(1, "    [measure]: 20 (sec.)\n", 25    [measure]: 20 (sec.)
) = 25
rt_sigaction(SIGALRM, {0x4021c0, [], SA_RESTORER, 0x3fabe0eb10}, NULL, 8) = 0
open("/dev/urandom", O_RDONLY)          = 3
read(3, "\253\224\300!", 4)             = 4
close(3)                                = 0
brk(0)                                  = 0xddce000
brk(0xddef000)                          = 0xddef000
mmap(NULL, 10489856, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_32BIT, -1, 0) = 0x40dfb000
mprotect(0x40dfb000, 4096, PROT_NONE)   = 0
clone(child_stack=0x417fb250, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x417fb9d0, tls=0x417fb940, child_tidptr=0x417fb9d0) = 25525
futex(0x417fb9d0, FUTEX_WAIT, 25525, NULL) = 0
open("/proc/stat", O_RDONLY)            = 3
read(3, "cpu  4327497980 1619853 67702808"..., 8192) = 3722
close(3)                                = 0
open("/etc/nsswitch.conf", O_RDONLY)    = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1696, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaaaab000
read(3, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 4096) = 1696
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x2aaaaaaab000, 4096)            = 0
open("/data/mysql/lib/libnss_files.so.2", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\37\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=53880, ...}) = 0
mmap(NULL, 2139432, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2aaaaaaac000
mprotect(0x2aaaaaab6000, 2093056, PROT_NONE) = 0
mmap(0x2aaaaacb5000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9000) = 0x2aaaaacb5000
close(3)                                = 0
mprotect(0x2aaaaacb5000, 4096, PROT_READ) = 0
open("/etc/services", O_RDONLY)         = 3
fcntl(3, F_GETFD)                       = 0
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=362031, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaacb7000
read(3, "# /etc/services:\n# $Id: services"..., 4096) = 4096
read(3, "rotocol\nntp\t\t123/tcp\nntp\t\t123/ud"..., 4096) = 4096
read(3, "767/udp\nrsync\t\t873/tcp\t\t\t\t# rsyn"..., 4096) = 4096
read(3, "stmanager\ncvspserver\t2401/tcp\t\t\t"..., 4096) = 4096
close(3)                                = 0
munmap(0x2aaaaacb7000, 4096)            = 0
rt_sigaction(SIGPIPE, {0x1, [PIPE], SA_RESTORER|SA_RESTART, 0x3fab2302d0}, {SIG_DFL, [], 0}, 8) = 0
clone(child_stack=0x417fb250, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x417fb9d0, tls=0x417fb940, child_tidptr=0x417fb9d0) = 25526
mmap(NULL, 10489856, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_32BIT, -1, 0) = 0x41ef1000
mprotect(0x41ef1000, 4096, PROT_NONE)   = 0
clone(child_stack=0x428f1250, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x428f19d0, tls=0x428f1940, child_tidptr=0x428f19d0) = 25527
mmap(NULL, 10489856, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_32BIT, -1, 0) = 0x428f2000
mprotect(0x428f2000, 4096, PROT_NONE)   = 0
clone(child_stack=0x432f2250, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x432f29d0, tls=0x432f2940, child_tidptr=0x432f29d0) = 25528
+++ killed by SIGSEGV +++


GDB 调用

[root@db-13 tpcc-mysql]# gdb
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5)
Copyright (C) 2009 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_start
Reading symbols from /tmp/tpcc-mysql/tpcc_start...done.
(gdb) run
Starting program: /tmp/tpcc-mysql/tpcc_start 
[Thread debugging using libthread_db enabled]
***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
<Parameters>
     [server]: 
     [port]: 3306
     [DBname]: tpcc
       [user]: 
       [pass]: 
  [warehouse]: 1
 [connection]: 10
     [rampup]: 10 (sec.)
    [measure]: 20 (sec.)
[New Thread 0x40a00940 (LWP 27592)]
[Thread 0x40a00940 (LWP 27592) exited]
[New Thread 0x40a00940 (LWP 27593)]
[New Thread 0x41401940 (LWP 27594)]
[New Thread 0x41e02940 (LWP 27595)]
[New Thread 0x42803940 (LWP 27596)]
[New Thread 0x43204940 (LWP 27597)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x40a00940 (LWP 27593)]
my_stat (path=0x409ff750 "/usr/local/mysql/share/charsets/Index.xml", stat_area=0x409ff620, my_flags=0) at /pb2/build/sb_0-6421281-1342807431.83/mysql-5.5.27/mysys/my_lib.c:413
413	/pb2/build/sb_0-6421281-1342807431.83/mysql-5.5.27/mysys/my_lib.c: No such file or directory.
	in /pb2/build/sb_0-6421281-1342807431.83/mysql-5.5.27/mysys/my_lib.c
(gdb) 
(gdb) q
A debugging session is active.

	Inferior 1 [process 27589] will be killed.

Quit anyway? (y or n) y

删除 mysql.sock

[root@db-13 tmp]# rm mysql.sock 
rm: remove symbolic link `mysql.sock'? y

再次调用

[root@db-13 tpcc-mysql]# gdb
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5)
Copyright (C) 2009 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_start
Reading symbols from /tmp/tpcc-mysql/tpcc_start...done.
(gdb) run
Starting program: /tmp/tpcc-mysql/tpcc_start 
[Thread debugging using libthread_db enabled]
***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
<Parameters>
     [server]: 
     [port]: 3306
     [DBname]: tpcc
       [user]: 
       [pass]: 
  [warehouse]: 1
 [connection]: 10
     [rampup]: 10 (sec.)
    [measure]: 20 (sec.)
[New Thread 0x40a00940 (LWP 28199)]
[Thread 0x40a00940 (LWP 28199) exited]
[New Thread 0x40a00940 (LWP 28200)]
[New Thread 0x41401940 (LWP 28201)]
error at thread_main
0, , 
error at thread_main
2002, HY000, Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
[Thread 0x41401940 (LWP 28201) exited]
[New Thread 0x41e02940 (LWP 28202)]
error at thread_main
[Thread 0x40a00940 (LWP 28200) exited]
2002, HY000, Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
[New Thread 0x42803940 (LWP 28203)]
error at thread_main
2002, HY000, Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
[Thread 0x41e02940 (LWP 28202) exited]
[Thread 0x42803940 (LWP 28203) exited]
[New Thread 0x43204940 (LWP 28204)]
error at thread_main
2002, HY000, Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
[New Thread 0x43c05940 (LWP 28205)]
error at thread_main
2002, HY000, Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
[Thread 0x43204940 (LWP 28204) exited]
[Thread 0x43c05940 (LWP 28205) exited]
[New Thread 0x44606940 (LWP 28207)]
error at thread_main
2002, HY000, Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
[New Thread 0x45007940 (LWP 28208)]
error at thread_main
2002, HY000, Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
[Thread 0x44606940 (LWP 28207) exited]
[Thread 0x45007940 (LWP 28208) exited]
[New Thread 0x45a08940 (LWP 28210)]
error at thread_main
2002, HY000, Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
[New Thread 0x46409940 (LWP 28211)]
[Thread 0x45a08940 (LWP 28210) exited]

RAMP-UP TIME.(10 sec.)
error at thread_main
2002, HY000, Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
[Thread 0x46409940 (LWP 28211) exited]

MEASURING START.

  10, 0(0):0.000|0.000, 0(0):0.000|0.000, 0(0):0.000|0.000, 0(0):0.000|0.000, 0(0):0.000|0.000
  20, 0(0):0.000|0.000, 0(0):0.000|0.000, 0(0):0.000|0.000, 0(0):0.000|0.000, 0(0):0.000|0.000

STOPPING THREADS

<Raw Results>
  [0] sc:0  lt:0  rt:0  fl:0 
  [1] sc:0  lt:0  rt:0  fl:0 
  [2] sc:0  lt:0  rt:0  fl:0 
  [3] sc:0  lt:0  rt:0  fl:0 
  [4] sc:0  lt:0  rt:0  fl:0 
 in 20 sec.

<Raw Results2(sum ver.)>
  [0] sc:0  lt:0  rt:0  fl:0 
  [1] sc:0  lt:0  rt:0  fl:0 
  [2] sc:0  lt:0  rt:0  fl:0 
  [3] sc:0  lt:0  rt:0  fl:0 
  [4] sc:0  lt:0  rt:0  fl:0 

<Constraint Check> (all must be [OK])
 [transaction percentage]
        Payment: nan% (>=43.0%) [NG] *
   Order-Status: nan% (>= 4.0%) [NG] *
       Delivery: nan% (>= 4.0%) [NG] *
    Stock-Level: nan% (>= 4.0%) [NG] *
 [response time (at least 90% passed)]
      New-Order: nan%  [NG] *
        Payment: nan%  [NG] *
   Order-Status: nan%  [NG] *
       Delivery: nan%  [NG] *
    Stock-Level: nan%  [NG] *

<TpmC>
                 0.000 TpmC

Program exited normally.
(gdb) q

重新link mysql.sock

[root@db-13 data]# ln -s  /data/mysql/data/mysql.sock  /tmp/mysql.sock
[root@db-13 data]# ls -l /tmp/mysql.sock 
lrwxrwxrwx 1 root root 27 Mar 19 15:59 /tmp/mysql.sock -> /data/mysql/data/mysql.sock

再次调用

[root@db-13 tpcc-mysql]# gdb
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5)
Copyright (C) 2009 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_start
Reading symbols from /tmp/tpcc-mysql/tpcc_start...done.
(gdb) run
Starting program: /tmp/tpcc-mysql/tpcc_start 
[Thread debugging using libthread_db enabled]
***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
<Parameters>
     [server]: 
     [port]: 3306
     [DBname]: tpcc
       [user]: 
       [pass]: 
  [warehouse]: 1
 [connection]: 10
     [rampup]: 10 (sec.)
    [measure]: 20 (sec.)
[New Thread 0x40a00940 (LWP 28955)]
[Thread 0x40a00940 (LWP 28955) exited]
[New Thread 0x40a00940 (LWP 28956)]
[New Thread 0x41401940 (LWP 28957)]
[New Thread 0x41e02940 (LWP 28959)]
[New Thread 0x42803940 (LWP 28961)]
[New Thread 0x43204940 (LWP 28963)]
[New Thread 0x43c05940 (LWP 28965)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x40a00940 (LWP 28956)]
my_stat (path=0x409ff750 "/usr/local/mysql/share/charsets/Index.xml", stat_area=0x409ff620, my_flags=0) at /pb2/build/sb_0-6421281-1342807431.83/mysql-5.5.27/mysys/my_lib.c:413
413	/pb2/build/sb_0-6421281-1342807431.83/mysql-5.5.27/mysys/my_lib.c: No such file or directory.
	in /pb2/build/sb_0-6421281-1342807431.83/mysql-5.5.27/mysys/my_lib.c
(gdb) q
A debugging session is active.

	Inferior 1 [process 28952] will be killed.

Quit anyway? (y or n) y

[root@db-13 tpcc-mysql]# find / -name mysql-5.5.27
[root@db-13 tpcc-mysql]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 148786916 4382960 136724084 4% /
/dev/sda7 258699556 191712 245154620 1% /backup
/dev/sdb1 1134323348 178684616 897089040 17% /data
/dev/sda6 10153988 8957012 672860 94% /var
/dev/sda5 20315812 203008 19064164 2% /home
/dev/sda1 248895 12332 223713 6% /boot
tmpfs 66047196 0 66047196 0% /dev/shm

创建path file
[root@db-13 data]# mkdir -p /usr/local/mysql/share/charsets/
[root@db-13 data]# touch /usr/local/mysql/share/charsets/Index.xml

再次调用

[root@db-13 tpcc-mysql]# gdb
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5)
Copyright (C) 2009 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 ptcc_start
ptcc_start: No such file or directory.
(gdb) file tpcc_start
Reading symbols from /tmp/tpcc-mysql/tpcc_start...done.
(gdb) run
Starting program: /tmp/tpcc-mysql/tpcc_start 
[Thread debugging using libthread_db enabled]
***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
<Parameters>
     [server]: 
     [port]: 3306
     [DBname]: tpcc
       [user]: 
       [pass]: 
  [warehouse]: 1
 [connection]: 10
     [rampup]: 10 (sec.)
    [measure]: 20 (sec.)
[New Thread 0x40a00940 (LWP 29179)]
[Thread 0x40a00940 (LWP 29179) exited]
[New Thread 0x40a00940 (LWP 29180)]
[New Thread 0x41401940 (LWP 29181)]
[New Thread 0x41e02940 (LWP 29182)]
[New Thread 0x42803940 (LWP 29183)]
[New Thread 0x43204940 (LWP 29184)]
[New Thread 0x43c05940 (LWP 29185)]
[New Thread 0x44606940 (LWP 29186)]
error at thread_main
error at thread_main
error at thread_main
1045, 28000, 
error at thread_main
1045, 28000, Access denied for user 'root'@'localhost' (using password: NO)
error at thread_main
[New Thread 0x45007940 (LWP 29188)]
1045, 28000, Access denied for user 'root'@'localhost' (using password: NO)
1045, 28000, Access denied for user 'root'@'localhost' (using password: NO)
error at thread_main
1045, 28000, Access denied for user 'root'@'localhost' (using password: NO)
[Thread 0x43204940 (LWP 29184) exited]
error at thread_main
[Thread 0x41e02940 (LWP 29182) exited]
[New Thread 0x45a08940 (LWP 29189)]
1045, 28000, Access denied for user 'root'@'localhost' (using password: NO)
error at thread_main
1045, 28000, Access denied for user 'root'@'localhost' (using password: NO)
[Thread 0x42803940 (LWP 29183) exited]
1045, 28000, Access denied for user 'root'@'localhost' (using password: NO)
[Thread 0x44606940 (LWP 29186) exited]
[Thread 0x45007940 (LWP 29188) exited]
[Thread 0x43c05940 (LWP 29185) exited]
[Thread 0x41401940 (LWP 29181) exited]
[New Thread 0x46409940 (LWP 29190)]
error at thread_main

RAMP-UP TIME.(10 sec.)
1045, 28000, Access denied for user 'root'@'localhost' (using password: NO)
[Thread 0x40a00940 (LWP 29180) exited]
[Thread 0x45a08940 (LWP 29189) exited]
error at thread_main
1045, 28000, Access denied for user 'root'@'localhost' (using password: NO)
[Thread 0x46409940 (LWP 29190) exited]

MEASURING START.

  10, 0(0):0.000|0.000, 0(0):0.000|0.000, 0(0):0.000|0.000, 0(0):0.000|0.000, 0(0):0.000|0.000

Program received signal SIGINT, Interrupt.
0x0000003fabe0e39d in pause () from /lib64/libpthread.so.0
(gdb) 
(gdb) q
A debugging session is active.

	Inferior 1 [process 29176] will be killed.

Quit anyway? (y or n) 
Please answer y or n.
A debugging session is active.

	Inferior 1 [process 29176] will be killed.

Quit anyway? (y or n) y
[root@db-13 tpcc-mysql]# ./tpcc_start  -h 127.0.0.1 -d test  -u root  -p 'yihaodian'  -w 30  -c 60  -r 60   -l 1000 -f mysql_tpcc_20130319
***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
option h with value '127.0.0.1'
option d with value 'test'
option u with value 'root'
option p with value 'yihaodian'
option w with value '30'
option c with value '60'
option r with value '60'
option l with value '1000'
option f with value 'mysql_tpcc_20130319'
<Parameters>
     [server]: 127.0.0.1
     [port]: 3306
     [DBname]: test
       [user]: root
       [pass]: yihaodian
  [warehouse]: 30
 [connection]: 60
     [rampup]: 60 (sec.)
    [measure]: 1000 (sec.)
error at thread_main
1146, 42S02, Table 'test.customer' doesn't exist
error at thread_main
1146, 42S02, Table 'test.customer' doesn't exist
error at thread_main
1146, 42S02, Table 'test.customer' doesn't exist
error at thread_main
1146, 42S02, Table 'test.customer' doesn't exist
error at thread_main
1146, 42S02, Table 'test.customer' doesn't exist
error at thread_main
1146, 42S02, Table 'test.customer' doesn't exist


OK!

[root@db-13 tpcc-mysql]# ./tpcc_start -h 127.0.0.1 -d tpcc1000 -u root -p ‘yihaodian’ -w 30 -c 60 -r 60 -l 1000 -f mysql_tpcc_20130319

***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
option h with value '127.0.0.1'
option d with value 'tpcc1000'
option u with value 'root'
option p with value 'yihaodian'
option w with value '30'
option c with value '60'
option r with value '60'
option l with value '1000'
option f with value 'mysql_tpcc_20130319'
<Parameters>
     [server]: 127.0.0.1
     [port]: 3306
     [DBname]: tpcc1000
       [user]: root
       [pass]: yihaodian
  [warehouse]: 30
 [connection]: 60
     [rampup]: 60 (sec.)
    [measure]: 1000 (sec.)

RAMP-UP TIME.(60 sec.)

MEASURING START.

  10, 2639(0):2.135|3.487, 2635(0):0.443|1.441, 263(0):0.258|0.458, 264(0):2.723|3.562, 263(0):6.258|9.052
  20, 3144(0):2.073|2.507, 3151(0):0.431|0.539, 316(0):0.267|0.368, 318(0):2.680|2.907, 314(0):6.354|8.062
  30, 2609(0):2.024|2.413, 2602(0):0.417|0.505, 259(0):0.245|0.288, 257(0):2.774|2.940, 261(0):6.030|6.613
  40, 3311(0):2.079|2.454, 3309(0):0.426|0.522, 332(0):0.238|0.270, 328(0):2.699|3.071, 331(0):5.638|7.017
  50, 2464(0):2.105|2.475, 2469(0):0.425|0.540, 246(0):0.229|0.289, 247(0):2.651|2.820, 246(0):6.281|6.725
  60, 2884(0):2.085|2.773, 2883(0):0.427|0.501, 289(0):0.253|0.281, 295(0):2.712|2.879, 289(0):6.327|6.646
  70, 2641(0):2.043|2.436, 2640(0):0.437|0.701, 263(0):0.248|0.292, 263(0):2.833|2.868, 263(0):5.315|6.035
  80, 3045(0):2.038|2.497, 3049(0):0.429|0.558, 306(0):0.252|0.452, 310(0):2.692|2.841, 305(0):5.783|7.210
  90, 2551(0):2.043|2.564, 2551(0):0.433|0.552, 255(0):0.258|0.325, 249(0):2.653|2.823, 256(0):5.321|6.107
 100, 2553(0):2.078|2.721, 2551(0):0.439|0.551, 254(0):0.231|0.247, 256(0):2.688|3.792, 255(0):6.583|7.014
 110, 2923(0):2.060|2.483, 2924(0):0.426|0.763, 293(0):0.251|0.295, 295(0):2.645|2.878, 293(0):5.843|6.378
 120, 2639(0):2.007|2.252, 2638(0):0.434|0.539, 264(0):0.234|0.301, 261(0):2.726|2.823, 262(0):6.181|6.839
 130, 2884(0):2.062|2.515, 2885(0):0.425|0.554, 288(0):0.248|0.285, 283(0):2.597|2.892, 289(0):6.086|6.667
 140, 2758(0):2.095|2.542, 2750(0):0.434|0.962, 276(0):0.252|0.267, 279(0):2.662|3.059, 276(0):5.527|7.356
 150, 2406(0):2.011|2.492, 2416(0):0.426|0.492, 241(0):0.259|0.285, 248(0):2.650|2.691, 240(0):5.834|6.283
 160, 2903(0):2.066|2.361, 2904(0):0.431|0.522, 289(0):0.255|0.328, 282(0):2.828|2.927, 291(0):5.757|6.791
 170, 2677(0):2.023|2.730, 2672(0):0.426|0.535, 269(0):0.249|0.348, 267(0):2.674|2.810, 268(0):5.374|7.441
 180, 2395(0):2.061|2.474, 2385(0):0.440|0.555, 239(0):0.249|0.259, 254(0):2.643|2.724, 239(0):5.896|7.731