|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #75247 Documentation Recommends Broken Setting
Submitted: 2017-09-22 19:25 UTC Modified: 2017-12-18 20:54 UTC
From: pegasus at vaultwiki dot org Assigned: nikic (profile)
Status: Closed Package: opcache
PHP Version: 5.6.31 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: pegasus at vaultwiki dot org
New email:
PHP Version: OS:


 [2017-09-22 19:25 UTC] pegasus at vaultwiki dot org
From manual page:

The page recommends using directive opcache.fast_shutdown = 1, however this directive is known to be broken. See the following Zend bug which has remained unsolved since 2013:

In my experiences on many clients' servers, fast_shutdown occasionally caused PHP<->web server communication to fail and the PHP process to crash in random places without a segfault. In a number of cases, this led to database corruption. Disabling opcache.fast_shutdown always resolved the issue.

Since opcache.fast_shutdown bypasses PHP garbage collection in favor of Zend MM garbage collection, it is likely that Zend MM is not doing this successfully, possibly creating a Use-Again-Without-Free? situation which causes the next process to crash. However, without segfaults to provide information, this is only a theory.

Expected result:
The documentation should not recommend opcache.fast_shutdown = 1 until the Zend bug is fixed:

If the Zend bug is fixed, the documentation should specify which version(s) of PHP the fix applies in, and therefore which version of PHP opcache.fast_shutdown becomes safe to use again.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-22 19:47 UTC] pegasus at vaultwiki dot org
See also this PHP bug report, providing case-in-point, which has gone ignored for over 2 years even though the requested information was provided:
 [2017-12-18 20:54 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
 [2017-12-18 20:54 UTC]
As far as I'm aware there haven't been issues with opcache.fast_shutdown in PHP 7. As of PHP 7.2 the ini option is removed, as fast_shutdown is now integrated in core PHP. I've just pushed a doc change to that effect.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Dec 01 13:03:35 2021 UTC