不确定这是 SF 问题还是 SO 问题。
Centos 5.10 上的负载平衡环境 Apache 2.2.26 中的 LAMP 服务器非常(非常)繁忙。
我正在尝试查找挂起的 httpd 进程的代码或系统问题。这些调用永远处于 W(“正在发送回复”)状态,tcp 连接保持保持活动状态,并且 apache 的超时从未触发。最终,我们积累了足够多的挂起进程,以至于我不得不重新启动 httpd 进程。
这是 strace 的结尾,它似乎围绕着所有挂起的调用。我真的不知道接下来该怎么做。似乎 Apache 正在尝试向控制台写入,我不确定这是否正常。但 malloc 错误肯定指向了错误。任何帮助(即使是疯狂的想法)都值得感激。
我不确定是否有有趣的模块,但这里是 LoadModules。LoadModule rewrite_module modules/mod_rewrite.so LoadModule info_module modules/mod_info.so LoadModule auth_digest_module modules/mod_auth_digest.so LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_balancer_module modules/mod_proxy_balancer.so LoadModule proxy_connect_module modules/mod_proxy_connect.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule ldap_module modules/mod_ldap.so LoadModule authnz_ldap_module modules/mod_authnz_ldap.so LoadModule deflate_module modules/mod_deflate.so LoadModule php4_module modules/libphp4.so
lstat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=12288, ...}) = 0 lstat(“/tmp/promo.log”, {st_mode=S_IFREG|0644, st_size=14778558, ...}) = 打开(“/tmp/promo.log”,O_WRONLY|O_CREAT|O_APPEND,0666)= 27 fstat (27, {st_mode=S_IFREG|0644, st_size=14778558, ...}) = 0 lseek (27,0,SEEK_CUR) = 0 lseek (27,0,SEEK_CUR) = 0 写入(27,“20140314065931:cartitem::calcu”...,68)= 68 关闭(27)= 0 open("/dev/tty", O_RDWR|O_NOCTTY|O_NONBLOCK) = -1 ENXIO (没有这样的设备或地址) writev(2, [{"*** glibc 检测到 *** ", 23}, {"/usr/local/apache-2.2.26/bin/htt"..., 34}, {": ", 2}, {"双重释放或损坏 (!prev"..., 33}, {": 0x", 4}, {"0000000005ebfb20", 16}, {" ***\n", 5}], 7) = 117 open("/usr/local/apache-2.2.26/lib/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (没有此文件或目录) open("/usr/lib64/tls/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (没有此文件或目录) open("/usr/lib64/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (没有此文件或目录) open("/usr/local/apache-2.2.26/lib/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (没有这样的文件或 目录) 打开(“/etc/ld.so.cache”,O_RDONLY) = 27 fstat (27, {st_mode=S_IFREG|0644, st_size=93743, ...}) = 0 mmap(NULL,93743,PROT_READ,MAP_PRIVATE,27,0) = 0x2ba82af8b000 关闭(27)= 0 打开(“/lib64/libgcc_s.so.1”,O_RDONLY)= 27 读取(27,“\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\36`T8\0\0\0”...,832)= 832 fstat (27, {st_mode=S_IFREG|0755, st_size=58400, ...}) = 0 open("/dev/tty", O_RDWR|O_NOCTTY|O_NONBLOCK) = -1 ENXIO (没有这样的设备或地址) writev(2, [{"*** glibc 检测到 *** ", 23}, {"/usr/local/apache-2.2.26/bin/htt"..., 34}, {": ", 2}, {"malloc(): 内存损坏", 27}, {": 0x", 4}, {"0000000005fc1e70", 16}, {" ***\n", 5}], 7) = 111 futex(0x2ba822f1dfc0,FUTEX_WAIT_PRIVATE,9,NULL) = -1 EINTR (中断系统调用) --- SIGTERM (终止) @ 0 (0) --- futex(0x2ba822f1b9e0,FUTEX_WAIT_PRIVATE,2,NULL) = -1 EINTR (中断系统调用) --- SIGCONT (续) @ 0 (0) --- futex(0x2ba822f1b9e0,FUTEX_WAIT_PRIVATE,2,NULL