Home > Database > Mysql Tutorial > 关于MySQL-Proxy子进程异常退出BUG修复

关于MySQL-Proxy子进程异常退出BUG修复

WBOY
Release: 2016-06-07 17:22:02
Original
1055 people have browsed it

关于MySQL-Proxy子进程异常退出的问题,我已经在之前的博文中提到过:http://sofar.blog.51cto.com/353572/1398820相关的错误信息如下图所示:经查阅11号信号为S


刚开始定位到以下两个源码文件:

src/chassis-unix-daemon.c

src/chassis-mainloop.c


在其中看到了对 SIGTERM/SIGINT/SIGHUP 三个信号的处理,于是也按照类似的方法添加了对 SIGSEGV 信号的处理(将其信号忽略掉),修改大致如下:

src/chassis-unix-daemon.c:

signal(SIGSEGV, chassis_unix_signal_forward); ...... signal(SIGSEGV, SIG_DFL);

src/chassis-mainloop.c:

struct event ev_sigterm, ev_sigint, ev_sigsegv; ...... signal_set(&ev_sigsegv, SIGSEGV, sigsegv_handler, NULL); event_base_set(chas->event_base, &ev_sigsegv); signal_add(&ev_sigsegv, NULL); ...... signal_del(&ev_sigsegv);


# make && make install


再次启动编译后的 MySQL-Proxy 程序,几分钟后会生成如下core文件:




本文出自 “人生理想在于坚持不懈” 博客,请务必保留此出处

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template