php-fpm trying to kill another user's pool results in an infinite loop and 99% cpu usage
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- C
- Estrellas
- 40.4k
- Forks
- 8.1k
- Merge medio
- 2 d 13 h
- PR fusionados (30 d)
- 96
Descripción
Description
Hi,
We've come across an interesting issue where an instance of the php-fpm pool ran by one user gets stuck restarting and tries to kill another user's php-fpm pool instances.. similar issue has been described here:
https://bugs.php.net/bug.php?id=74709
Can you please help us fix this? Here's a snippet of strace of the process in question:-
strace: Process 34545 attached
kill(32328, SIGTERM) = -1 EPERM (Operation not permitted)
fcntl(3, F_GETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1, l_pid=32328}) = 0
kill(32328, SIGTERM) = -1 EPERM (Operation not permitted)
fcntl(3, F_GETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1, l_pid=32328}) = 0
kill(32328, SIGTERM) = -1 EPERM (Operation not permitted)
fcntl(3, F_GETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1, l_pid=32328}) = 0
kill(32328, SIGTERM) = -1 EPERM (Operation not permitted)
fcntl(3, F_GETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1, l_pid=32328}) = 0
kill(32328, SIGTERM) = -1 EPERM (Operation not permitted)
fcntl(3, F_GETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1, l_pid=32328}) = 0
kill(32328, SIGTERM) = -1 EPERM (Operation not permitted)
fcntl(3, F_GETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1, l_pid=32328}) = 0
kill(32328, SIGTERM) = -1 EPERM (Operation not permitted)
fcntl(3, F_GETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1, l_pid=32328}) = 0
kill(32328, SIGTERM) = -1 EPERM (Operation not permitted)
fcntl(3, F_GETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1, l_pid=32328}) = 0
kill(32328, SIGTERM) = -1 EPERM (Operation not permitted)
fcntl(3, F_GETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1, l_pid=32328}) = 0
kill(32328, SIGTERM) = -1 EPERM (Operation not permitted)
fcntl(3, F_GETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1, l_pid=32328}) = 0
kill(32328, SIGTERM) = -1 EPERM (Operation not permitted)
fcntl(3, F_GETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1, l_pid=32328}) = 0
kill(32328, SIGTERM) = -1 EPERM (Operation not permitted)
fcntl(3, F_GETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1, l_pid=32328}) = 0
kill(32328, SIGTERM) = -1 EPERM (Operation not permitted)
fcntl(3, F_GETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1, l_pid=32328}) = 0
kill(32328, SIGTERM) = -1 EPERM (Operation not permitted)
fcntl(3, F_GETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1, l_pid=32328}) = 0
kill(32328, SIGTERM) = -1 EPERM (Operation not permitted)
fcntl(3, F_GETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1, l_pid=32328}) = 0
kill(32328, SIGTERM) = -1 EPERM (Operation not permitted)
fcntl(3, F_GETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1, l_pid=32328}) = 0
kill(32328, SIGTERM) = -1 EPERM (Operation not permitted)
fcntl(3, F_GETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1, l_pid=32328}) = 0
kill(32328, SIGTERM) = -1 EPERM (Operation not permitted)
fcntl(3, F_GETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1, l_pid=32328}) = 0
kill(32328, SIGTERM) = -1 EPERM (Operation not permitted)
fcntl(3, F_GETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1, l_pid=32328}) = 0
kill(32328, SIGTERM) = -1 EPERM (Operation not permitted)
fcntl(3, F_GETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1, l_pid=32328}) = 0
kill(32328, SIGTERM) = -1 EPERM (Operation not permitted)
the process for which above strace is for is owned by user "xyz", while the process it's trying to kill (process id: 32328) is owned by user "anc".
I would also like to add that this causes all of our websites to timeout. by all websites i mean websites which are using the same php version. like for example the process that's currently stuck and reported in my below mssg is using php 8.0.15 and so all of the websites on my server using php 8.0.15 are timing out.
PHP Version
8.0.15
Operating System
CloudLinux v7.9.0 (CentOS 7)
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
No se identifica ningún archivo fuente ni prueba. Empieza reproduciendo el reinicio del pool de php-fpm en PHP 8.0.15 sobre CloudLinux v7.9/CentOS 7 e inspecciona la secuencia repetida de kill y file-lock que muestra strace. Se considerará terminado cuando un resultado EPERM no pueda provocar un bucle infinito que afecte al pool de otro usuario y los sitios que usan la misma versión de PHP sigan respondiendo.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- c, php
- Área
- backend, operating-systems
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 30/100