Bug #74403 [Opn]: Sporadic FPM segfaults
| From: | requinix@php.net | Date: | Mon, 10 Apr 2017 11:17:26 +0000 |
| Subject: | Bug #74403 [Opn]: Sporadic FPM segfaults | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-208429@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74403&edit=1
ID: 74403
Updated by: requinix@php.net
Reported by: tony2001@php.net
-Summary: Sporadi
+Summary: Sporadic FPM segfaults
Status: Open
Type: Bug
Package: PCRE related
Operating System: Linux
PHP Version: 7.1.4RC1
Block user comment: N
Private report: N
New Comment:
There have been a few php-fpm crashes reported over the last couple months. Can you tell if any of
them are related to this?
Previous Comments:
------------------------------------------------------------------------
[2017-04-10 11:09:09] tony2001@php.net
The following patch has been added/updated:
Patch Name: pcre-crashes-fix.diff
Revision: 1491822546
URL: https://bugs.php.net/patch-display.php?bug=74403&patch=pcre-crashes-fix.diff&revision=1491822546
------------------------------------------------------------------------
[2017-04-10 11:08:35] tony2001@php.net
Description:
------------
Patch ebfd93f725eb9b9cfadbbde98047efe76f658da6 introduced an issue that is both hard to debug and
reproduce. FPM processes start to crash in completely random places (mostly pointing to the executor
code), all FPM children at once.
Unfortunately, I don't have a reproduce case and I don't know of any reliable way to
reproduce it, other than to start FPM on production server under a heavy load and leave it for a
while.
I've spent a lot of time debugging it and have found that the problem goes away as soon as I
revert ebfd93f725eb9b9cfadbbde98047efe76f658da6. After looking at the patch closely, I've
noticed that the patch changes one tricky part of the code managing refcount of the string stored in
the cache. In the new version that part is gone and reverting this part of the patch fixes the
issue, see attached patch.
Test script:
---------------
.
Expected result:
----------------
No crashes.
Actual result:
--------------
Sporadic FPM segfaults.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74403&edit=1