php / php/php-src

php-fpm freezes in uninterruptible accept() system call on Ubuntu 24.04

Abierto
#20,290 1 comentario 1 reacción 1 asignado Ver en GitHub

@bukka ya está trabajando en esto.

Desde el 25/10/2025.

Bug SAPI: fpm Status: Needs Triage
Lenguaje dominante
C
Estrellas
40.4k
Forks
8.2k
Merge medio
2 d 13 h
PR fusionados (30 d)
96

Descripción

Description

On a fresh installation of Ubuntu 24.04, the php-fpm service enters an uninterruptible sleep state after completing a web request, causing all subsequent requests to time out. This bug is 100% reproducible and appears to be a deep, low-level incompatibility.
This bug has been reproduced with two separate PHP builds:
The official php8.3-fpm package from the main Ubuntu 24.04 repository.
The php8.4-fpm package from the ppa:ondrej/php PPA.
In both cases, the service exhibits the exact same freezing behavior.
Environment:
OS: Ubuntu 24.04 (Fresh installation, kernel Linux server 6.8.0-31-generic)
Hardware: Dell Optiplex 990 (Intel Core i5-2400)
Web Server: Nginx 1.24.0
PHP Version: Tested and failed on both 8.3 (official Ubuntu) and 8.4 (ppa:ondrej/php).
Steps to Reproduce:
Set up a standard Nginx + PHP-FPM environment on Ubuntu 24.04.
Run the php-fpm service via systemd.
Send any simple PHP web request (e.g., phpinfo();).
The first request will likely succeed. Subsequent requests will hang, and strace reveals the worker process is frozen.
Definitive strace Proof:
We have captured the exact moment of failure by running php-fpm under strace -f. The worker process successfully completes one request and then freezes permanently on the subsequent accept() system call. It enters an uninterruptible state that requires kill -9 to terminate.
Here are the final lines of the trace for the frozen PID:
[pid 898632] shutdown(5, SHUT_WR) = 0
[pid 898632] recvfrom(5, "\1\5\0\1\0\0\0\0", 8, 0, NULL, NULL) = 8
[pid 898632] recvfrom(5, "", 8, 0, NULL, NULL) = 0
[pid 898632] close(5) = 0
[pid 898632] write(2, "\0fscf\0", 6) = 6
[pid 898632] accept(10, <unfinished ...>
What We Have Ruled Out:
This is not a user-space configuration issue. We have proven that:
The www-data user has full network access from the command line (sudo -u www-data curl ... succeeds).
A full PHP script with cURL POST requests succeeds when run from the command line as www-data.
There are no restrictive systemd, AppArmor, or ufw policies being applied.
The issue is specific to the php-fpm service environment itself and its interaction with the kernel accept() system call. This is a critical, showstopper bug for using PHP-FPM on this platform.

PHP Version
PHP 8.4.13 (cli) (built: Oct  1 2025 20:34:15) (NTS)
Copyright (c) The PHP Group
Built by Debian
Zend Engine v4.4.13, Copyright (c) Zend Technologies
    with Zend OPcache v8.4.13, Copyright (c), by Zend Technologies
Operating System

Ubuntu 24.04.3 LTS x86_64

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.