php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79231 Segfault when preloading via php-fpm
Submitted: 2020-02-05 12:18 UTC Modified: 2020-02-05 14:57 UTC
From: brent at spatie dot be Assigned:
Status: Duplicate Package: opcache
PHP Version: 7.4.2 OS: Ubuntu 18.04.3 LTS
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: brent at spatie dot be
New email:
PHP Version: OS:

 

 [2020-02-05 12:18 UTC] brent at spatie dot be
Description:
------------
I've been trying out preloading, and am running into a segfault using PHP 7.4.2, only when using php-fpm.

I've been using this preload script: https://github.com/brendt/aggregate.stitcher.io/blob/master/preload.php

When using this preload script via PHP's built-in webserver, all works fine. For reference, this is the command I used to test this: `php -c /etc/php/7.4/fpm/php.ini -S aggregate.stitcher.io:8001 -t public -d opcache.preload=preload.php -d opcache.user=forge`

However, when using the same preloading script via php-fpm, a segfault occurs. Here's a snippet from the php-fpm logs, this message gets repeated over and over again:

```
[05-Feb-2020 12:06:01] WARNING: [pool www] child 2961 exited on signal 11 (SIGSEGV - core dumped) after 0.942953 seconds from start
[05-Feb-2020 12:06:01] NOTICE: [pool www] child 2972 started
[05-Feb-2020 12:06:01] WARNING: [pool www] child 2963 exited on signal 11 (SIGSEGV - core dumped) after 0.947206 seconds from start
[05-Feb-2020 12:06:01] NOTICE: [pool www] child 2977 started
[05-Feb-2020 12:06:01] WARNING: [pool www] child 2965 exited on signal 11 (SIGSEGV - core dumped) after 1.009507 seconds from start
[05-Feb-2020 12:06:01] NOTICE: [pool www] child 2979 started
```

Checking php-fpm's status using `sudo service php7.4-fpm status` after restarting it, I get the following output:

```
…
Feb 05 12:04:42 brent php-fpm7.4[2039]: [Preloader] Preloaded `Illuminate\Mail\TransportManager`
Feb 05 12:04:42 brent php-fpm7.4[2039]: [Preloader] Preloaded `Illuminate\Mail\Markdown`
Feb 05 12:04:42 brent php-fpm7.4[2039]: [Preloader] Preloaded 1127 classes
Feb 05 12:04:42 brent systemd[1]: Started The PHP 7.4 FastCGI Process Manager.
```

So php-fpm manages to start, it only crashes as soon as a request arrives at the server. 

Anything I can do to provide more information? 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-02-05 14:57 UTC] nikic@php.net
-Status: Open +Status: Duplicate
 [2020-02-05 14:57 UTC] nikic@php.net
Assuming you meant opcache.preload_user rather than opcache.user, this is a duplicate of bug #79128.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 12:01:29 2024 UTC