有些问题只有在大并发访问量的线上机器上才能体现出来,测试机没法重现。
我们可以使用GDB来解决这个问题。
首先在命令行启动GDB
GDB
然后输入
attach http进程id
如果需要设置断电的话,可以先执行stop,然后设置断电
然后 输入 c 或者 continue 让这个进行继续提供服务,如果这个进程发生了Segfault错误,我们可以通过 bt 等跟踪命令,来查看问题出在哪里
GDB调试程序用法 http://www.linuxidc.com/Linux/2013-06/86044.htm
GDB+GDBserver无源码调试Android 动态链接库的技巧 http://www.linuxidc.com/Linux/2013-06/85936.htm
使用hello-gl2建立ndk-GDB环境(有源码和无源码调试环境) http://www.linuxidc.com/Linux/2013-06/85935.htm
在Ubuntu上用GDB调试printf源码 http://www.linuxidc.com/Linux/2013-03/80346.htm
Linux下用GDB调试可加载模块 http://www.linuxidc.com/Linux/2013-01/77969.htm
Ubuntu下使用GDB断点Go程序 http://www.linuxidc.com/Linux/2012-06/62941.htm
本文永久更新链接地址:http://www.linuxidc.com/Linux/2014-11/109112.htm
