PHP 8.2 FPM Leaks processes on pcntl_fork
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 42/100
Línea de trabajo
Comienza con el reproductor index.php de Drupal 10 proporcionado, especialmente la llamada a pcntl_fork() y el comportamiento de los procesos de PHP-FPM. Reprodúcelo con PHP 8.2.10 en Ubuntu 16.04 y compáralo con PHP 7.4. Se considera terminado cuando los procesos bifurcados se limpian después de la espera, en lugar de separarse y permanecer bajo el proceso maestro de FPM.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
OS: xenial
PHP tested: 8.2.7, 8.2.10
The following drupal 10 index.php:
<?php
/**
* @file
* The PHP page that serves all page requests on a Drupal installation.
*
* All Drupal code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt files in the "core" directory.
*/
use Drupal\Core\DrupalKernel;
use Symfony\Component\HttpFoundation\Request;
$autoloader = require_once 'autoload.php';
$kernel = new DrupalKernel('prod', $autoloader);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$pid = pcntl_fork();
if ( $pid !== 0 ) {
// we are the parent process
return;
}
sleep(10);
$kernel->terminate($request, $response);
After doing ~5 requests to the site, results in the following sub-processes to the FPM master:
root 15873 0.0 0.8 464188 17200 ? Ss 13:08 0:00 php-fpm: master process (/var/www/site-fpm/drush12test.prod/php-fpm-8.2.conf)
drush12+ 16518 0.7 1.4 466300 29860 ? S 13:11 0:00 \_ php-fpm: pool drush12test
drush12+ 16557 0.0 0.6 466300 13068 ? S 13:11 0:00 \_ php-fpm: pool drush12test
drush12+ 16559 0.0 0.6 466300 12640 ? S 13:11 0:00 \_ php-fpm: pool drush12test
drush12+ 16561 0.0 0.6 466300 12640 ? S 13:11 0:00 \_ php-fpm: pool drush12test
drush12+ 16563 0.0 0.6 466300 12640 ? S 13:11 0:00 \_ php-fpm: pool drush12test
But then after a few seconds, when it should clean them up, they will instead detach and linger around:
root 15873 0.0 0.8 464188 17188 ? Ss 13:08 0:00 php-fpm: master process (/var/www/site-fpm/drush12test.prod/php-fpm-8.2.conf)
drush12+ 16557 0.0 1.1 464252 23364 ? S 13:11 0:00 php-fpm: pool drush12test
drush12+ 16559 0.0 1.1 464252 23028 ? S 13:11 0:00 php-fpm: pool drush12test
drush12+ 16561 0.0 1.1 464252 23028 ? S 13:11 0:00 php-fpm: pool drush12test
drush12+ 16563 0.0 1.1 466300 23432 ? S 13:11 0:00 php-fpm: pool drush12test
The same doesn't happen with PHP 7.4. In that case the processes get cleaned up properly.
PHP Version
PHP 8.2.10
Operating System
Ubuntu 16.04
- Lenguaje dominante
- C
- Estrellas
- 40.4k
- Forks
- 8.2k
- Merge medio
- 2 d 15 h
- PR fusionados (30 d)
- 103
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.
Más de php/php-src
-
Bug SAPI: cli_server Status: Verified
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
Bug Status: Needs Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
Bug Status: Needs Triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
-
Bug Status: Needs Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Flaky hrtime.phpt test AbiertoBug Category: Tests Status: Verified
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Todos los issues de php/php-src
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
zephyrproject-rtos/zephyr#119726 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
api7/lua-resty-saml#63 ·
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
BasedHardware/omi#15320 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comentarios ·