ulimit -c unlimited
ulimit -c
output: unlimited
vi the httpd.conf,
add "CoreDumpDirectory current _user_home",defaultly the corefile will dump to "/",this directory owner is root.
restart the httpd.
access the url which leads process exit.
gdb httpd_path --core=corefile
info threads
search the kill() or threads of top n.
thr x
bt

本文介绍如何通过修改httpd.conf文件设置core dump目录为当前用户的家目录,并重启httpd服务。通过访问导致进程退出的URL并使用gdb进行调试,找到kill()调用或线程的堆栈跟踪。
2万+

被折叠的 条评论
为什么被折叠?



