Bug #74403 [Asn->Fbk]: Sporadic FPM segfaults

From: Date: Mon, 10 Apr 2017 11:45:25 +0000
Subject: Bug #74403 [Asn->Fbk]: Sporadic FPM segfaults
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208432@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: laruence@php.net Reported by: tony2001@php.net Summary: Sporadic FPM segfaults -Status: Assigned +Status: Feedback Type: Bug Package: PCRE related Operating System: Linux PHP Version: 7.1.4RC1 Assigned To: laruence Block user comment: N Private report: N New Comment: Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. as we discussed early in mails, I don't think that diretctly relates to that change, anyway, could you please paste the backtrace out? thanks Previous Comments: ------------------------------------------------------------------------ [2017-04-10 11:22:45] tony2001@php.net https://bugs.php.net/bug.php?id=73740 - this one looks familiar. ------------------------------------------------------------------------ [2017-04-10 11:17:26] requinix@php.net 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? ------------------------------------------------------------------------ [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

« previous php.bugs (#208432) next »