[tpcc-mysql] SIGABRT on load.c:277
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
percona-tools |
New
|
Undecided
|
Unassigned |
Bug Description
Error(0) is called in load.c:277 as the connection failed.
mysql_real_connect was called on line 177 or 180 and the response stored in resp. The goto on line 188 triggered the call to Error(0).
The Error function is defined on line 1216 and does a mysql_close(mysql)
The patch will do a goto Error_SqlCall instead of Error_SqlCall_close if the mysql_errno is 2003.
user@host:
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
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 "i486-linux-gnu".
For bug reporting instructions, please see:
<http://
Reading symbols from /home/user/
(gdb) r
Starting program: /home/user/
[Thread debugging using libthread_db enabled]
*******
*** ###easy### TPC-C Data Loader ***
*******
<Parameters>
[server]: localhost
[port]: 3306
[DBname]: tpcc
[user]: user
[pass]: pass
[warehouse]: 1
[New Thread 0xb7fe4b70 (LWP 8240)]
2002, HY000, Can't connect to local MySQL server through socket '/var/run/
*** glibc detected *** /home/user/
======= Backtrace: =========
/lib/tls/
/lib/tls/
/lib/tls/
/usr/lib/
/usr/lib/
/home/user/
/home/user/
/lib/tls/
/home/user/
======= Memory map: ========
00110000-0012b000 r-xp 00000000 08:01 3801123 /lib/ld-2.11.1.so
0012b000-0012c000 r--p 0001a000 08:01 3801123 /lib/ld-2.11.1.so
0012c000-0012d000 rw-p 0001b000 08:01 3801123 /lib/ld-2.11.1.so
0012d000-0012e000 r-xp 00000000 00:00 0 [vdso]
0012e000-002da000 r-xp 00000000 08:01 664296 /usr/lib/
002da000-002db000 ---p 001ac000 08:01 664296 /usr/lib/
002db000-002de000 r--p 001ac000 08:01 664296 /usr/lib/
002de000-00323000 rw-p 001af000 08:01 664296 /usr/lib/
00323000-00324000 rw-p 00000000 00:00 0
00324000-00339000 r-xp 00000000 08:01 3805714 /lib/tls/
00339000-0033a000 r--p 00014000 08:01 3805714 /lib/tls/
0033a000-0033b000 rw-p 00015000 08:01 3805714 /lib/tls/
0033b000-0033d000 rw-p 00000000 00:00 0
0033d000-00346000 r-xp 00000000 08:01 3805701 /lib/tls/
00346000-00347000 r--p 00008000 08:01 3805701 /lib/tls/
00347000-00348000 rw-p 00009000 08:01 3805701 /lib/tls/
00348000-0036f000 rw-p 00000000 00:00 0
0036f000-00382000 r-xp 00000000 08:01 3805706 /lib/tls/
00382000-00383000 r--p 00012000 08:01 3805706 /lib/tls/
00383000-00384000 rw-p 00013000 08:01 3805706 /lib/tls/
00384000-00386000 rw-p 00000000 00:00 0
00386000-003aa000 r-xp 00000000 08:01 3805704 /lib/tls/
003aa000-003ab000 r--p 00023000 08:01 3805704 /lib/tls/
003ab000-003ac000 rw-p 00024000 08:01 3805704 /lib/tls/
003ac000-004ff000 r-xp 00000000 08:01 3805699 /lib/tls/
004ff000-00500000 ---p 00153000 08:01 3805699 /lib/tls/
00500000-00502000 r--p 00153000 08:01 3805699 /lib/tls/
00502000-00503000 rw-p 00155000 08:01 3805699 /lib/tls/
00503000-00506000 rw-p 00000000 00:00 0
00506000-00519000 r-xp 00000000 08:01 3801098 /lib/libz.
00519000-0051a000 r--p 00012000 08:01 3801098 /lib/libz.
0051a000-0051b000 rw-p 00013000 08:01 3801098 /lib/libz.
0051b000-00538000 r-xp 00000000 08:01 3801102 /lib/libgcc_s.so.1
00538000-00539000 r--p 0001c000 08:01 3801102 /lib/libgcc_s.so.1
00539000-0053a000 rw-p 0001d000 08:01 3801102 /lib/libgcc_s.so.1
08048000-0804d000 r-xp 00000000 00:17 24631559 /home/user/
0804d000-0804e000 r--p 00005000 00:17 24631559 /home/user/
0804e000-0804f000 rw-p 00006000 00:17 24631559 /home/user/
0804f000-08073000 rw-p 00000000 00:00 0 [heap]
b7600000-b7621000 rw-p 00000000 00:00 0
b7621000-b7700000 ---p 00000000 00:00 0
b77af000-b77e4000 r--s 00000000 08:01 262319 /var/cache/
b77e4000-b77e5000 ---p 00000000 00:00 0
b77e5000-b7fe8000 rw-p 00000000 00:00 0
b7ffd000-b8000000 rw-p 00000000 00:00 0
bffeb000-c0000000 rw-p 00000000 00:00 0 [stack]
[Thread 0xb7fe4b70 (LWP 8240) exited]
Program received signal SIGABRT, Aborted.
0x0012d422 in __kernel_vsyscall ()
(gdb) bt f
#0 0x0012d422 in __kernel_vsyscall ()
No symbol table info available.
#1 0x003d6651 in raise () from /lib/tls/
No symbol table info available.
#2 0x003d9a82 in abort () from /lib/tls/
No symbol table info available.
#3 0x0040d49d in ?? () from /lib/tls/
No symbol table info available.
#4 0x00417591 in ?? () from /lib/tls/
No symbol table info available.
#5 0x00418de8 in ?? () from /lib/tls/
No symbol table info available.
#6 0x0041becd in free () from /lib/tls/
No symbol table info available.
#7 0x00172531 in my_no_flags_free () from /usr/lib/
No symbol table info available.
#8 0x001a2ca3 in mysql_close () from /usr/lib/
No symbol table info available.
#9 0x080496e7 in Error (mysql_stmt=0x0) at load.c:1231
No locals.
#10 0x0804bcfe in main (argc=6, argv=0xbffff8d4) at load.c:277
db_string = "tpcc\000\
db_user = "user\000\
db_password = "pass\000\
port = 3306
i = -1073743660
resp = <value optimised out>
(gdb) q
A debugging session is active.
Inferior 1 [process 8237] will be killed.
Quit anyway? (y or n) y
user@host:
The patch is not complete. Not only mysql_errno 2003 can happen but also 2002...