Score:0

php7.4-fpm consumes 100% CPU and loops mremap() system call

ph flag

Recently I have upgraded to the mainline Debian 10 backport kernel. This morning I've noticed that the web server is very slow, and inspection showed 100% CPU usage by php7.4-fpm:

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
13901 www-data  20   0  461632 240612  91188 R 100.0   0.5  37:09.65 php-fpm7.4
16105 root      20   0  154088 101800  19280 R 100.0   0.2   0:48.18 php
13792 www-data  20   0  460844 240328  91512 R 100.0   0.5  37:31.51 php-fpm7.4
13948 www-data  20   0  463308 243644  94548 R 100.0   0.5  37:16.08 php-fpm7.4
16040 username  20   0   11708  10196   4612 R 100.0   0.0   1:02.09 imap
13752 www-data  20   0  467348 247620  93176 R 100.0   0.5  38:39.73 php-fpm7.4
  739 clamav    20   0 2725056   2.3g  11028 S 100.0   4.8  52:25.38 clamd
13796 www-data  20   0  464888 247260  95524 R 100.0   0.5  39:00.51 php-fpm7.4

The traced php7.4-fpm process appears to be looping and executing only the mremap() system call:

mremap(0x7f48cb600000, 13074432, 13078528, 0) = 0x7f48cb600000
mremap(0x7f48cb600000, 13078528, 13082624, 0) = 0x7f48cb600000
mremap(0x7f48cb600000, 13082624, 13086720, 0) = 0x7f48cb600000
mremap(0x7f48cb600000, 13086720, 13090816, 0) = 0x7f48cb600000
mremap(0x7f48cb600000, 13090816, 13094912, 0) = 0x7f48cb600000
mremap(0x7f48cb600000, 13094912, 13099008, 0) = 0x7f48cb600000
mremap(0x7f48cb600000, 13099008, 13103104, 0) = 0x7f48cb600000
mremap(0x7f48cb600000, 13103104, 13107200, 0) = 0x7f48cb600000
mremap(0x7f48cb600000, 13107200, 13111296, 0) = 0x7f48cb600000
mremap(0x7f48cb600000, 13111296, 13115392, 0) = 0x7f48cb600000
mremap(0x7f48cb600000, 13115392, 13119488, 0) = 0x7f48cb600000
mremap(0x7f48cb600000, 13119488, 13123584, 0) = 0x7f48cb600000
mremap(0x7f48cb600000, 13123584, 13127680, 0) = 0x7f48cb600000
mremap(0x7f48cb600000, 13127680, 13131776, 0) = 0x7f48cb600000
mremap(0x7f48cb600000, 13131776, 13135872, 0) = 0x7f48cb600000
mremap(0x7f48cb600000, 13135872, 13139968, 0) = 0x7f48cb600000
mremap(0x7f48cb600000, 13139968, 13144064, 0) = 0x7f48cb600000
mremap(0x7f48cb600000, 13144064, 13148160, 0) = 0x7f48cb600000
mremap(0x7f48cb600000, 13148160, 13152256, 0) = 0x7f48cb600000
mremap(0x7f48cb600000, 13152256, 13156352, 0) = 0x7f48cb600000
mremap(0x7f48cb600000, 13156352, 13160448, 0) = 0x7f48cb600000
mremap(0x7f48cb600000, 13160448, 13164544, 0) = 0x7f48cb600000
.
.
.

Version of php7.4-fpm is 1:7.4.33-5+0~20230409.78+debian10~1.gbpa1ea7f alongside PHP packages from https://packages.sury.org/php/ buster, updated Apr/12/2023.

No change in configuration was made.

Rebooting into 4.19.0-23-amd64 kernel 4.19.269-1 did not fix the issue.

ii linux-image-4.19.0-23-amd64 4.19.269-1

There was no change of the configuration in the last weak AFAICR.

I tried to boot into the 4.19.0-23 kernel, expecting that it could be the problem with BPO 5.10.127-2 kernel.

However, the 100% CPU usage by the fpm7.4-fpm and very slow web remained.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.