php / php/php-src

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

Đang mở
#20,290 1 bình luận 1 reaction 1 người được giao Xem trên GitHub

@bukka đang làm issue này rồi.

Từ ngày 25/10/2025.

Bug SAPI: fpm Status: Needs Triage
Ngôn ngữ chính
C
Star
40.4k
Fork
8.1k
Merge trung bình
2 ngày 13 giờ
Pull request đã merge (30 ngày)
96

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.