Apache https 2.4 占用了 Fedora 29 上的所有 CPU

Apache https 2.4 占用了 Fedora 29 上的所有 CPU

更新:我注意到类似问题,也许相关。但我将 MPM 模块更改为 MPM 事件,如此 GDB BT 中所述:

#0  0x00007fc74ea90df4 in read () from target:/lib64/libpthread.so.0
#1  0x000055df44ca24cb in ap_mpm_podx_check ()
#2  0x00007fc74e1f4f57 in ?? () from target:/etc/httpd/modules/mod_mpm_event.so
#3  0x00007fc74e1f528a in ?? () from target:/etc/httpd/modules/mod_mpm_event.so
#4  0x00007fc74e1f531b in ?? () from target:/etc/httpd/modules/mod_mpm_event.so
#5  0x00007fc74e1f6017 in ?? () from target:/etc/httpd/modules/mod_mpm_event.so
#6  0x000055df44c76bde in ap_run_mpm ()
#7  0x000055df44c6f2d3 in main ()

升级到 Fedora 29 后,这种情况开始发生。首先,MySQL 开始使用大量 CPU,但其他主题然后,Apache/httpd 开始真正消耗 CPU。

top - 16:58:34 up 1 day,  5:14,  2 users,  load average: 22.06, 21.55, 21.13
Tasks: 273 total,   1 running, 272 sleeping,   0 stopped,   0 zombie
%Cpu(s): 12.5 us,  1.0 sy,  8.0 ni, 76.8 id,  1.6 wa,  0.1 hi,  0.0 si,  0.0 st
MiB Mem :   7968.8 total,    217.8 free,   1812.1 used,   5938.9 buff/cache
MiB Swap:   8000.0 total,   7547.9 free,    452.1 used.   5843.4 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
12985 apache    20   0 2339912  17908  10748 S  99.3   0.2   3:42.00 /usr/sbin/httpd

我尝试在进程 ID 上运行gdbbt得到很多Missing separate debuginfo for target,但它结束于:

0x00007f3e4a31cdf4 in read () from target:/lib64/libpthread.so.0
(gdb) bt
#0  0x00007f3e4a31cdf4 in read () from target:/lib64/libpthread.so.0
#1  0x00005640ecf6c4cb in ap_mpm_podx_check ()
#2  0x00007f3e49a128de in ?? () from target:/etc/httpd/modules/mod_mpm_worker.so
#3  0x00007f3e49a12c89 in ?? () from target:/etc/httpd/modules/mod_mpm_worker.so
#4  0x00007f3e49a12d1b in ?? () from target:/etc/httpd/modules/mod_mpm_worker.so
#5  0x00007f3e49a13b7f in ?? () from target:/etc/httpd/modules/mod_mpm_worker.so
#6  0x00005640ecf40bde in ap_run_mpm ()
#7  0x00005640ecf392d3 in main ()
(gdb) quit
A debugging session is active.

对进程号的 strace 挂在strace: Process 12985 attached read(8,

并且 Squirrelmail/webmail 超时504 Gateway Timeout。Apache 错误日志中的唯一错误似乎不相关:

[Fri Jan 04 16:07:01.341027 2019] [proxy_fcgi:error] [pid 12985:tid 139904902215424] [client 201.141.38.249:51260] AH01071: Got error 'Primary script unknown\n'
<standard input>:13515: warning [p 113, 7.8i]: can't break line
<standard input>:13668: warning [p 115, 0.2i]: can't break line
<standard input>:686: warning [p 7, 4.5i, div `3tbd0,0', 0.2i]: can't break line
<standard input>:692: warning [p 7, 4.5i, div `3tbd0,3', 0.0i]: can't break line
<standard input>:694: warning [p 7, 4.5i, div `3tbd0,4', 0.0i]: can't break line
<standard input>:696: warning [p 7, 4.5i, div `3tbd0,5', 0.0i]: can't break line
<standard input>:700: warning [p 7, 4.5i, div `3tbd0,7', 0.0i]: can't break line
warning: file `<standard input>', around line 691:
  table wider than line width
<standard input>:1459: warning [p 11, 5.0i]: can't break line
<standard input>:40: warning [p 1, 2.5i]: can't break line
<standard input>:85: warning: can't find special character `u4F60'
<standard input>:85: warning: can't find special character `u597D'
<standard input>:347: warning [p 4, 7.8i, div `3tbd1,0', 0.0i]: can't break line
<standard input>:360: warning [p 4, 7.8i, div `3tbd4,0', 0.0i]: can't break line
<standard input>:380: warning [p 4, 7.8i, div `3tbd8,0', 0.0i]: can't break line
<standard input>:424: warning [p 5, 0.2i, div `3tbd1,0', 0.0i]: can't break line
<standard input>:424: warning [p 5, 0.2i, div `3tbd1,0', 0.3i]: can't break line
<standard input>:485: warning [p 5, 0.2i, div `3tbd14,0', 0.0i]: can't break line
<standard input>:1379: warning [p 13, 12.0i, div `3tbd10,1', 0.0i]: can't break line
<standard input>:1384: warning [p 13, 12.0i, div `3tbd11,0', 0.0i]: can't break line
<standard input>:1903: warning [p 15, 20.8i]: can't break line
[Fri Jan 04 16:59:13.393915 2019] [proxy_fcgi:error] [pid 12981:tid 139904482776832] [client 119.185.41.131:54918] AH01071: Got error 'Primary script unknown\n', 

这不是一个特别繁忙的服务器,并且access_logs没有被填满,所以我不认为这是一个 DOS。

相关内容