Meituan-Dianping / DBProxy

GNU General Public License v2.0
2.27k stars 564 forks source link

配置文件的错误提示信息不太好定位。 #1

Open jiamo opened 7 years ago

jiamo commented 7 years ago

https://github.com/Meituan-Dianping/DBProxy/blob/master/doc/USER_GUIDE.md

这个里面:

 #日志缓冲大小(日志条数),默认500
 sql-log-buffer-size=

应该把 500 写进去。

否则:

Program received signal SIGSEGV, Segmentation fault.
0x000000000041093d in main_cmdline (argc=1, argv=0x7fffffffe478) at mysql-proxy-cli.c:866
866         g_critical("%s: %s", G_STRLOC, gerr->message);
(gdb) bt
#0  0x000000000041093d in main_cmdline (argc=1, argv=0x7fffffffe478) at mysql-proxy-cli.c:866
#1  0x00007ffff67b9f45 in __libc_start_main (main=0x40ec90 <main>, argc=2, argv=0x7fffffffe478, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe468) at libc-start.c:287
#2  0x000000000040ecbe in _start ()
(gdb) p argc_p
No symbol "argc_p" in current context.
(gdb) p argv
$1 = (char **) 0x7fffffffe478
(gdb) p *argv
$2 = 0x7fffffffe6db "/usr/local/mysql-proxy/bin/mysql-proxy"
(gdb) quit
A debugging session is active.

    Inferior 1 [process 26534] will be killed.

不好定位是那一个初始化失败。

rj03hou commented 7 years ago

日志缓冲大小(日志条数),默认500

sql-log-buffer-size=

500已经写进去了,后面通过修改代码,把配置项的相关报错信息丰富一下